Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: ui/ozone/platform/drm/gpu/gbm_buffer.h

Issue 1311043016: Switch DRM platform to using a separate thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mv-drm-calls-on-thread2
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698