| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // main framebuffer located at index 0. For the case where there is no | 164 // main framebuffer located at index 0. For the case where there is no |
| 165 // main framebuffer, overlays may be scheduled at 0, taking its place. | 165 // main framebuffer, overlays may be scheduled at 0, taking its place. |
| 166 // |transform| specifies how the buffer is to be transformed during | 166 // |transform| specifies how the buffer is to be transformed during |
| 167 // composition. | 167 // composition. |
| 168 // |image| to be presented by the overlay. | 168 // |image| to be presented by the overlay. |
| 169 // |bounds_rect| specify where it is supposed to be on the screen in pixels. | 169 // |bounds_rect| specify where it is supposed to be on the screen in pixels. |
| 170 // |crop_rect| specifies the region within the buffer to be placed inside | 170 // |crop_rect| specifies the region within the buffer to be placed inside |
| 171 // |bounds_rect|. | 171 // |bounds_rect|. |
| 172 virtual bool ScheduleOverlayPlane(int z_order, | 172 virtual bool ScheduleOverlayPlane(int z_order, |
| 173 gfx::OverlayTransform transform, | 173 gfx::OverlayTransform transform, |
| 174 gl::GLImage* image, | 174 GLImage* image, |
| 175 const gfx::Rect& bounds_rect, | 175 const gfx::Rect& bounds_rect, |
| 176 const gfx::RectF& crop_rect); | 176 const gfx::RectF& crop_rect); |
| 177 | 177 |
| 178 // Schedule a CALayer to be shown at swap time. | 178 // Schedule a CALayer to be shown at swap time. |
| 179 // All arguments correspond to their CALayer properties. | 179 // All arguments correspond to their CALayer properties. |
| 180 virtual bool ScheduleCALayer(gl::GLImage* contents_image, | 180 virtual bool ScheduleCALayer(GLImage* contents_image, |
| 181 const gfx::RectF& contents_rect, | 181 const gfx::RectF& contents_rect, |
| 182 float opacity, | 182 float opacity, |
| 183 unsigned background_color, | 183 unsigned background_color, |
| 184 unsigned edge_aa_mask, | 184 unsigned edge_aa_mask, |
| 185 const gfx::RectF& rect, | 185 const gfx::RectF& rect, |
| 186 bool is_clipped, | 186 bool is_clipped, |
| 187 const gfx::RectF& clip_rect, | 187 const gfx::RectF& clip_rect, |
| 188 const gfx::Transform& transform, | 188 const gfx::Transform& transform, |
| 189 int sorting_content_id, | 189 int sorting_content_id, |
| 190 unsigned filter); | 190 unsigned filter); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 bool OnMakeCurrent(GLContext* context) override; | 277 bool OnMakeCurrent(GLContext* context) override; |
| 278 bool SetBackbufferAllocation(bool allocated) override; | 278 bool SetBackbufferAllocation(bool allocated) override; |
| 279 void SetFrontbufferAllocation(bool allocated) override; | 279 void SetFrontbufferAllocation(bool allocated) override; |
| 280 void* GetShareHandle() override; | 280 void* GetShareHandle() override; |
| 281 void* GetDisplay() override; | 281 void* GetDisplay() override; |
| 282 void* GetConfig() override; | 282 void* GetConfig() override; |
| 283 GLSurface::Format GetFormat() override; | 283 GLSurface::Format GetFormat() override; |
| 284 gfx::VSyncProvider* GetVSyncProvider() override; | 284 gfx::VSyncProvider* GetVSyncProvider() override; |
| 285 bool ScheduleOverlayPlane(int z_order, | 285 bool ScheduleOverlayPlane(int z_order, |
| 286 gfx::OverlayTransform transform, | 286 gfx::OverlayTransform transform, |
| 287 gl::GLImage* image, | 287 GLImage* image, |
| 288 const gfx::Rect& bounds_rect, | 288 const gfx::Rect& bounds_rect, |
| 289 const gfx::RectF& crop_rect) override; | 289 const gfx::RectF& crop_rect) override; |
| 290 bool IsSurfaceless() const override; | 290 bool IsSurfaceless() const override; |
| 291 bool FlipsVertically() const override; | 291 bool FlipsVertically() const override; |
| 292 bool BuffersFlipped() const override; | 292 bool BuffersFlipped() const override; |
| 293 | 293 |
| 294 GLSurface* surface() const { return surface_.get(); } | 294 GLSurface* surface() const { return surface_.get(); } |
| 295 | 295 |
| 296 protected: | 296 protected: |
| 297 ~GLSurfaceAdapter() override; | 297 ~GLSurfaceAdapter() override; |
| 298 | 298 |
| 299 private: | 299 private: |
| 300 scoped_refptr<GLSurface> surface_; | 300 scoped_refptr<GLSurface> surface_; |
| 301 | 301 |
| 302 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 302 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 303 }; | 303 }; |
| 304 | 304 |
| 305 } // namespace gl | 305 } // namespace gl |
| 306 | 306 |
| 307 #endif // UI_GL_GL_SURFACE_H_ | 307 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |