Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: cc/output/direct_renderer.cc

Issue 2736643004: Add DCLayerOverlayProcessor and supporting DCLayer structures. (Closed)
Patch Set: split CALayerOverlay into DCLayerOverlay Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_, &current_frame()->overlay_list, 312 render_pass_background_filters_, &current_frame()->overlay_list,
313 &current_frame()->ca_layer_overlay_list, 313 &current_frame()->ca_layer_overlay_list,
314 &current_frame()->dc_layer_overlay_list,
314 &current_frame()->root_damage_rect, 315 &current_frame()->root_damage_rect,
315 &current_frame()->root_content_bounds); 316 &current_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
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
OLDNEW
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698