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

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: update & fix clang 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 DrmWindow; 20 class DrmWindowProxy;
20 class GbmSurfaceFactory; 21 class GbmSurfaceFactory;
21 22
22 // In surfaceless mode drawing and displaying happens directly through 23 // In surfaceless mode drawing and displaying happens directly through
23 // NativePixmap buffers. CC would call into SurfaceFactoryOzone to allocate the 24 // NativePixmap buffers. CC would call into SurfaceFactoryOzone to allocate the
24 // buffers and then call ScheduleOverlayPlane(..) to schedule the buffer for 25 // buffers and then call ScheduleOverlayPlane(..) to schedule the buffer for
25 // presentation. 26 // presentation.
26 class GbmSurfaceless : public SurfaceOzoneEGL { 27 class GbmSurfaceless : public SurfaceOzoneEGL {
27 public: 28 public:
28 GbmSurfaceless(DrmWindow* window, 29 GbmSurfaceless(scoped_ptr<DrmWindowProxy> window,
29 GbmSurfaceFactory* surface_manager); 30 GbmSurfaceFactory* surface_manager);
30 ~GbmSurfaceless() override; 31 ~GbmSurfaceless() override;
31 32
32 void QueueOverlayPlane(const OverlayPlane& plane); 33 void QueueOverlayPlane(const OverlayPlane& plane);
33 34
34 // SurfaceOzoneEGL: 35 // SurfaceOzoneEGL:
35 intptr_t GetNativeWindow() override; 36 intptr_t GetNativeWindow() override;
36 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; 37 bool ResizeNativeWindow(const gfx::Size& viewport_size) override;
37 bool OnSwapBuffers() override; 38 bool OnSwapBuffers() override;
38 bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) override; 39 bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) override;
39 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; 40 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override;
40 bool IsUniversalDisplayLinkDevice() override; 41 bool IsUniversalDisplayLinkDevice() override;
41 42
42 protected: 43 protected:
43 DrmWindow* window_; 44 scoped_ptr<DrmWindowProxy> window_;
45
44 GbmSurfaceFactory* surface_manager_; 46 GbmSurfaceFactory* surface_manager_;
47
45 std::vector<OverlayPlane> planes_; 48 std::vector<OverlayPlane> planes_;
46 49
47 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless); 50 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless);
48 }; 51 };
49 52
50 } // namespace ui 53 } // namespace ui
51 54
52 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_ 55 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_surface_factory.cc ('k') | ui/ozone/platform/drm/gpu/gbm_surfaceless.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698