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

Side by Side Diff: ui/ozone/platform/drm/gpu/gbm_surfaceless.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 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_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 "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 #include "ui/ozone/platform/drm/gpu/overlay_plane.h" 12 #include "ui/ozone/platform/drm/gpu/overlay_plane.h"
13 #include "ui/ozone/public/surface_ozone_egl.h" 13 #include "ui/ozone/public/surface_ozone_egl.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 class Size; 16 class Size;
17 } 17 }
18 18
19 namespace ui { 19 namespace ui {
20 20
21 class DrmWindowProxy; 21 class DrmWindowProxy;
22 class GbmSurfaceFactory; 22 class GbmSurfaceFactory;
23 23
24 // In surfaceless mode drawing and displaying happens directly through 24 // In surfaceless mode drawing and displaying happens directly through
25 // NativePixmap buffers. CC would call into SurfaceFactoryOzone to allocate the 25 // NativePixmap buffers. CC would call into SurfaceFactoryOzone to allocate the
26 // buffers and then call ScheduleOverlayPlane(..) to schedule the buffer for 26 // buffers and then call ScheduleOverlayPlane(..) to schedule the buffer for
27 // presentation. 27 // presentation.
28 class GbmSurfaceless : public SurfaceOzoneEGL { 28 class GbmSurfaceless : public SurfaceOzoneEGL {
29 public: 29 public:
30 GbmSurfaceless(scoped_ptr<DrmWindowProxy> window, 30 GbmSurfaceless(std::unique_ptr<DrmWindowProxy> window,
31 GbmSurfaceFactory* surface_manager); 31 GbmSurfaceFactory* surface_manager);
32 ~GbmSurfaceless() override; 32 ~GbmSurfaceless() override;
33 33
34 void QueueOverlayPlane(const OverlayPlane& plane); 34 void QueueOverlayPlane(const OverlayPlane& plane);
35 35
36 // SurfaceOzoneEGL: 36 // SurfaceOzoneEGL:
37 intptr_t GetNativeWindow() override; 37 intptr_t GetNativeWindow() override;
38 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; 38 bool ResizeNativeWindow(const gfx::Size& viewport_size) override;
39 bool OnSwapBuffers() override; 39 bool OnSwapBuffers() override;
40 void OnSwapBuffersAsync(const SwapCompletionCallback& callback) override; 40 void OnSwapBuffersAsync(const SwapCompletionCallback& callback) override;
41 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; 41 std::unique_ptr<gfx::VSyncProvider> CreateVSyncProvider() override;
42 bool IsUniversalDisplayLinkDevice() override; 42 bool IsUniversalDisplayLinkDevice() override;
43 void* /* EGLConfig */ GetEGLSurfaceConfig( 43 void* /* EGLConfig */ GetEGLSurfaceConfig(
44 const EglConfigCallbacks& egl) override; 44 const EglConfigCallbacks& egl) override;
45 45
46 protected: 46 protected:
47 scoped_ptr<DrmWindowProxy> window_; 47 std::unique_ptr<DrmWindowProxy> window_;
48 48
49 GbmSurfaceFactory* surface_manager_; 49 GbmSurfaceFactory* surface_manager_;
50 50
51 std::vector<OverlayPlane> planes_; 51 std::vector<OverlayPlane> planes_;
52 52
53 private: 53 private:
54 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless); 54 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless);
55 }; 55 };
56 56
57 } // namespace ui 57 } // namespace ui
58 58
59 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_ 59 #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