| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 CC_OUTPUT_GL_RENDERER_H_ | 5 #ifndef CC_OUTPUT_GL_RENDERER_H_ |
| 6 #define CC_OUTPUT_GL_RENDERER_H_ | 6 #define CC_OUTPUT_GL_RENDERER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 void RestoreGLState(); | 251 void RestoreGLState(); |
| 252 void RestoreFramebuffer(DrawingFrame* frame); | 252 void RestoreFramebuffer(DrawingFrame* frame); |
| 253 | 253 |
| 254 void DiscardBackbuffer() override; | 254 void DiscardBackbuffer() override; |
| 255 void EnsureBackbuffer() override; | 255 void EnsureBackbuffer() override; |
| 256 void EnforceMemoryPolicy(); | 256 void EnforceMemoryPolicy(); |
| 257 | 257 |
| 258 void ScheduleCALayers(DrawingFrame* frame); | 258 void ScheduleCALayers(DrawingFrame* frame); |
| 259 void ScheduleOverlays(DrawingFrame* frame); | 259 void ScheduleOverlays(DrawingFrame* frame); |
| 260 | 260 |
| 261 using OverlayResourceLock = | 261 using OverlayResourceLockList = |
| 262 std::unique_ptr<ResourceProvider::ScopedReadLockGpuMemoryBuffer>; | 262 std::vector<std::unique_ptr<ResourceProvider::ScopedReadLockGL>>; |
| 263 using OverlayResourceLockList = std::vector<OverlayResourceLock>; | |
| 264 | |
| 265 // Resources that have been sent to the GPU process, but not yet swapped. | |
| 266 OverlayResourceLockList pending_overlay_resources_; | 263 OverlayResourceLockList pending_overlay_resources_; |
| 267 | 264 std::deque<OverlayResourceLockList> swapped_overlay_resources_; |
| 268 // Resources that should be shortly swapped by the GPU process. | |
| 269 std::deque<OverlayResourceLockList> swapping_overlay_resources_; | |
| 270 | |
| 271 // Resources that the GPU process has finished swapping. | |
| 272 std::map<ResourceId, OverlayResourceLock> | |
| 273 swapped_and_acked_overlay_resources_; | |
| 274 | 265 |
| 275 RendererCapabilitiesImpl capabilities_; | 266 RendererCapabilitiesImpl capabilities_; |
| 276 | 267 |
| 277 unsigned offscreen_framebuffer_id_; | 268 unsigned offscreen_framebuffer_id_; |
| 278 | 269 |
| 279 std::unique_ptr<StaticGeometryBinding> shared_geometry_; | 270 std::unique_ptr<StaticGeometryBinding> shared_geometry_; |
| 280 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_; | 271 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_; |
| 281 gfx::QuadF shared_geometry_quad_; | 272 gfx::QuadF shared_geometry_quad_; |
| 282 | 273 |
| 283 // This block of bindings defines all of the programs used by the compositor | 274 // This block of bindings defines all of the programs used by the compositor |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 522 |
| 532 SkBitmap on_demand_tile_raster_bitmap_; | 523 SkBitmap on_demand_tile_raster_bitmap_; |
| 533 ResourceId on_demand_tile_raster_resource_id_; | 524 ResourceId on_demand_tile_raster_resource_id_; |
| 534 BoundGeometry bound_geometry_; | 525 BoundGeometry bound_geometry_; |
| 535 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 526 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| 536 }; | 527 }; |
| 537 | 528 |
| 538 } // namespace cc | 529 } // namespace cc |
| 539 | 530 |
| 540 #endif // CC_OUTPUT_GL_RENDERER_H_ | 531 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |