| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 output_surface_plane.overlay_handled = true; | 304 output_surface_plane.overlay_handled = true; |
| 305 current_frame()->overlay_list.push_back(output_surface_plane); | 305 current_frame()->overlay_list.push_back(output_surface_plane); |
| 306 } | 306 } |
| 307 | 307 |
| 308 // Attempt to replace some or all of the quads of the root render pass with | 308 // Attempt to replace some or all of the quads of the root render pass with |
| 309 // overlays. | 309 // overlays. |
| 310 overlay_processor_->ProcessForOverlays( | 310 overlay_processor_->ProcessForOverlays( |
| 311 resource_provider_, root_render_pass, render_pass_filters_, | 311 resource_provider_, root_render_pass, render_pass_filters_, |
| 312 render_pass_background_filters_, ¤t_frame()->overlay_list, | 312 render_pass_background_filters_, ¤t_frame()->overlay_list, |
| 313 ¤t_frame()->ca_layer_overlay_list, | 313 ¤t_frame()->ca_layer_overlay_list, |
| 314 ¤t_frame()->dc_layer_overlay_list, |
| 314 ¤t_frame()->root_damage_rect, | 315 ¤t_frame()->root_damage_rect, |
| 315 ¤t_frame()->root_content_bounds); | 316 ¤t_frame()->root_content_bounds); |
| 316 | 317 |
| 317 // We can skip all drawing if the damage rect is now empty. | 318 // We can skip all drawing if the damage rect is now empty. |
| 318 bool skip_drawing_root_render_pass = | 319 bool skip_drawing_root_render_pass = |
| 319 current_frame()->root_damage_rect.IsEmpty() && allow_empty_swap_; | 320 current_frame()->root_damage_rect.IsEmpty() && allow_empty_swap_; |
| 320 | 321 |
| 321 // If we have to draw but don't support partial swap, the whole output should | 322 // If we have to draw but don't support partial swap, the whole output should |
| 322 // be considered damaged. | 323 // be considered damaged. |
| 323 if (!skip_drawing_root_render_pass && !use_partial_swap_) | 324 if (!skip_drawing_root_render_pass && !use_partial_swap_) |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 637 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
| 637 return render_pass->output_rect.size(); | 638 return render_pass->output_rect.size(); |
| 638 } | 639 } |
| 639 | 640 |
| 640 void DirectRenderer::SetCurrentFrameForTesting(const DrawingFrame& frame) { | 641 void DirectRenderer::SetCurrentFrameForTesting(const DrawingFrame& frame) { |
| 641 current_frame_valid_ = true; | 642 current_frame_valid_ = true; |
| 642 current_frame_ = frame; | 643 current_frame_ = frame; |
| 643 } | 644 } |
| 644 | 645 |
| 645 } // namespace cc | 646 } // namespace cc |
| OLD | NEW |