Chromium Code Reviews| 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); | 94 void RunOnDemandRasterTask(Task* on_demand_raster_task); |
|
reveman
2014/06/20 00:38:41
Do you still need this function or can derived cla
| |
| 95 | 95 |
| 96 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; | 96 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; |
| 97 virtual bool BindFramebufferToTexture(DrawingFrame* frame, | 97 virtual bool BindFramebufferToTexture(DrawingFrame* frame, |
| 98 const ScopedResource* resource, | 98 const ScopedResource* resource, |
| 99 const gfx::Rect& target_rect) = 0; | 99 const gfx::Rect& target_rect) = 0; |
| 100 virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) = 0; | 100 virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) = 0; |
| 101 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; | 101 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; |
| 102 virtual void DiscardPixels(bool has_external_stencil_test, | 102 virtual void DiscardPixels(bool has_external_stencil_test, |
| 103 bool draw_rect_covers_full_surface) = 0; | 103 bool draw_rect_covers_full_surface) = 0; |
| 104 virtual void ClearFramebuffer(DrawingFrame* frame, | 104 virtual void ClearFramebuffer(DrawingFrame* frame, |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 127 // framebuffer. During a draw, this stores the values for the current render | 127 // 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 | 128 // pass; in between draws, they retain the values for the root render pass of |
| 129 // the last draw. | 129 // the last draw. |
| 130 gfx::Rect current_draw_rect_; | 130 gfx::Rect current_draw_rect_; |
| 131 gfx::Rect current_viewport_rect_; | 131 gfx::Rect current_viewport_rect_; |
| 132 gfx::Size current_surface_size_; | 132 gfx::Size current_surface_size_; |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 gfx::Vector2d enlarge_pass_texture_amount_; | 135 gfx::Vector2d enlarge_pass_texture_amount_; |
| 136 | 136 |
| 137 NamespaceToken on_demand_task_namespace_; | |
| 138 | |
| 139 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 137 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 140 }; | 138 }; |
| 141 | 139 |
| 142 } // namespace cc | 140 } // namespace cc |
| 143 | 141 |
| 144 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 142 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
| OLD | NEW |