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" |
11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
12 #include "cc/base/scoped_ptr_deque.h" | |
13 #include "cc/output/overlay_processor.h" | 12 #include "cc/output/overlay_processor.h" |
14 #include "cc/output/renderer.h" | 13 #include "cc/output/renderer.h" |
15 #include "cc/raster/task_graph_runner.h" | 14 #include "cc/raster/task_graph_runner.h" |
16 #include "cc/resources/resource_provider.h" | 15 #include "cc/resources/resource_provider.h" |
17 #include "cc/resources/scoped_resource.h" | 16 #include "cc/resources/scoped_resource.h" |
18 #include "ui/gfx/geometry/quad_f.h" | 17 #include "ui/gfx/geometry/quad_f.h" |
19 | 18 |
20 namespace cc { | 19 namespace cc { |
21 | 20 |
22 class DrawPolygon; | 21 class DrawPolygon; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 const DrawQuad& quad, | 96 const DrawQuad& quad, |
98 const gfx::Rect& render_pass_scissor, | 97 const gfx::Rect& render_pass_scissor, |
99 bool use_render_pass_scissor); | 98 bool use_render_pass_scissor); |
100 bool ShouldSkipQuad(const DrawQuad& quad, | 99 bool ShouldSkipQuad(const DrawQuad& quad, |
101 const gfx::Rect& render_pass_scissor); | 100 const gfx::Rect& render_pass_scissor); |
102 void SetScissorTestRectInDrawSpace(const DrawingFrame* frame, | 101 void SetScissorTestRectInDrawSpace(const DrawingFrame* frame, |
103 const gfx::Rect& draw_space_rect); | 102 const gfx::Rect& draw_space_rect); |
104 | 103 |
105 static gfx::Size RenderPassTextureSize(const RenderPass* render_pass); | 104 static gfx::Size RenderPassTextureSize(const RenderPass* render_pass); |
106 | 105 |
107 void FlushPolygons(ScopedPtrDeque<DrawPolygon>* poly_list, | 106 void FlushPolygons(std::deque<scoped_ptr<DrawPolygon>>* poly_list, |
108 DrawingFrame* frame, | 107 DrawingFrame* frame, |
109 const gfx::Rect& render_pass_scissor, | 108 const gfx::Rect& render_pass_scissor, |
110 bool use_render_pass_scissor); | 109 bool use_render_pass_scissor); |
111 void DrawRenderPass(DrawingFrame* frame, const RenderPass* render_pass); | 110 void DrawRenderPass(DrawingFrame* frame, const RenderPass* render_pass); |
112 bool UseRenderPass(DrawingFrame* frame, const RenderPass* render_pass); | 111 bool UseRenderPass(DrawingFrame* frame, const RenderPass* render_pass); |
113 | 112 |
114 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; | 113 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; |
115 virtual bool BindFramebufferToTexture(DrawingFrame* frame, | 114 virtual bool BindFramebufferToTexture(DrawingFrame* frame, |
116 const ScopedResource* resource, | 115 const ScopedResource* resource, |
117 const gfx::Rect& target_rect) = 0; | 116 const gfx::Rect& target_rect) = 0; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 157 |
159 private: | 158 private: |
160 gfx::Vector2d enlarge_pass_texture_amount_; | 159 gfx::Vector2d enlarge_pass_texture_amount_; |
161 | 160 |
162 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 161 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
163 }; | 162 }; |
164 | 163 |
165 } // namespace cc | 164 } // namespace cc |
166 | 165 |
167 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 166 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
OLD | NEW |