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

Side by Side Diff: ui/ozone/platform/drm/gpu/gbm_surface.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 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_GPU_GBM_SURFACE_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
11 #include "ui/ozone/platform/drm/gpu/gbm_surfaceless.h" 11 #include "ui/ozone/platform/drm/gpu/gbm_surfaceless.h"
12 #include "ui/ozone/public/surface_ozone_egl.h" 12 #include "ui/ozone/public/surface_ozone_egl.h"
13 13
14 struct gbm_bo; 14 struct gbm_bo;
15 struct gbm_surface; 15 struct gbm_surface;
16 16
17 namespace ui { 17 namespace ui {
18 18
19 class DrmBuffer; 19 class DrmBuffer;
20 class DrmWindow;
21 class GbmDevice; 20 class GbmDevice;
22 21
23 // Extends the GBM surfaceless functionality and adds an implicit surface for 22 // Extends the GBM surfaceless functionality and adds an implicit surface for
24 // the primary plane. Arbitrary buffers can still be allocated and displayed as 23 // the primary plane. Arbitrary buffers can still be allocated and displayed as
25 // overlay planes, however the primary plane is associated with the native 24 // overlay planes, however the primary plane is associated with the native
26 // surface and is updated via an EGLSurface. 25 // surface and is updated via an EGLSurface.
27 class GbmSurface : public GbmSurfaceless { 26 class GbmSurface : public GbmSurfaceless {
28 public: 27 public:
29 GbmSurface(DrmWindow* window, const scoped_refptr<GbmDevice>& gbm); 28 GbmSurface(scoped_ptr<DrmWindowProxy> window,
29 const scoped_refptr<GbmDevice>& gbm);
30 ~GbmSurface() override; 30 ~GbmSurface() override;
31 31
32 bool Initialize(); 32 bool Initialize();
33 33
34 // GbmSurfaceless: 34 // GbmSurfaceless:
35 intptr_t GetNativeWindow() override; 35 intptr_t GetNativeWindow() override;
36 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; 36 bool ResizeNativeWindow(const gfx::Size& viewport_size) override;
37 bool OnSwapBuffers() override; 37 bool OnSwapBuffers() override;
38 bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) override; 38 bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) override;
39 39
(...skipping 13 matching lines...) Expand all
53 gfx::Size size_; 53 gfx::Size size_;
54 54
55 base::WeakPtrFactory<GbmSurface> weak_factory_; 55 base::WeakPtrFactory<GbmSurface> weak_factory_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(GbmSurface); 57 DISALLOW_COPY_AND_ASSIGN(GbmSurface);
58 }; 58 };
59 59
60 } // namespace ui 60 } // namespace ui
61 61
62 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_H_ 62 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698