OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GL_GL_SURFACE_H_ | 5 #ifndef UI_GL_GL_SURFACE_H_ |
6 #define UI_GL_GL_SURFACE_H_ | 6 #define UI_GL_GL_SURFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 float opacity, | 173 float opacity, |
174 unsigned background_color, | 174 unsigned background_color, |
175 unsigned edge_aa_mask, | 175 unsigned edge_aa_mask, |
176 const RectF& bounds_rect, | 176 const RectF& bounds_rect, |
177 bool is_clipped, | 177 bool is_clipped, |
178 const RectF& clip_rect, | 178 const RectF& clip_rect, |
179 const Transform& transform); | 179 const Transform& transform); |
180 | 180 |
181 virtual bool IsSurfaceless() const; | 181 virtual bool IsSurfaceless() const; |
182 | 182 |
| 183 virtual bool FlipsVertically() const; |
| 184 |
183 // Create a GL surface that renders directly to a view. | 185 // Create a GL surface that renders directly to a view. |
184 static scoped_refptr<GLSurface> CreateViewGLSurface( | 186 static scoped_refptr<GLSurface> CreateViewGLSurface( |
185 gfx::AcceleratedWidget window); | 187 gfx::AcceleratedWidget window); |
186 | 188 |
187 #if defined(USE_OZONE) | 189 #if defined(USE_OZONE) |
188 // Create a GL surface that renders directly into a window with surfaceless | 190 // Create a GL surface that renders directly into a window with surfaceless |
189 // semantics - there is no default framebuffer and the primary surface must | 191 // semantics - there is no default framebuffer and the primary surface must |
190 // be presented as an overlay. If surfaceless mode is not supported or | 192 // be presented as an overlay. If surfaceless mode is not supported or |
191 // enabled it will return a null pointer. | 193 // enabled it will return a null pointer. |
192 static scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface( | 194 static scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface( |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 void* GetDisplay() override; | 261 void* GetDisplay() override; |
260 void* GetConfig() override; | 262 void* GetConfig() override; |
261 unsigned GetFormat() override; | 263 unsigned GetFormat() override; |
262 VSyncProvider* GetVSyncProvider() override; | 264 VSyncProvider* GetVSyncProvider() override; |
263 bool ScheduleOverlayPlane(int z_order, | 265 bool ScheduleOverlayPlane(int z_order, |
264 OverlayTransform transform, | 266 OverlayTransform transform, |
265 gl::GLImage* image, | 267 gl::GLImage* image, |
266 const Rect& bounds_rect, | 268 const Rect& bounds_rect, |
267 const RectF& crop_rect) override; | 269 const RectF& crop_rect) override; |
268 bool IsSurfaceless() const override; | 270 bool IsSurfaceless() const override; |
| 271 bool FlipsVertically() const override; |
269 | 272 |
270 GLSurface* surface() const { return surface_.get(); } | 273 GLSurface* surface() const { return surface_.get(); } |
271 | 274 |
272 protected: | 275 protected: |
273 ~GLSurfaceAdapter() override; | 276 ~GLSurfaceAdapter() override; |
274 | 277 |
275 private: | 278 private: |
276 scoped_refptr<GLSurface> surface_; | 279 scoped_refptr<GLSurface> surface_; |
277 | 280 |
278 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 281 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
279 }; | 282 }; |
280 | 283 |
281 } // namespace gfx | 284 } // namespace gfx |
282 | 285 |
283 #endif // UI_GL_GL_SURFACE_H_ | 286 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |