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 <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 } | 187 } |
188 } | 188 } |
189 | 189 |
190 void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, | 190 void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, |
191 float device_scale_factor, | 191 float device_scale_factor, |
192 const gfx::Rect& device_viewport_rect, | 192 const gfx::Rect& device_viewport_rect, |
193 const gfx::Rect& device_clip_rect, | 193 const gfx::Rect& device_clip_rect, |
194 bool disable_picture_quad_image_filtering) { | 194 bool disable_picture_quad_image_filtering) { |
195 TRACE_EVENT0("cc", "DirectRenderer::DrawFrame"); | 195 TRACE_EVENT0("cc", "DirectRenderer::DrawFrame"); |
196 UMA_HISTOGRAM_COUNTS("Renderer4.renderPassCount", | 196 UMA_HISTOGRAM_COUNTS("Renderer4.renderPassCount", |
197 render_passes_in_draw_order->size()); | 197 static_cast<int>(render_passes_in_draw_order->size())); |
198 | 198 |
199 const RenderPass* root_render_pass = render_passes_in_draw_order->back(); | 199 const RenderPass* root_render_pass = render_passes_in_draw_order->back(); |
200 DCHECK(root_render_pass); | 200 DCHECK(root_render_pass); |
201 | 201 |
202 DrawingFrame frame; | 202 DrawingFrame frame; |
203 frame.render_passes_in_draw_order = render_passes_in_draw_order; | 203 frame.render_passes_in_draw_order = render_passes_in_draw_order; |
204 frame.root_render_pass = root_render_pass; | 204 frame.root_render_pass = root_render_pass; |
205 frame.root_damage_rect = Capabilities().using_partial_swap | 205 frame.root_damage_rect = Capabilities().using_partial_swap |
206 ? root_render_pass->damage_rect | 206 ? root_render_pass->damage_rect |
207 : root_render_pass->output_rect; | 207 : root_render_pass->output_rect; |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 ScopedResource* texture = render_pass_textures_.get(id); | 518 ScopedResource* texture = render_pass_textures_.get(id); |
519 return texture && texture->id(); | 519 return texture && texture->id(); |
520 } | 520 } |
521 | 521 |
522 // static | 522 // static |
523 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 523 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
524 return render_pass->output_rect.size(); | 524 return render_pass->output_rect.size(); |
525 } | 525 } |
526 | 526 |
527 } // namespace cc | 527 } // namespace cc |
OLD | NEW |