Chromium Code Reviews| 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 // Releases the read lock from GpuMemoryBuffer resources that are no longer in | |
| 262 // use by the Window Server. | |
| 263 void ReleaseGpuMemoryBufferResources(); | |
| 264 | |
| 261 using OverlayResourceLockList = | 265 using OverlayResourceLockList = |
| 262 std::vector<std::unique_ptr<ResourceProvider::ScopedReadLockGL>>; | 266 std::vector<std::unique_ptr<ResourceProvider::ScopedReadLockGL>>; |
| 263 OverlayResourceLockList pending_overlay_resources_; | 267 OverlayResourceLockList pending_overlay_resources_; |
| 264 std::deque<OverlayResourceLockList> swapped_overlay_resources_; | 268 std::deque<OverlayResourceLockList> swapped_overlay_resources_; |
| 265 | 269 |
| 270 using GmbResourceLockList = std::vector< | |
| 271 std::unique_ptr<ResourceProvider::ScopedReadLockGpuMemoryBuffer>>; | |
| 272 | |
| 273 // GpuMemoryBuffers that have been sent to the GPU process for display. | |
| 274 GmbResourceLockList pending_gmb_resources_; | |
| 275 | |
| 276 // GpuMemoryBuffers that are known to have been received by the Window Server. | |
| 277 std::deque<GmbResourceLockList> in_use_gmb_resources_; | |
|
ccameron
2016/05/17 03:36:38
Couple of things:
1. This logic should be shared
erikchen
2016/05/17 22:13:20
Done.
| |
| 278 | |
| 266 RendererCapabilitiesImpl capabilities_; | 279 RendererCapabilitiesImpl capabilities_; |
| 267 | 280 |
| 268 unsigned offscreen_framebuffer_id_; | 281 unsigned offscreen_framebuffer_id_; |
| 269 | 282 |
| 270 std::unique_ptr<StaticGeometryBinding> shared_geometry_; | 283 std::unique_ptr<StaticGeometryBinding> shared_geometry_; |
| 271 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_; | 284 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_; |
| 272 gfx::QuadF shared_geometry_quad_; | 285 gfx::QuadF shared_geometry_quad_; |
| 273 | 286 |
| 274 // This block of bindings defines all of the programs used by the compositor | 287 // This block of bindings defines all of the programs used by the compositor |
| 275 // itself. Add any new programs here to GLRendererShaderTest. | 288 // itself. Add any new programs here to GLRendererShaderTest. |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 522 | 535 |
| 523 SkBitmap on_demand_tile_raster_bitmap_; | 536 SkBitmap on_demand_tile_raster_bitmap_; |
| 524 ResourceId on_demand_tile_raster_resource_id_; | 537 ResourceId on_demand_tile_raster_resource_id_; |
| 525 BoundGeometry bound_geometry_; | 538 BoundGeometry bound_geometry_; |
| 526 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 539 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| 527 }; | 540 }; |
| 528 | 541 |
| 529 } // namespace cc | 542 } // namespace cc |
| 530 | 543 |
| 531 #endif // CC_OUTPUT_GL_RENDERER_H_ | 544 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |