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

Unified Diff: cc/output/overlay_candidate.cc

Issue 2749783006: cc: Enable non-opaque harware overlays. (Closed)
Patch Set: Blank lines! 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_strategy_fullscreen.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 20d54b8359697f2cdbb3f1e8e99ab38f5108f038..698d1edd68ed16961883b7e8a080a1339763c509 100644
--- a/cc/output/overlay_candidate.cc
+++ b/cc/output/overlay_candidate.cc
@@ -195,9 +195,12 @@ OverlayCandidate::~OverlayCandidate() {}
bool OverlayCandidate::FromDrawQuad(ResourceProvider* resource_provider,
const DrawQuad* quad,
OverlayCandidate* candidate) {
- if (quad->ShouldDrawWithBlending() ||
- quad->shared_quad_state->opacity != 1.f ||
- quad->shared_quad_state->blend_mode != SkBlendMode::kSrcOver)
+ // We don't support an opacity value different than one for an overlay plane.
+ if (quad->shared_quad_state->opacity != 1.f)
+ return false;
+ // We support only kSrc (no blending) and kSrcOver (blending with premul).
+ if (!(quad->shared_quad_state->blend_mode == SkBlendMode::kSrc ||
+ quad->shared_quad_state->blend_mode == SkBlendMode::kSrcOver))
return false;
auto& transform = quad->shared_quad_state->quad_to_target_transform;
« no previous file with comments | « no previous file | cc/output/overlay_strategy_fullscreen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698