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

Side by Side Diff: ui/ozone/platform/drm/drm_surface_factory.h

Issue 1050923003: zero-copy: Clarify to allocate/destroy GpuMemoryBuffer on any thread and use it on the main thread o (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just add thread check Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PLATFORM_DRM_DRM_SURFACE_FACTORY_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_DRM_SURFACE_FACTORY_H_
6 #define UI_OZONE_PLATFORM_DRM_DRM_SURFACE_FACTORY_H_ 6 #define UI_OZONE_PLATFORM_DRM_DRM_SURFACE_FACTORY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/threading/thread_checker.h"
9 #include "ui/ozone/public/surface_factory_ozone.h" 10 #include "ui/ozone/public/surface_factory_ozone.h"
10 11
11 namespace ui { 12 namespace ui {
12 13
13 class ScreenManager; 14 class ScreenManager;
14 class SurfaceOzoneCanvas; 15 class SurfaceOzoneCanvas;
15 16
16 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers. 17 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers.
17 // This implementation is used in conjunction with the software rendering 18 // This implementation is used in conjunction with the software rendering
18 // path. 19 // path.
19 class DrmSurfaceFactory : public SurfaceFactoryOzone { 20 class DrmSurfaceFactory : public SurfaceFactoryOzone {
20 public: 21 public:
21 DrmSurfaceFactory(ScreenManager* screen_manager); 22 DrmSurfaceFactory(ScreenManager* screen_manager);
22 ~DrmSurfaceFactory() override; 23 ~DrmSurfaceFactory() override;
23 24
24 // SurfaceFactoryOzone: 25 // SurfaceFactoryOzone:
25 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( 26 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
26 gfx::AcceleratedWidget widget) override; 27 gfx::AcceleratedWidget widget) override;
27 bool LoadEGLGLES2Bindings( 28 bool LoadEGLGLES2Bindings(
28 AddGLLibraryCallback add_gl_library, 29 AddGLLibraryCallback add_gl_library,
29 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; 30 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
30 31
31 protected: 32 protected:
32 ScreenManager* screen_manager_; // Not owned. 33 ScreenManager* screen_manager_; // Not owned.
34 base::ThreadChecker thread_checker_;
33 35
34 DISALLOW_COPY_AND_ASSIGN(DrmSurfaceFactory); 36 DISALLOW_COPY_AND_ASSIGN(DrmSurfaceFactory);
35 }; 37 };
36 38
37 } // namespace ui 39 } // namespace ui
38 40
39 #endif // UI_OZONE_PLATFORM_DRM_DRM_SURFACE_FACTORY_H_ 41 #endif // UI_OZONE_PLATFORM_DRM_DRM_SURFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698