| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 output_surface_plane.overlay_handled = true; | 303 output_surface_plane.overlay_handled = true; |
| 304 current_frame()->overlay_list.push_back(output_surface_plane); | 304 current_frame()->overlay_list.push_back(output_surface_plane); |
| 305 } | 305 } |
| 306 | 306 |
| 307 // Attempt to replace some or all of the quads of the root render pass with | 307 // Attempt to replace some or all of the quads of the root render pass with |
| 308 // overlays. | 308 // overlays. |
| 309 overlay_processor_->ProcessForOverlays( | 309 overlay_processor_->ProcessForOverlays( |
| 310 resource_provider_, root_render_pass, render_pass_filters_, | 310 resource_provider_, root_render_pass, render_pass_filters_, |
| 311 render_pass_background_filters_, ¤t_frame()->overlay_list, | 311 render_pass_background_filters_, ¤t_frame()->overlay_list, |
| 312 ¤t_frame()->ca_layer_overlay_list, | 312 ¤t_frame()->ca_layer_overlay_list, |
| 313 ¤t_frame()->root_damage_rect); | 313 ¤t_frame()->root_damage_rect, |
| 314 ¤t_frame()->root_content_bounds); |
| 314 | 315 |
| 315 // We can skip all drawing if the damage rect is now empty. | 316 // We can skip all drawing if the damage rect is now empty. |
| 316 bool skip_drawing_root_render_pass = | 317 bool skip_drawing_root_render_pass = |
| 317 current_frame()->root_damage_rect.IsEmpty() && allow_empty_swap_; | 318 current_frame()->root_damage_rect.IsEmpty() && allow_empty_swap_; |
| 318 | 319 |
| 319 // If we have to draw but don't support partial swap, the whole output should | 320 // If we have to draw but don't support partial swap, the whole output should |
| 320 // be considered damaged. | 321 // be considered damaged. |
| 321 if (!skip_drawing_root_render_pass && !use_partial_swap_) | 322 if (!skip_drawing_root_render_pass && !use_partial_swap_) |
| 322 current_frame()->root_damage_rect = root_render_pass->output_rect; | 323 current_frame()->root_damage_rect = root_render_pass->output_rect; |
| 323 | 324 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 626 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
| 626 return render_pass->output_rect.size(); | 627 return render_pass->output_rect.size(); |
| 627 } | 628 } |
| 628 | 629 |
| 629 void DirectRenderer::SetCurrentFrameForTesting(const DrawingFrame& frame) { | 630 void DirectRenderer::SetCurrentFrameForTesting(const DrawingFrame& frame) { |
| 630 current_frame_valid_ = true; | 631 current_frame_valid_ = true; |
| 631 current_frame_ = frame; | 632 current_frame_ = frame; |
| 632 } | 633 } |
| 633 | 634 |
| 634 } // namespace cc | 635 } // namespace cc |
| OLD | NEW |