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

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

Issue 1454323002: Display skips swapping if overlays draw the damage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try skipping the swap at the cc::OutputSurface level Created 5 years, 1 month 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 | « no previous file | cc/output/gl_renderer.cc » ('j') | cc/output/gl_renderer.cc » ('J')
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 <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
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
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
OLDNEW
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | cc/output/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698