| OLD | NEW |
| 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 "ui/ozone/public/surface_ozone_egl.h" | 8 #include "ui/ozone/public/surface_ozone_egl.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| 11 class Size; | 11 class Size; |
| 12 } // namespace gfx | 12 } // namespace gfx |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 class DrmDeviceManager; | 16 class DrmWindowProxy; |
| 17 class DrmWindow; | |
| 18 | 17 |
| 19 // In surfaceless mode drawing and displaying happens directly through | 18 // In surfaceless mode drawing and displaying happens directly through |
| 20 // NativePixmap buffers. CC would call into SurfaceFactoryOzone to allocate the | 19 // NativePixmap buffers. CC would call into SurfaceFactoryOzone to allocate the |
| 21 // buffers and then call ScheduleOverlayPlane(..) to schedule the buffer for | 20 // buffers and then call ScheduleOverlayPlane(..) to schedule the buffer for |
| 22 // presentation. | 21 // presentation. |
| 23 class GbmSurfaceless : public SurfaceOzoneEGL { | 22 class GbmSurfaceless : public SurfaceOzoneEGL { |
| 24 public: | 23 public: |
| 25 GbmSurfaceless(DrmWindow* window, DrmDeviceManager* drm_device_manager); | 24 GbmSurfaceless(scoped_ptr<DrmWindowProxy> window); |
| 26 ~GbmSurfaceless() override; | 25 ~GbmSurfaceless() override; |
| 27 | 26 |
| 28 // SurfaceOzoneEGL: | 27 // SurfaceOzoneEGL: |
| 29 intptr_t GetNativeWindow() override; | 28 intptr_t GetNativeWindow() override; |
| 30 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; | 29 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; |
| 31 bool OnSwapBuffers() override; | 30 bool OnSwapBuffers() override; |
| 32 bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) override; | 31 bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) override; |
| 33 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; | 32 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; |
| 34 bool IsUniversalDisplayLinkDevice() override; | 33 bool IsUniversalDisplayLinkDevice() override; |
| 35 | 34 |
| 36 protected: | 35 protected: |
| 37 DrmWindow* window_; | 36 scoped_ptr<DrmWindowProxy> window_; |
| 38 DrmDeviceManager* drm_device_manager_; | |
| 39 | 37 |
| 40 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless); | 38 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless); |
| 41 }; | 39 }; |
| 42 | 40 |
| 43 } // namespace ui | 41 } // namespace ui |
| 44 | 42 |
| 45 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_ | 43 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACELESS_H_ |
| OLD | NEW |