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

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

Issue 1598573002: Propagate supported scanout formats from driver to SurfaceFactoryOzone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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_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 13 matching lines...) Expand all
24 GbmSurfaceFactory(DrmThreadProxy* drm_thread); 24 GbmSurfaceFactory(DrmThreadProxy* drm_thread);
25 ~GbmSurfaceFactory() override; 25 ~GbmSurfaceFactory() override;
26 26
27 void RegisterSurface(gfx::AcceleratedWidget widget, GbmSurfaceless* surface); 27 void RegisterSurface(gfx::AcceleratedWidget widget, GbmSurfaceless* surface);
28 void UnregisterSurface(gfx::AcceleratedWidget widget); 28 void UnregisterSurface(gfx::AcceleratedWidget widget);
29 GbmSurfaceless* GetSurface(gfx::AcceleratedWidget widget) const; 29 GbmSurfaceless* GetSurface(gfx::AcceleratedWidget widget) const;
30 30
31 // SurfaceFactoryOzone: 31 // SurfaceFactoryOzone:
32 intptr_t GetNativeDisplay() override; 32 intptr_t GetNativeDisplay() override;
33 const int32_t* GetEGLSurfaceProperties(const int32_t* desired_list) override; 33 const int32_t* GetEGLSurfaceProperties(const int32_t* desired_list) override;
34 bool GetSupportedFormats(
35 gfx::BufferUsage buffer_usage,
36 std::vector<gfx::BufferFormat>* support_formats) override;
34 bool LoadEGLGLES2Bindings( 37 bool LoadEGLGLES2Bindings(
35 AddGLLibraryCallback add_gl_library, 38 AddGLLibraryCallback add_gl_library,
36 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; 39 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
37 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( 40 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
38 gfx::AcceleratedWidget widget) override; 41 gfx::AcceleratedWidget widget) override;
39 scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( 42 scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget(
40 gfx::AcceleratedWidget w) override; 43 gfx::AcceleratedWidget w) override;
41 scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget( 44 scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget(
42 gfx::AcceleratedWidget widget) override; 45 gfx::AcceleratedWidget widget) override;
43 scoped_refptr<ui::NativePixmap> CreateNativePixmap( 46 scoped_refptr<ui::NativePixmap> CreateNativePixmap(
44 gfx::AcceleratedWidget widget, 47 gfx::AcceleratedWidget widget,
45 gfx::Size size, 48 gfx::Size size,
46 gfx::BufferFormat format, 49 gfx::BufferFormat format,
47 gfx::BufferUsage usage) override; 50 gfx::BufferUsage usage) override;
48 scoped_refptr<NativePixmap> CreateNativePixmapFromHandle( 51 scoped_refptr<NativePixmap> CreateNativePixmapFromHandle(
49 const gfx::NativePixmapHandle& handle) override; 52 const gfx::NativePixmapHandle& handle) override;
50 53
51 private: 54 private:
52 base::ThreadChecker thread_checker_; 55 base::ThreadChecker thread_checker_;
53 56
54 DrmThreadProxy* drm_thread_; 57 DrmThreadProxy* drm_thread_;
55 58
56 std::map<gfx::AcceleratedWidget, GbmSurfaceless*> widget_to_surface_map_; 59 std::map<gfx::AcceleratedWidget, GbmSurfaceless*> widget_to_surface_map_;
57 60
61 std::map<gfx::BufferUsage, std::vector<gfx::BufferFormat>>
62 support_formats_map_;
63
58 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); 64 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory);
59 }; 65 };
60 66
61 } // namespace ui 67 } // namespace ui
62 68
63 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ 69 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698