| 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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // |image| to be presented by the overlay. | 115 // |image| to be presented by the overlay. |
| 116 // |bounds_rect| specify where it is supposed to be on the screen in pixels. | 116 // |bounds_rect| specify where it is supposed to be on the screen in pixels. |
| 117 // |crop_rect| specifies the region within the buffer to be placed inside | 117 // |crop_rect| specifies the region within the buffer to be placed inside |
| 118 // |bounds_rect|. | 118 // |bounds_rect|. |
| 119 virtual bool ScheduleOverlayPlane(int z_order, | 119 virtual bool ScheduleOverlayPlane(int z_order, |
| 120 OverlayTransform transform, | 120 OverlayTransform transform, |
| 121 GLImage* image, | 121 GLImage* image, |
| 122 const Rect& bounds_rect, | 122 const Rect& bounds_rect, |
| 123 const RectF& crop_rect); | 123 const RectF& crop_rect); |
| 124 | 124 |
| 125 virtual bool IsSurfaceless() const; |
| 126 |
| 125 // Create a GL surface that renders directly to a view. | 127 // Create a GL surface that renders directly to a view. |
| 126 static scoped_refptr<GLSurface> CreateViewGLSurface( | 128 static scoped_refptr<GLSurface> CreateViewGLSurface( |
| 127 gfx::AcceleratedWidget window); | 129 gfx::AcceleratedWidget window); |
| 128 | 130 |
| 129 // Create a GL surface used for offscreen rendering. | 131 // Create a GL surface used for offscreen rendering. |
| 130 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 132 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
| 131 const gfx::Size& size); | 133 const gfx::Size& size); |
| 132 | 134 |
| 133 static GLSurface* GetCurrent(); | 135 static GLSurface* GetCurrent(); |
| 134 | 136 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 virtual void* GetShareHandle() OVERRIDE; | 176 virtual void* GetShareHandle() OVERRIDE; |
| 175 virtual void* GetDisplay() OVERRIDE; | 177 virtual void* GetDisplay() OVERRIDE; |
| 176 virtual void* GetConfig() OVERRIDE; | 178 virtual void* GetConfig() OVERRIDE; |
| 177 virtual unsigned GetFormat() OVERRIDE; | 179 virtual unsigned GetFormat() OVERRIDE; |
| 178 virtual VSyncProvider* GetVSyncProvider() OVERRIDE; | 180 virtual VSyncProvider* GetVSyncProvider() OVERRIDE; |
| 179 virtual bool ScheduleOverlayPlane(int z_order, | 181 virtual bool ScheduleOverlayPlane(int z_order, |
| 180 OverlayTransform transform, | 182 OverlayTransform transform, |
| 181 GLImage* image, | 183 GLImage* image, |
| 182 const Rect& bounds_rect, | 184 const Rect& bounds_rect, |
| 183 const RectF& crop_rect) OVERRIDE; | 185 const RectF& crop_rect) OVERRIDE; |
| 186 virtual bool IsSurfaceless() const OVERRIDE; |
| 184 | 187 |
| 185 GLSurface* surface() const { return surface_.get(); } | 188 GLSurface* surface() const { return surface_.get(); } |
| 186 | 189 |
| 187 protected: | 190 protected: |
| 188 virtual ~GLSurfaceAdapter(); | 191 virtual ~GLSurfaceAdapter(); |
| 189 | 192 |
| 190 private: | 193 private: |
| 191 scoped_refptr<GLSurface> surface_; | 194 scoped_refptr<GLSurface> surface_; |
| 192 | 195 |
| 193 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 196 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 194 }; | 197 }; |
| 195 | 198 |
| 196 } // namespace gfx | 199 } // namespace gfx |
| 197 | 200 |
| 198 #endif // UI_GL_GL_SURFACE_H_ | 201 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |