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

Unified Diff: cc/output/overlay_strategy_single_on_top.cc

Issue 1311013002: [Ozone] Fix SingleOnTop issue by checking if the quad is clipped. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check if the quad is clipped before use overlay Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_strategy_single_on_top.cc
diff --git a/cc/output/overlay_strategy_single_on_top.cc b/cc/output/overlay_strategy_single_on_top.cc
index fd47e0f3b721096f55b0a531f47e75233b3926ff..a45787a2459e3e3279c2b7fac3181a53c9f7359d 100644
--- a/cc/output/overlay_strategy_single_on_top.cc
+++ b/cc/output/overlay_strategy_single_on_top.cc
@@ -29,6 +29,11 @@ bool OverlayStrategySingleOnTop::TryOverlay(
gfx::RectF rect = draw_quad->rect;
draw_quad->shared_quad_state->quad_to_target_transform.TransformRect(&rect);
+ // Check if the quad is clipped.
+ if (draw_quad->shared_quad_state->visible_quad_layer_rect.size() !=
alexst (slow to review) 2015/08/27 12:42:36 I don't think this is the right place to check for
+ draw_quad->shared_quad_state->quad_layer_bounds)
danakj 2015/08/27 17:37:54 Can you just use the draw_quad->shared_quad_state-
william.xie1 2015/08/28 00:00:46 Hi Dana, I tried it, but is_clipped was always tru
danakj 2015/08/28 22:55:05 Ah, ok well even if it's always true, it won't alw
+ return false;
+
// Check that no prior quads overlap it.
for (auto overlap_iter = quad_list.cbegin();
overlap_iter != candidate_iterator; ++overlap_iter) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698