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

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

Issue 1044093005: Preliminary compositor disabling patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove renderpass calculation Created 5 years, 8 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/gl_renderer.cc ('k') | cc/quads/draw_quad.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/overlay_strategy_single_on_top.h" 5 #include "cc/output/overlay_strategy_single_on_top.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "cc/quads/draw_quad.h" 9 #include "cc/quads/draw_quad.h"
10 #include "cc/quads/solid_color_draw_quad.h" 10 #include "cc/quads/solid_color_draw_quad.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // Add the overlay. 180 // Add the overlay.
181 candidate.plane_z_order = 1; 181 candidate.plane_z_order = 1;
182 candidates.push_back(candidate); 182 candidates.push_back(candidate);
183 183
184 // Check for support. 184 // Check for support.
185 capability_checker_->CheckOverlaySupport(&candidates); 185 capability_checker_->CheckOverlaySupport(&candidates);
186 186
187 // If the candidate can be handled by an overlay, create a pass for it. 187 // If the candidate can be handled by an overlay, create a pass for it.
188 if (candidates[1].overlay_handled) { 188 if (candidates[1].overlay_handled) {
189 quad_list.EraseAndInvalidateAllPointers(candidate_iterator); 189 quad_list.EraseAndInvalidateAllPointers(candidate_iterator);
190 root_render_pass->overlay_rect = gfx::Rect();
191 for (const auto* quad : root_render_pass->quad_list) {
192 if (quad->damaged) {
193 gfx::RectF rect = gfx::RectF(quad->visible_rect);
194 quad->quadTransform().TransformRect(&rect);
195 root_render_pass->overlay_rect.Union(gfx::ToEnclosingRect(rect));
196 }
197 }
190 candidate_list->swap(candidates); 198 candidate_list->swap(candidates);
191 return true; 199 return true;
192 } 200 }
193 return false; 201 return false;
194 } 202 }
195 203
196 } // namespace cc 204 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/quads/draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698