| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_OUTPUT_DIRECT_RENDERER_H_ | 5 #ifndef CC_OUTPUT_DIRECT_RENDERER_H_ |
| 6 #define CC_OUTPUT_DIRECT_RENDERER_H_ | 6 #define CC_OUTPUT_DIRECT_RENDERER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 const gfx::Rect& render_pass_scissor, | 84 const gfx::Rect& render_pass_scissor, |
| 85 bool* should_skip_quad); | 85 bool* should_skip_quad); |
| 86 void SetScissorTestRectInDrawSpace(const DrawingFrame* frame, | 86 void SetScissorTestRectInDrawSpace(const DrawingFrame* frame, |
| 87 const gfx::Rect& draw_space_rect); | 87 const gfx::Rect& draw_space_rect); |
| 88 | 88 |
| 89 static gfx::Size RenderPassTextureSize(const RenderPass* render_pass); | 89 static gfx::Size RenderPassTextureSize(const RenderPass* render_pass); |
| 90 | 90 |
| 91 void DrawRenderPass(DrawingFrame* frame, const RenderPass* render_pass); | 91 void DrawRenderPass(DrawingFrame* frame, const RenderPass* render_pass); |
| 92 bool UseRenderPass(DrawingFrame* frame, const RenderPass* render_pass); | 92 bool UseRenderPass(DrawingFrame* frame, const RenderPass* render_pass); |
| 93 | 93 |
| 94 void RunOnDemandRasterTask(Task* on_demand_raster_task); | |
| 95 | |
| 96 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; | 94 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; |
| 97 virtual bool BindFramebufferToTexture(DrawingFrame* frame, | 95 virtual bool BindFramebufferToTexture(DrawingFrame* frame, |
| 98 const ScopedResource* resource, | 96 const ScopedResource* resource, |
| 99 const gfx::Rect& target_rect) = 0; | 97 const gfx::Rect& target_rect) = 0; |
| 100 virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) = 0; | 98 virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) = 0; |
| 101 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; | 99 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; |
| 102 virtual void DiscardPixels(bool has_external_stencil_test, | 100 virtual void DiscardPixels(bool has_external_stencil_test, |
| 103 bool draw_rect_covers_full_surface) = 0; | 101 bool draw_rect_covers_full_surface) = 0; |
| 104 virtual void ClearFramebuffer(DrawingFrame* frame, | 102 virtual void ClearFramebuffer(DrawingFrame* frame, |
| 105 bool has_external_stencil_test) = 0; | 103 bool has_external_stencil_test) = 0; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 127 // framebuffer. During a draw, this stores the values for the current render | 125 // framebuffer. During a draw, this stores the values for the current render |
| 128 // pass; in between draws, they retain the values for the root render pass of | 126 // pass; in between draws, they retain the values for the root render pass of |
| 129 // the last draw. | 127 // the last draw. |
| 130 gfx::Rect current_draw_rect_; | 128 gfx::Rect current_draw_rect_; |
| 131 gfx::Rect current_viewport_rect_; | 129 gfx::Rect current_viewport_rect_; |
| 132 gfx::Size current_surface_size_; | 130 gfx::Size current_surface_size_; |
| 133 | 131 |
| 134 private: | 132 private: |
| 135 gfx::Vector2d enlarge_pass_texture_amount_; | 133 gfx::Vector2d enlarge_pass_texture_amount_; |
| 136 | 134 |
| 137 NamespaceToken on_demand_task_namespace_; | |
| 138 | |
| 139 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 135 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 140 }; | 136 }; |
| 141 | 137 |
| 142 } // namespace cc | 138 } // namespace cc |
| 143 | 139 |
| 144 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 140 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
| OLD | NEW |