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

Unified Diff: ui/ozone/platform/drm/gpu/gbm_surfaceless.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_surfaceless.h
diff --git a/ui/ozone/platform/drm/gpu/gbm_surfaceless.h b/ui/ozone/platform/drm/gpu/gbm_surfaceless.h
index 7fa079b5a4c22d4379ead5951f3999451cdd85bc..2db7feb9b661014aed4ab0aa70f2e7c9b14489ad 100644
--- a/ui/ozone/platform/drm/gpu/gbm_surfaceless.h
+++ b/ui/ozone/platform/drm/gpu/gbm_surfaceless.h
@@ -5,15 +5,18 @@
#ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_
#define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "ui/gfx/native_widget_types.h"
#include "ui/ozone/public/surface_ozone_egl.h"
namespace gfx {
class Size;
-} // namespace gfx
+}
namespace ui {
-class DrmDeviceManager;
+class DrmThread;
class DrmWindow;
// In surfaceless mode drawing and displaying happens directly through
@@ -22,7 +25,7 @@ class DrmWindow;
// presentation.
class GbmSurfaceless : public SurfaceOzoneEGL {
public:
- GbmSurfaceless(DrmWindow* window, DrmDeviceManager* drm_device_manager);
+ GbmSurfaceless(gfx::AcceleratedWidget widget, DrmThread* drm_thread);
~GbmSurfaceless() override;
// SurfaceOzoneEGL:
@@ -34,8 +37,9 @@ class GbmSurfaceless : public SurfaceOzoneEGL {
bool IsUniversalDisplayLinkDevice() override;
protected:
- DrmWindow* window_;
- DrmDeviceManager* drm_device_manager_;
+ gfx::AcceleratedWidget widget_;
+ DrmThread* drm_thread_;
+ base::WeakPtr<DrmWindow> window_;
DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless);
};

Powered by Google App Engine
This is Rietveld 408576698