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> |
(...skipping 15 matching lines...) Expand all Loading... |
26 class GbmSurfaceFactory : public SurfaceFactoryOzone { | 26 class GbmSurfaceFactory : public SurfaceFactoryOzone { |
27 public: | 27 public: |
28 explicit GbmSurfaceFactory(DrmThreadProxy* drm_thread); | 28 explicit GbmSurfaceFactory(DrmThreadProxy* drm_thread); |
29 ~GbmSurfaceFactory() override; | 29 ~GbmSurfaceFactory() override; |
30 | 30 |
31 void RegisterSurface(gfx::AcceleratedWidget widget, GbmSurfaceless* surface); | 31 void RegisterSurface(gfx::AcceleratedWidget widget, GbmSurfaceless* surface); |
32 void UnregisterSurface(gfx::AcceleratedWidget widget); | 32 void UnregisterSurface(gfx::AcceleratedWidget widget); |
33 GbmSurfaceless* GetSurface(gfx::AcceleratedWidget widget) const; | 33 GbmSurfaceless* GetSurface(gfx::AcceleratedWidget widget) const; |
34 | 34 |
35 // SurfaceFactoryOzone: | 35 // SurfaceFactoryOzone: |
36 bool UseNewSurfaceAPI() override; | |
37 scoped_refptr<gl::GLSurface> CreateViewGLSurface( | 36 scoped_refptr<gl::GLSurface> CreateViewGLSurface( |
38 gl::GLImplementation implementation, | 37 gl::GLImplementation implementation, |
39 gfx::AcceleratedWidget widget) override; | 38 gfx::AcceleratedWidget widget) override; |
40 scoped_refptr<gl::GLSurface> CreateSurfacelessViewGLSurface( | 39 scoped_refptr<gl::GLSurface> CreateSurfacelessViewGLSurface( |
41 gl::GLImplementation implementation, | 40 gl::GLImplementation implementation, |
42 gfx::AcceleratedWidget widget) override; | 41 gfx::AcceleratedWidget widget) override; |
43 scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface( | 42 scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface( |
44 gl::GLImplementation implementation, | 43 gl::GLImplementation implementation, |
45 const gfx::Size& size) override; | 44 const gfx::Size& size) override; |
46 | 45 |
(...skipping 22 matching lines...) Expand all Loading... |
69 DrmThreadProxy* drm_thread_; | 68 DrmThreadProxy* drm_thread_; |
70 | 69 |
71 std::map<gfx::AcceleratedWidget, GbmSurfaceless*> widget_to_surface_map_; | 70 std::map<gfx::AcceleratedWidget, GbmSurfaceless*> widget_to_surface_map_; |
72 | 71 |
73 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); | 72 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); |
74 }; | 73 }; |
75 | 74 |
76 } // namespace ui | 75 } // namespace ui |
77 | 76 |
78 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ | 77 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ |
OLD | NEW |