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

Unified Diff: cc/output/overlay_candidate.cc

Issue 2162663003: Don't reject overlay candidates for premultiplied alpha. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « 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_candidate.cc
diff --git a/cc/output/overlay_candidate.cc b/cc/output/overlay_candidate.cc
index 9259a6cc7386771a8478dc9f13f7d27f6675d2ed..3374aebb0a7ab0c4d082064c443d76a51453ce25 100644
--- a/cc/output/overlay_candidate.cc
+++ b/cc/output/overlay_candidate.cc
@@ -185,7 +185,8 @@ OverlayCandidate::~OverlayCandidate() {}
bool OverlayCandidate::FromDrawQuad(ResourceProvider* resource_provider,
const DrawQuad* quad,
OverlayCandidate* candidate) {
- if (quad->needs_blending || quad->shared_quad_state->opacity != 1.f ||
+ if (quad->ShouldDrawWithBlending() ||
+ quad->shared_quad_state->opacity != 1.f ||
quad->shared_quad_state->blend_mode != SkXfermode::kSrcOver_Mode)
return false;
@@ -252,7 +253,6 @@ bool OverlayCandidate::FromTextureQuad(ResourceProvider* resource_provider,
gfx::OverlayTransform overlay_transform = GetOverlayTransform(
quad->shared_quad_state->quad_to_target_transform, quad->y_flipped);
if (quad->background_color != SK_ColorTRANSPARENT ||
- quad->premultiplied_alpha ||
overlay_transform == gfx::OVERLAY_TRANSFORM_INVALID)
return false;
candidate->resource_id = quad->resource_id();
« 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