| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 UMA_HISTOGRAM_COUNTS( | 197 UMA_HISTOGRAM_COUNTS( |
| 198 "Renderer4.renderPassCount", | 198 "Renderer4.renderPassCount", |
| 199 base::saturated_cast<int>(render_passes_in_draw_order->size())); | 199 base::saturated_cast<int>(render_passes_in_draw_order->size())); |
| 200 | 200 |
| 201 const RenderPass* root_render_pass = render_passes_in_draw_order->back(); | 201 const RenderPass* root_render_pass = render_passes_in_draw_order->back(); |
| 202 DCHECK(root_render_pass); | 202 DCHECK(root_render_pass); |
| 203 | 203 |
| 204 DrawingFrame frame; | 204 DrawingFrame frame; |
| 205 frame.render_passes_in_draw_order = render_passes_in_draw_order; | 205 frame.render_passes_in_draw_order = render_passes_in_draw_order; |
| 206 frame.root_render_pass = root_render_pass; | 206 frame.root_render_pass = root_render_pass; |
| 207 frame.root_damage_rect = Capabilities().using_partial_swap | 207 frame.root_damage_rect = root_render_pass->damage_rect; |
| 208 ? root_render_pass->damage_rect | |
| 209 : root_render_pass->output_rect; | |
| 210 frame.root_damage_rect.Union(next_root_damage_rect_); | 208 frame.root_damage_rect.Union(next_root_damage_rect_); |
| 211 next_root_damage_rect_ = gfx::Rect(); | 209 next_root_damage_rect_ = gfx::Rect(); |
| 212 frame.root_damage_rect.Intersect(gfx::Rect(device_viewport_rect.size())); | 210 frame.root_damage_rect.Intersect(gfx::Rect(device_viewport_rect.size())); |
| 213 frame.device_viewport_rect = device_viewport_rect; | 211 frame.device_viewport_rect = device_viewport_rect; |
| 214 frame.device_clip_rect = device_clip_rect; | 212 frame.device_clip_rect = device_clip_rect; |
| 215 frame.disable_picture_quad_image_filtering = | 213 frame.disable_picture_quad_image_filtering = |
| 216 disable_picture_quad_image_filtering; | 214 disable_picture_quad_image_filtering; |
| 217 | 215 |
| 218 EnsureBackbuffer(); | 216 EnsureBackbuffer(); |
| 219 | 217 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 ScopedResource* texture = render_pass_textures_.get(id); | 568 ScopedResource* texture = render_pass_textures_.get(id); |
| 571 return texture && texture->id(); | 569 return texture && texture->id(); |
| 572 } | 570 } |
| 573 | 571 |
| 574 // static | 572 // static |
| 575 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 573 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
| 576 return render_pass->output_rect.size(); | 574 return render_pass->output_rect.size(); |
| 577 } | 575 } |
| 578 | 576 |
| 579 } // namespace cc | 577 } // namespace cc |
| OLD | NEW |