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

Side by Side Diff: ui/ozone/public/surface_factory_ozone.h

Issue 2253173002: Remove callbacks for SurfaceFactoryOzone::LoadEGLGLES2Bindings(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « ui/ozone/platform/x11/x11_surface_factory.cc ('k') | ui/ozone/public/surface_factory_ozone.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_PUBLIC_SURFACE_FACTORY_OZONE_H_ 5 #ifndef UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
6 #define UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ 6 #define UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // The following function is specific to the software path: 54 // The following function is specific to the software path:
55 // - CreateCanvasForWidget 55 // - CreateCanvasForWidget
56 // 56 //
57 // The accelerated path can optionally provide support for the software drawing 57 // The accelerated path can optionally provide support for the software drawing
58 // path. 58 // path.
59 // 59 //
60 // The remaining functions are not covered since they are needed in both drawing 60 // The remaining functions are not covered since they are needed in both drawing
61 // modes (See comments bellow for descriptions). 61 // modes (See comments bellow for descriptions).
62 class OZONE_BASE_EXPORT SurfaceFactoryOzone { 62 class OZONE_BASE_EXPORT SurfaceFactoryOzone {
63 public: 63 public:
64 typedef void* (*GLGetProcAddressProc)(const char* name);
65 typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback;
66 typedef base::Callback<void(GLGetProcAddressProc)>
67 SetGLGetProcAddressProcCallback;
68
69 // Returns native platform display handle. This is used to obtain the EGL 64 // Returns native platform display handle. This is used to obtain the EGL
70 // display connection for the native display. 65 // display connection for the native display.
71 virtual intptr_t GetNativeDisplay(); 66 virtual intptr_t GetNativeDisplay();
72 67
73 // Creates a GL surface that renders directly to a view for the specified GL 68 // Creates a GL surface that renders directly to a view for the specified GL
74 // implementation. 69 // implementation.
75 virtual scoped_refptr<gl::GLSurface> CreateViewGLSurface( 70 virtual scoped_refptr<gl::GLSurface> CreateViewGLSurface(
76 gl::GLImplementation implementation, 71 gl::GLImplementation implementation,
77 gfx::AcceleratedWidget widget); 72 gfx::AcceleratedWidget widget);
78 73
(...skipping 11 matching lines...) Expand all
90 gl::GLImplementation implementation, 85 gl::GLImplementation implementation,
91 const gfx::Size& size); 86 const gfx::Size& size);
92 87
93 // Create SurfaceOzoneCanvas for the specified gfx::AcceleratedWidget. 88 // Create SurfaceOzoneCanvas for the specified gfx::AcceleratedWidget.
94 // 89 //
95 // Note: The platform must support creation of SurfaceOzoneCanvas from the 90 // Note: The platform must support creation of SurfaceOzoneCanvas from the
96 // Browser Process using only the handle contained in gfx::AcceleratedWidget. 91 // Browser Process using only the handle contained in gfx::AcceleratedWidget.
97 virtual std::unique_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( 92 virtual std::unique_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
98 gfx::AcceleratedWidget widget); 93 gfx::AcceleratedWidget widget);
99 94
100 // Sets up GL bindings for the native surface. Takes two callback parameters 95 // Sets up GL bindings for the native surface.
101 // that allow Ozone to register the GL bindings. 96 virtual bool LoadEGLGLES2Bindings();
102 virtual bool LoadEGLGLES2Bindings(
103 AddGLLibraryCallback add_gl_library,
104 SetGLGetProcAddressProcCallback set_gl_get_proc_address) = 0;
105 97
106 // Returns all scanout formats for |widget| representing a particular display 98 // Returns all scanout formats for |widget| representing a particular display
107 // controller or default display controller for kNullAcceleratedWidget. 99 // controller or default display controller for kNullAcceleratedWidget.
108 virtual std::vector<gfx::BufferFormat> GetScanoutFormats( 100 virtual std::vector<gfx::BufferFormat> GetScanoutFormats(
109 gfx::AcceleratedWidget widget); 101 gfx::AcceleratedWidget widget);
110 102
111 // Create a single native buffer to be used for overlay planes or zero copy 103 // Create a single native buffer to be used for overlay planes or zero copy
112 // for |widget| representing a particular display controller or default 104 // for |widget| representing a particular display controller or default
113 // display controller for kNullAcceleratedWidget. 105 // display controller for kNullAcceleratedWidget.
114 // It can be called on any thread. 106 // It can be called on any thread.
(...skipping 15 matching lines...) Expand all
130 SurfaceFactoryOzone(); 122 SurfaceFactoryOzone();
131 virtual ~SurfaceFactoryOzone(); 123 virtual ~SurfaceFactoryOzone();
132 124
133 private: 125 private:
134 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); 126 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone);
135 }; 127 };
136 128
137 } // namespace ui 129 } // namespace ui
138 130
139 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ 131 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/x11/x11_surface_factory.cc ('k') | ui/ozone/public/surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698