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

Unified Diff: ui/compositor/layer.cc

Issue 1125283015: Update Layer::GetTargetColor to account for animation state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Layer unittests Created 5 years, 7 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 | ui/compositor/layer_owner_unittest.cc » ('j') | ui/compositor/layer_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index c1347c4e36cc9456d3aa243e22e462505f1fa95a..73cd1d1a9790112d76ee7afd130ae9c72989feb4 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -653,7 +653,9 @@ void Layer::UpdateNinePatchLayerBorder(const gfx::Rect& border) {
void Layer::SetColor(SkColor color) { GetAnimator()->SetColor(color); }
SkColor Layer::GetTargetColor() {
- return GetAnimator()->GetTargetColor();
+ if (GetAnimator()->IsAnimatingProperty(LayerAnimationElement::COLOR))
+ return GetAnimator()->GetTargetColor();
+ return cc_layer_->background_color();
}
SkColor Layer::background_color() const {
« no previous file with comments | « no previous file | ui/compositor/layer_owner_unittest.cc » ('j') | ui/compositor/layer_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698