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

Unified Diff: ui/gfx/compositor/layer.cc

Issue 7597001: Ensure that blending is disabled for layers with no alpha (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: use fills_bounds_opaquely() rather than adding HasAlpha Created 9 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: ui/gfx/compositor/layer.cc
diff --git a/ui/gfx/compositor/layer.cc b/ui/gfx/compositor/layer.cc
index 53097bdc5c228da508048719005d77559facf15d..214b07e302018d8d1e316d1072e0af46ae625e2e 100644
--- a/ui/gfx/compositor/layer.cc
+++ b/ui/gfx/compositor/layer.cc
@@ -89,8 +89,9 @@ void Layer::Draw() {
static_cast<float>(layer->bounds_.y()));
}
- // Only blend for child layers. The root layer will clobber the cleared bg.
- texture_draw_params.blend = parent_ != NULL;
+ // Only blend for transparent child layers.
+ // The root layer will clobber the cleared bg.
+ texture_draw_params.blend = parent_ != NULL && !fills_bounds_opaquely_;
#if defined(OS_WIN)
texture_->Draw(texture_draw_params);
« 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