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

Unified Diff: cc/output/overlay_strategy_fullscreen.cc

Issue 2739473002: cc: Reject non-opaque fullscreen overlay candidates. (Closed)
Patch Set: Rebase on master. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_strategy_fullscreen.cc
diff --git a/cc/output/overlay_strategy_fullscreen.cc b/cc/output/overlay_strategy_fullscreen.cc
index 681611fa5f233f99094eb6656d8d12d8be93cfd8..7082441cf46cddd90dc433db66e6d30146b2a544 100644
--- a/cc/output/overlay_strategy_fullscreen.cc
+++ b/cc/output/overlay_strategy_fullscreen.cc
@@ -38,8 +38,14 @@ bool OverlayStrategyFullscreen::Attempt(
if (front == quad_list->end())
return false;
+ const DrawQuad* quad = *front;
+ if (quad->ShouldDrawWithBlending() ||
+ quad->shared_quad_state->opacity != 1.f ||
+ quad->shared_quad_state->blend_mode != SkBlendMode::kSrcOver)
+ return false;
+
OverlayCandidate candidate;
- if (!OverlayCandidate::FromDrawQuad(resource_provider, *front, &candidate)) {
+ if (!OverlayCandidate::FromDrawQuad(resource_provider, quad, &candidate)) {
return false;
}
« no previous file with comments | « no previous file | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698