Index: ui/ozone/platform/drm/gpu/gbm_buffer.h |
diff --git a/ui/ozone/platform/drm/gpu/gbm_buffer.h b/ui/ozone/platform/drm/gpu/gbm_buffer.h |
index ecc385e34b53e986c43ba2d1d8a6e8e994257eb7..cd36ca790590f82db43d15c4984017f572c79620 100644 |
--- a/ui/ozone/platform/drm/gpu/gbm_buffer.h |
+++ b/ui/ozone/platform/drm/gpu/gbm_buffer.h |
@@ -10,13 +10,14 @@ |
#include "ui/gfx/buffer_types.h" |
#include "ui/gfx/geometry/size.h" |
#include "ui/ozone/platform/drm/gpu/gbm_buffer_base.h" |
-#include "ui/ozone/platform/drm/gpu/screen_manager.h" |
#include "ui/ozone/public/native_pixmap.h" |
struct gbm_bo; |
namespace ui { |
+class DrmThread; |
+class DrmWindowProxy; |
class GbmDevice; |
class GbmBuffer : public GbmBufferBase { |
@@ -41,8 +42,7 @@ class GbmBuffer : public GbmBufferBase { |
class GbmPixmap : public NativePixmap { |
public: |
- GbmPixmap(const scoped_refptr<GbmBuffer>& buffer, |
- ScreenManager* screen_manager); |
+ GbmPixmap(const scoped_refptr<GbmBuffer>& buffer, DrmThread* drm_thread); |
bool Initialize(); |
void SetScalingCallback(const ScalingCallback& scaling_callback) override; |
scoped_refptr<NativePixmap> GetScaledPixmap(gfx::Size new_size) override; |
@@ -69,7 +69,11 @@ class GbmPixmap : public NativePixmap { |
scoped_refptr<GbmBuffer> buffer_; |
int dma_buf_ = -1; |
- ScreenManager* screen_manager_; // Not owned. |
+ DrmThread* drm_thread_; // Not owned. |
+ |
+ // Since buffers are likely to be shown on the same window, keep a cached |
+ // window proxy so we don't have to get this every time the buffer is used. |
+ scoped_ptr<DrmWindowProxy> cached_window_; |
ScalingCallback scaling_callback_; |