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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 void EnsureBackbuffer() override; | 267 void EnsureBackbuffer() override; |
268 void EnforceMemoryPolicy(); | 268 void EnforceMemoryPolicy(); |
269 | 269 |
270 void ScheduleCALayers(DrawingFrame* frame); | 270 void ScheduleCALayers(DrawingFrame* frame); |
271 void ScheduleOverlays(DrawingFrame* frame); | 271 void ScheduleOverlays(DrawingFrame* frame); |
272 | 272 |
273 // Copies the contents of the render pass to an overlay resource, returned in | 273 // Copies the contents of the render pass to an overlay resource, returned in |
274 // |resource|. The resource is allocated from |overlay_resource_pool_|. | 274 // |resource|. The resource is allocated from |overlay_resource_pool_|. |
275 void CopyRenderPassToOverlayResource(const RenderPassId& render_pass_id, | 275 void CopyRenderPassToOverlayResource(const RenderPassId& render_pass_id, |
276 Resource** resource); | 276 Resource** resource); |
| 277 // Copies the contents of the render pass draw quad, including filter effects, |
| 278 // to an overlay resource, returned in |resource|. The resource is allocated |
| 279 // from |overlay_resource_pool_|. |
| 280 // The resulting Resource may be larger than the original quad, so this |
| 281 // function may also modify properties of CALayerOverlay, including |
| 282 // |shared_state|. |
| 283 void CopyRenderPassDrawQuadToOverlayResource(CALayerOverlay* ca_layer_overlay, |
| 284 Resource** resource, |
| 285 DrawingFrame* frame); |
277 | 286 |
278 using OverlayResourceLock = | 287 using OverlayResourceLock = |
279 std::unique_ptr<ResourceProvider::ScopedReadLockGL>; | 288 std::unique_ptr<ResourceProvider::ScopedReadLockGL>; |
280 using OverlayResourceLockList = std::vector<OverlayResourceLock>; | 289 using OverlayResourceLockList = std::vector<OverlayResourceLock>; |
281 | 290 |
282 // Resources that have been sent to the GPU process, but not yet swapped. | 291 // Resources that have been sent to the GPU process, but not yet swapped. |
283 OverlayResourceLockList pending_overlay_resources_; | 292 OverlayResourceLockList pending_overlay_resources_; |
284 | 293 |
285 // Resources that should be shortly swapped by the GPU process. | 294 // Resources that should be shortly swapped by the GPU process. |
286 std::deque<OverlayResourceLockList> swapping_overlay_resources_; | 295 std::deque<OverlayResourceLockList> swapping_overlay_resources_; |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 std::deque<std::unique_ptr<SyncQuery>> available_sync_queries_; | 539 std::deque<std::unique_ptr<SyncQuery>> available_sync_queries_; |
531 std::unique_ptr<SyncQuery> current_sync_query_; | 540 std::unique_ptr<SyncQuery> current_sync_query_; |
532 bool use_sync_query_; | 541 bool use_sync_query_; |
533 bool use_blend_equation_advanced_; | 542 bool use_blend_equation_advanced_; |
534 bool use_blend_equation_advanced_coherent_; | 543 bool use_blend_equation_advanced_coherent_; |
535 | 544 |
536 // Some overlays require that content is copied from a render pass into an | 545 // Some overlays require that content is copied from a render pass into an |
537 // overlay resource. This means the GLRenderer needs its own ResourcePool. | 546 // overlay resource. This means the GLRenderer needs its own ResourcePool. |
538 std::unique_ptr<ResourcePool> overlay_resource_pool_; | 547 std::unique_ptr<ResourcePool> overlay_resource_pool_; |
539 | 548 |
| 549 // The method FlippedFramebuffer determines whether the framebuffer associated |
| 550 // with a DrawingFrame is flipped. It makes the assumption that the |
| 551 // DrawingFrame is being used as part of a render pass. If a DrawingFrame is |
| 552 // not being used as part of a render pass, setting it here forces |
| 553 // FlippedFramebuffer to return |true|. |
| 554 const DrawingFrame* force_drawing_frame_framebuffer_flipped_; |
| 555 |
540 BoundGeometry bound_geometry_; | 556 BoundGeometry bound_geometry_; |
541 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 557 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
542 }; | 558 }; |
543 | 559 |
544 } // namespace cc | 560 } // namespace cc |
545 | 561 |
546 #endif // CC_OUTPUT_GL_RENDERER_H_ | 562 #endif // CC_OUTPUT_GL_RENDERER_H_ |
OLD | NEW |