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_SURFACE_FACTORY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ |
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
16 #include "ui/gl/gl_implementation.h" | 16 #include "ui/gl/gl_implementation.h" |
17 #include "ui/gl/gl_surface.h" | 17 #include "ui/gl/gl_surface.h" |
18 #include "ui/ozone/common/gl_ozone_egl.h" | 18 #include "ui/ozone/common/gl_ozone_egl.h" |
19 #include "ui/ozone/public/surface_factory_ozone.h" | 19 #include "ui/ozone/public/surface_factory_ozone.h" |
20 | 20 |
21 namespace ui { | 21 namespace ui { |
22 | 22 |
23 class DrmThreadProxy; | 23 class DrmThreadProxy; |
24 class GbmDevice; | |
25 class GbmSurfaceless; | 24 class GbmSurfaceless; |
26 | 25 |
27 class GbmSurfaceFactory : public SurfaceFactoryOzone { | 26 class GbmSurfaceFactory : public SurfaceFactoryOzone { |
28 public: | 27 public: |
29 explicit GbmSurfaceFactory(DrmThreadProxy* drm_thread_proxy); | 28 explicit GbmSurfaceFactory(DrmThreadProxy* drm_thread_proxy); |
30 ~GbmSurfaceFactory() override; | 29 ~GbmSurfaceFactory() override; |
31 | 30 |
32 void RegisterSurface(gfx::AcceleratedWidget widget, GbmSurfaceless* surface); | 31 void RegisterSurface(gfx::AcceleratedWidget widget, GbmSurfaceless* surface); |
33 void UnregisterSurface(gfx::AcceleratedWidget widget); | 32 void UnregisterSurface(gfx::AcceleratedWidget widget); |
34 GbmSurfaceless* GetSurface(gfx::AcceleratedWidget widget) const; | 33 GbmSurfaceless* GetSurface(gfx::AcceleratedWidget widget) const; |
(...skipping 25 matching lines...) Expand all Loading... |
60 DrmThreadProxy* drm_thread_proxy_; | 59 DrmThreadProxy* drm_thread_proxy_; |
61 | 60 |
62 std::map<gfx::AcceleratedWidget, GbmSurfaceless*> widget_to_surface_map_; | 61 std::map<gfx::AcceleratedWidget, GbmSurfaceless*> widget_to_surface_map_; |
63 | 62 |
64 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); | 63 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); |
65 }; | 64 }; |
66 | 65 |
67 } // namespace ui | 66 } // namespace ui |
68 | 67 |
69 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ | 68 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ |
OLD | NEW |