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

Side by Side 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, 2 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_SURFACELESS_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/gfx/native_widget_types.h"
10 #include "ui/ozone/platform/drm/gpu/overlay_plane.h" 11 #include "ui/ozone/platform/drm/gpu/overlay_plane.h"
11 #include "ui/ozone/public/surface_ozone_egl.h" 12 #include "ui/ozone/public/surface_ozone_egl.h"
12 13
13 namespace gfx { 14 namespace gfx {
14 class Size; 15 class Size;
15 } // namespace gfx 16 }
16 17
17 namespace ui { 18 namespace ui {
18 19
19 class DrmDeviceManager; 20 class DrmDeviceManager;
20 class DrmWindow; 21 class DrmWindowProxy;
21 class GbmSurfaceFactory; 22 class GbmSurfaceFactory;
22 23
23 // In surfaceless mode drawing and displaying happens directly through 24 // In surfaceless mode drawing and displaying happens directly through
24 // NativePixmap buffers. CC would call into SurfaceFactoryOzone to allocate the 25 // NativePixmap buffers. CC would call into SurfaceFactoryOzone to allocate the
25 // buffers and then call ScheduleOverlayPlane(..) to schedule the buffer for 26 // buffers and then call ScheduleOverlayPlane(..) to schedule the buffer for
26 // presentation. 27 // presentation.
27 class GbmSurfaceless : public SurfaceOzoneEGL { 28 class GbmSurfaceless : public SurfaceOzoneEGL {
28 public: 29 public:
29 GbmSurfaceless(DrmWindow* window, 30 GbmSurfaceless(scoped_ptr<DrmWindowProxy> window,
30 DrmDeviceManager* drm_device_manager, 31 GbmSurfaceFactory* surface_manager,
31 GbmSurfaceFactory* surface_manager); 32 DrmDeviceManager* device_manager);
32 ~GbmSurfaceless() override; 33 ~GbmSurfaceless() override;
33 34
34 void QueueOverlayPlane(const OverlayPlane& plane); 35 void QueueOverlayPlane(const OverlayPlane& plane);
35 36
36 // SurfaceOzoneEGL: 37 // SurfaceOzoneEGL:
37 intptr_t GetNativeWindow() override; 38 intptr_t GetNativeWindow() override;
38 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; 39 bool ResizeNativeWindow(const gfx::Size& viewport_size) override;
39 bool OnSwapBuffers() override; 40 bool OnSwapBuffers() override;
40 bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) override; 41 bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) override;
41 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; 42 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override;
42 bool IsUniversalDisplayLinkDevice() override; 43 bool IsUniversalDisplayLinkDevice() override;
43 44
44 protected: 45 protected:
45 DrmWindow* window_; 46 scoped_ptr<DrmWindowProxy> window_;
46 DrmDeviceManager* drm_device_manager_; 47
47 GbmSurfaceFactory* surface_manager_; 48 GbmSurfaceFactory* surface_manager_;
49
50 DrmDeviceManager* device_manager_;
51
48 std::vector<OverlayPlane> planes_; 52 std::vector<OverlayPlane> planes_;
49 53
50 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless); 54 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless);
51 }; 55 };
52 56
53 } // namespace ui 57 } // namespace ui
54 58
55 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_ 59 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698