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

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

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