| 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_DRI_GBM_SURFACE_FACTORY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ | 6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
| 7 | 7 |
| 8 #include "ui/ozone/platform/dri/dri_surface_factory.h" | 8 #include "ui/ozone/platform/dri/dri_surface_factory.h" |
| 9 | 9 |
| 10 struct gbm_device; | 10 struct gbm_device; |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 | 13 |
| 14 class DriWindowDelegate; | 14 class DriWindowDelegate; |
| 15 class DriWindowDelegateManager; | 15 class DriWindowDelegateManager; |
| 16 class PageFilpEventHandler; |
| 16 class ScreenManager; | 17 class ScreenManager; |
| 17 | 18 |
| 18 class GbmSurfaceFactory : public DriSurfaceFactory { | 19 class GbmSurfaceFactory : public DriSurfaceFactory { |
| 19 public: | 20 public: |
| 20 GbmSurfaceFactory(bool allow_surfaceless); | 21 GbmSurfaceFactory(bool allow_surfaceless); |
| 21 ~GbmSurfaceFactory() override; | 22 ~GbmSurfaceFactory() override; |
| 22 | 23 |
| 23 void InitializeGpu(DriWrapper* dri, | 24 void InitializeGpu(DriWrapper* dri, |
| 24 gbm_device* device, | 25 gbm_device* device, |
| 25 ScreenManager* screen_manager, | 26 ScreenManager* screen_manager, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 49 const gfx::Rect& display_bounds, | 50 const gfx::Rect& display_bounds, |
| 50 const gfx::RectF& crop_rect) override; | 51 const gfx::RectF& crop_rect) override; |
| 51 bool CanShowPrimaryPlaneAsOverlay() override; | 52 bool CanShowPrimaryPlaneAsOverlay() override; |
| 52 bool CanCreateNativePixmap(BufferUsage usage) override; | 53 bool CanCreateNativePixmap(BufferUsage usage) override; |
| 53 | 54 |
| 54 private: | 55 private: |
| 55 DriWindowDelegate* GetOrCreateWindowDelegate(gfx::AcceleratedWidget widget); | 56 DriWindowDelegate* GetOrCreateWindowDelegate(gfx::AcceleratedWidget widget); |
| 56 | 57 |
| 57 ScreenManager* screen_manager_; // Not owned. | 58 ScreenManager* screen_manager_; // Not owned. |
| 58 gbm_device* device_; // Not owned. | 59 gbm_device* device_; // Not owned. |
| 60 scoped_ptr<PageFilpEventHandler> flip_handler_; |
| 59 bool allow_surfaceless_; | 61 bool allow_surfaceless_; |
| 60 | 62 |
| 61 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); | 63 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // namespace ui | 66 } // namespace ui |
| 65 | 67 |
| 66 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ | 68 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
| OLD | NEW |