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

Unified Diff: ui/ozone/platform/drm/gpu/drm_surface_factory.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/drm_surface_factory.h
diff --git a/ui/ozone/platform/drm/gpu/drm_surface_factory.h b/ui/ozone/platform/drm/gpu/drm_surface_factory.h
index 223a7b9dc28cf5f99bc9a73b3198d75b8407ed87..5b44269d07798db549137daf70c7cbf0bb1ed48f 100644
--- a/ui/ozone/platform/drm/gpu/drm_surface_factory.h
+++ b/ui/ozone/platform/drm/gpu/drm_surface_factory.h
@@ -6,20 +6,22 @@
#define UI_OZONE_PLATFORM_DRM_GPU_DRM_SURFACE_FACTORY_H_
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "ui/ozone/public/surface_factory_ozone.h"
namespace ui {
-class ScreenManager;
+class DrmThread;
class SurfaceOzoneCanvas;
// SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers.
// This implementation is used in conjunction with the software rendering
// path.
-class DrmSurfaceFactory : public SurfaceFactoryOzone {
+class DrmSurfaceFactory : public SurfaceFactoryOzone,
+ public base::SupportsWeakPtr<DrmSurfaceFactory> {
spang 2015/09/14 18:41:43 use WeakPtrFactory instead
dnicoara 2015/09/17 21:58:21 No longer relevant.
public:
- DrmSurfaceFactory(ScreenManager* screen_manager);
+ DrmSurfaceFactory(DrmThread* drm_thread);
~DrmSurfaceFactory() override;
// SurfaceFactoryOzone:
@@ -30,7 +32,7 @@ class DrmSurfaceFactory : public SurfaceFactoryOzone {
SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
protected:
- ScreenManager* screen_manager_; // Not owned.
+ DrmThread* drm_thread_; // Not owned.
base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(DrmSurfaceFactory);

Powered by Google App Engine
This is Rietveld 408576698