| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void GetFramebufferTexture(unsigned texture_id, | 82 void GetFramebufferTexture(unsigned texture_id, |
| 83 const gfx::Rect& device_rect); | 83 const gfx::Rect& device_rect); |
| 84 void ReleaseRenderPassTextures(); | 84 void ReleaseRenderPassTextures(); |
| 85 enum BoundGeometry { NO_BINDING, SHARED_BINDING, CLIPPED_BINDING }; | 85 enum BoundGeometry { NO_BINDING, SHARED_BINDING, CLIPPED_BINDING }; |
| 86 void PrepareGeometry(BoundGeometry geometry_to_bind); | 86 void PrepareGeometry(BoundGeometry geometry_to_bind); |
| 87 void SetStencilEnabled(bool enabled); | 87 void SetStencilEnabled(bool enabled); |
| 88 bool stencil_enabled() const { return stencil_shadow_; } | 88 bool stencil_enabled() const { return stencil_shadow_; } |
| 89 void SetBlendEnabled(bool enabled); | 89 void SetBlendEnabled(bool enabled); |
| 90 bool blend_enabled() const { return blend_shadow_; } | 90 bool blend_enabled() const { return blend_shadow_; } |
| 91 | 91 |
| 92 bool CanPartialSwap() override; |
| 92 void BindFramebufferToOutputSurface(DrawingFrame* frame) override; | 93 void BindFramebufferToOutputSurface(DrawingFrame* frame) override; |
| 93 bool BindFramebufferToTexture(DrawingFrame* frame, | 94 bool BindFramebufferToTexture(DrawingFrame* frame, |
| 94 const ScopedResource* resource) override; | 95 const ScopedResource* resource) override; |
| 95 void SetScissorTestRect(const gfx::Rect& scissor_rect) override; | 96 void SetScissorTestRect(const gfx::Rect& scissor_rect) override; |
| 96 void PrepareSurfaceForPass(DrawingFrame* frame, | 97 void PrepareSurfaceForPass(DrawingFrame* frame, |
| 97 SurfaceInitializationMode initialization_mode, | 98 SurfaceInitializationMode initialization_mode, |
| 98 const gfx::Rect& render_pass_scissor) override; | 99 const gfx::Rect& render_pass_scissor) override; |
| 99 void DoDrawQuad(DrawingFrame* frame, | 100 void DoDrawQuad(DrawingFrame* frame, |
| 100 const class DrawQuad*, | 101 const class DrawQuad*, |
| 101 const gfx::QuadF* draw_region) override; | 102 const gfx::QuadF* draw_region) override; |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 516 |
| 516 std::unique_ptr<ResourceProvider::ScopedWriteLockGL> | 517 std::unique_ptr<ResourceProvider::ScopedWriteLockGL> |
| 517 current_framebuffer_lock_; | 518 current_framebuffer_lock_; |
| 518 // This is valid when current_framebuffer_lock_ is not null. | 519 // This is valid when current_framebuffer_lock_ is not null. |
| 519 ResourceFormat current_framebuffer_format_; | 520 ResourceFormat current_framebuffer_format_; |
| 520 | 521 |
| 521 class SyncQuery; | 522 class SyncQuery; |
| 522 std::deque<std::unique_ptr<SyncQuery>> pending_sync_queries_; | 523 std::deque<std::unique_ptr<SyncQuery>> pending_sync_queries_; |
| 523 std::deque<std::unique_ptr<SyncQuery>> available_sync_queries_; | 524 std::deque<std::unique_ptr<SyncQuery>> available_sync_queries_; |
| 524 std::unique_ptr<SyncQuery> current_sync_query_; | 525 std::unique_ptr<SyncQuery> current_sync_query_; |
| 526 bool use_discard_framebuffer_; |
| 525 bool use_sync_query_; | 527 bool use_sync_query_; |
| 526 bool use_blend_equation_advanced_; | 528 bool use_blend_equation_advanced_; |
| 527 bool use_blend_equation_advanced_coherent_; | 529 bool use_blend_equation_advanced_coherent_; |
| 528 | 530 |
| 529 // Some overlays require that content is copied from a render pass into an | 531 // Some overlays require that content is copied from a render pass into an |
| 530 // overlay resource. This means the GLRenderer needs its own ResourcePool. | 532 // overlay resource. This means the GLRenderer needs its own ResourcePool. |
| 531 std::unique_ptr<ResourcePool> overlay_resource_pool_; | 533 std::unique_ptr<ResourcePool> overlay_resource_pool_; |
| 532 | 534 |
| 533 // If true, draw a green border after compositing a texture quad using GL. | 535 // If true, draw a green border after compositing a texture quad using GL. |
| 534 bool gl_composited_texture_quad_border_; | 536 bool gl_composited_texture_quad_border_; |
| 535 | 537 |
| 536 // The method FlippedFramebuffer determines whether the framebuffer associated | 538 // The method FlippedFramebuffer determines whether the framebuffer associated |
| 537 // with a DrawingFrame is flipped. It makes the assumption that the | 539 // with a DrawingFrame is flipped. It makes the assumption that the |
| 538 // DrawingFrame is being used as part of a render pass. If a DrawingFrame is | 540 // DrawingFrame is being used as part of a render pass. If a DrawingFrame is |
| 539 // not being used as part of a render pass, setting it here forces | 541 // not being used as part of a render pass, setting it here forces |
| 540 // FlippedFramebuffer to return |true|. | 542 // FlippedFramebuffer to return |true|. |
| 541 bool force_drawing_frame_framebuffer_unflipped_ = false; | 543 bool force_drawing_frame_framebuffer_unflipped_ = false; |
| 542 | 544 |
| 543 BoundGeometry bound_geometry_; | 545 BoundGeometry bound_geometry_; |
| 544 ColorLUTCache color_lut_cache_; | 546 ColorLUTCache color_lut_cache_; |
| 545 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 547 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| 546 }; | 548 }; |
| 547 | 549 |
| 548 } // namespace cc | 550 } // namespace cc |
| 549 | 551 |
| 550 #endif // CC_OUTPUT_GL_RENDERER_H_ | 552 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |