Commit 55c9911d authored by Michael Spang's avatar Michael Spang Committed by Commit Bot

ozone: drm: Inline RequiresGlFinish()

No functional change. This is needed prior to some refactoring.

Bug: 869206

Change-Id: I2db96c903b64b50ac8e33739263cdbb0297bde2f
Reviewed-on: https://chromium-review.googlesource.com/1155910
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579503}
parent 2e13bed8
...@@ -121,8 +121,4 @@ const DrmDevice* DrmBuffer::GetDrmDevice() const { ...@@ -121,8 +121,4 @@ const DrmDevice* DrmBuffer::GetDrmDevice() const {
return drm_.get(); return drm_.get();
} }
bool DrmBuffer::RequiresGlFinish() const {
return false;
}
} // namespace ui } // namespace ui
...@@ -44,7 +44,6 @@ class DrmBuffer : public ScanoutBuffer { ...@@ -44,7 +44,6 @@ class DrmBuffer : public ScanoutBuffer {
uint32_t GetHandle() const override; uint32_t GetHandle() const override;
gfx::Size GetSize() const override; gfx::Size GetSize() const override;
const DrmDevice* GetDrmDevice() const override; const DrmDevice* GetDrmDevice() const override;
bool RequiresGlFinish() const override;
protected: protected:
~DrmBuffer() override; ~DrmBuffer() override;
......
...@@ -131,10 +131,6 @@ const DrmDevice* GbmBuffer::GetDrmDevice() const { ...@@ -131,10 +131,6 @@ const DrmDevice* GbmBuffer::GetDrmDevice() const {
return drm_.get(); return drm_.get();
} }
bool GbmBuffer::RequiresGlFinish() const {
return !drm_->is_primary_device();
}
scoped_refptr<GbmBuffer> GbmBuffer::CreateBufferForBO( scoped_refptr<GbmBuffer> GbmBuffer::CreateBufferForBO(
const scoped_refptr<GbmDevice>& gbm, const scoped_refptr<GbmDevice>& gbm,
struct gbm_bo* bo, struct gbm_bo* bo,
......
...@@ -51,7 +51,6 @@ class GbmBuffer : public ScanoutBuffer { ...@@ -51,7 +51,6 @@ class GbmBuffer : public ScanoutBuffer {
uint32_t GetHandle() const override; uint32_t GetHandle() const override;
gfx::Size GetSize() const override; gfx::Size GetSize() const override;
const DrmDevice* GetDrmDevice() const override; const DrmDevice* GetDrmDevice() const override;
bool RequiresGlFinish() const override;
private: private:
GbmBuffer(const scoped_refptr<GbmDevice>& gbm, GbmBuffer(const scoped_refptr<GbmDevice>& gbm,
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "ui/gfx/gpu_fence.h" #include "ui/gfx/gpu_fence.h"
#include "ui/gfx/presentation_feedback.h" #include "ui/gfx/presentation_feedback.h"
#include "ui/ozone/common/egl_util.h" #include "ui/ozone/common/egl_util.h"
#include "ui/ozone/platform/drm/gpu/drm_device.h"
#include "ui/ozone/platform/drm/gpu/drm_vsync_provider.h" #include "ui/ozone/platform/drm/gpu/drm_vsync_provider.h"
#include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h"
#include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h"
...@@ -45,7 +46,8 @@ GbmSurfaceless::GbmSurfaceless(GbmSurfaceFactory* surface_factory, ...@@ -45,7 +46,8 @@ GbmSurfaceless::GbmSurfaceless(GbmSurfaceFactory* surface_factory,
} }
void GbmSurfaceless::QueueOverlayPlane(DrmOverlayPlane plane) { void GbmSurfaceless::QueueOverlayPlane(DrmOverlayPlane plane) {
is_on_external_drm_device_ = plane.buffer->RequiresGlFinish(); is_on_external_drm_device_ =
!plane.buffer->GetDrmDevice()->is_primary_device();
planes_.push_back(std::move(plane)); planes_.push_back(std::move(plane));
} }
......
...@@ -58,8 +58,4 @@ const DrmDevice* MockScanoutBuffer::GetDrmDevice() const { ...@@ -58,8 +58,4 @@ const DrmDevice* MockScanoutBuffer::GetDrmDevice() const {
return drm_.get(); return drm_.get();
} }
bool MockScanoutBuffer::RequiresGlFinish() const {
return false;
}
} // namespace ui } // namespace ui
...@@ -31,7 +31,6 @@ class MockScanoutBuffer : public ScanoutBuffer { ...@@ -31,7 +31,6 @@ class MockScanoutBuffer : public ScanoutBuffer {
uint32_t GetOpaqueFramebufferPixelFormat() const override; uint32_t GetOpaqueFramebufferPixelFormat() const override;
uint64_t GetFormatModifier() const override; uint64_t GetFormatModifier() const override;
const DrmDevice* GetDrmDevice() const override; const DrmDevice* GetDrmDevice() const override;
bool RequiresGlFinish() const override;
private: private:
~MockScanoutBuffer() override; ~MockScanoutBuffer() override;
......
...@@ -46,8 +46,6 @@ class ScanoutBuffer : public base::RefCountedThreadSafe<ScanoutBuffer> { ...@@ -46,8 +46,6 @@ class ScanoutBuffer : public base::RefCountedThreadSafe<ScanoutBuffer> {
// Device on which the buffer was created. // Device on which the buffer was created.
virtual const DrmDevice* GetDrmDevice() const = 0; virtual const DrmDevice* GetDrmDevice() const = 0;
virtual bool RequiresGlFinish() const = 0;
protected: protected:
virtual ~ScanoutBuffer() {} virtual ~ScanoutBuffer() {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment