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

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

Issue 8416053: Gets Bubble to work on aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make Layer::SetOpacity do ScheduleDraw Created 9 years, 2 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 | « chrome/browser/ui/views/bubble/bubble.cc ('k') | 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 e9a9ed578dfdfde1fab4b94b0af6d50f9d396cec..64b77f61ba5182317be7c808538021399ba684e2 100644
--- a/ui/gfx/compositor/layer.cc
+++ b/ui/gfx/compositor/layer.cc
@@ -614,12 +614,15 @@ void Layer::SetTransformImmediately(const ui::Transform& transform) {
}
void Layer::SetOpacityImmediately(float opacity) {
+ bool schedule_draw = (opacity != opacity_ && IsDrawn());
opacity_ = opacity;
SetNeedsToRecomputeHole();
#if defined(USE_WEBKIT_COMPOSITOR)
if (visible_)
web_layer_.setOpacity(opacity);
#endif
+ if (schedule_draw)
+ ScheduleDraw();
}
void Layer::SetBoundsFromAnimation(const gfx::Rect& bounds) {
« no previous file with comments | « chrome/browser/ui/views/bubble/bubble.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698