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 #include "cc/output/direct_renderer.h" | 5 #include "cc/output/direct_renderer.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 render_passes_in_draw_order.size()); | 182 render_passes_in_draw_order.size()); |
183 | 183 |
184 const RenderPass* root_render_pass = render_passes_in_draw_order.back(); | 184 const RenderPass* root_render_pass = render_passes_in_draw_order.back(); |
185 DCHECK(root_render_pass); | 185 DCHECK(root_render_pass); |
186 | 186 |
187 DrawingFrame frame; | 187 DrawingFrame frame; |
188 frame.root_render_pass = root_render_pass; | 188 frame.root_render_pass = root_render_pass; |
189 frame.root_damage_rect = | 189 frame.root_damage_rect = |
190 Capabilities().using_partial_swap ? | 190 Capabilities().using_partial_swap ? |
191 root_render_pass->damage_rect : root_render_pass->output_rect; | 191 root_render_pass->damage_rect : root_render_pass->output_rect; |
192 frame.root_damage_rect.Intersect(gfx::Rect(gfx::Point(), ViewportSize())); | 192 frame.root_damage_rect.Intersect(gfx::Rect(ViewportSize())); |
193 | 193 |
194 BeginDrawingFrame(frame); | 194 BeginDrawingFrame(frame); |
195 for (size_t i = 0; i < render_passes_in_draw_order.size(); ++i) | 195 for (size_t i = 0; i < render_passes_in_draw_order.size(); ++i) |
196 DrawRenderPass(frame, render_passes_in_draw_order[i]); | 196 DrawRenderPass(frame, render_passes_in_draw_order[i]); |
197 FinishDrawingFrame(frame); | 197 FinishDrawingFrame(frame); |
198 | 198 |
199 render_passes_in_draw_order.clear(); | 199 render_passes_in_draw_order.clear(); |
200 } | 200 } |
201 | 201 |
202 gfx::RectF DirectRenderer::ComputeScissorRectForRenderPass( | 202 gfx::RectF DirectRenderer::ComputeScissorRectForRenderPass( |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 336 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
337 return render_pass->output_rect.size(); | 337 return render_pass->output_rect.size(); |
338 } | 338 } |
339 | 339 |
340 // static | 340 // static |
341 GLenum DirectRenderer::RenderPassTextureFormat(const RenderPass* render_pass) { | 341 GLenum DirectRenderer::RenderPassTextureFormat(const RenderPass* render_pass) { |
342 return GL_RGBA; | 342 return GL_RGBA; |
343 } | 343 } |
344 | 344 |
345 } // namespace cc | 345 } // namespace cc |
OLD | NEW |