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

Unified Diff: cc/output/overlay_candidate.cc

Issue 2168693002: cc: Add OverlayStrategyFullscreen strategy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set deps. Don't enable strategy by default. Created 4 years, 5 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 | « cc/cc.gyp ('k') | cc/output/overlay_strategy_fullscreen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_candidate.cc
diff --git a/cc/output/overlay_candidate.cc b/cc/output/overlay_candidate.cc
index 3374aebb0a7ab0c4d082064c443d76a51453ce25..5ed4bf493833c34164e67b9d67f817fa01c6a9b7 100644
--- a/cc/output/overlay_candidate.cc
+++ b/cc/output/overlay_candidate.cc
@@ -217,9 +217,11 @@ bool OverlayCandidate::FromDrawQuad(ResourceProvider* resource_provider,
// static
bool OverlayCandidate::IsInvisibleQuad(const DrawQuad* quad) {
+ float opacity = quad->shared_quad_state->opacity;
+ if (opacity < std::numeric_limits<float>::epsilon())
+ return true;
if (quad->material == DrawQuad::SOLID_COLOR) {
SkColor color = SolidColorDrawQuad::MaterialCast(quad)->color;
- float opacity = quad->shared_quad_state->opacity;
float alpha = (SkColorGetA(color) * (1.0f / 255.0f)) * opacity;
return quad->ShouldDrawWithBlending() &&
alpha < std::numeric_limits<float>::epsilon();
« no previous file with comments | « cc/cc.gyp ('k') | cc/output/overlay_strategy_fullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698