diff options
author | bruthig <bruthig@chromium.org> | 2015-04-30 15:37:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-30 22:38:34 +0000 |
commit | 356c58857c6e47ff5fd1beddbe8ed72c0be15fbe (patch) | |
tree | 3632d7262a35c07a40859a42022b7d659d33e872 /ui/compositor/layer_animation_element.cc | |
parent | 5a679fca95cf220f1a4f076233ad58f6dc60fb4b (diff) | |
download | chromium_src-356c58857c6e47ff5fd1beddbe8ed72c0be15fbe.zip chromium_src-356c58857c6e47ff5fd1beddbe8ed72c0be15fbe.tar.gz chromium_src-356c58857c6e47ff5fd1beddbe8ed72c0be15fbe.tar.bz2 |
Fixed the LayerAnimationElement::TargetValue(LayerAnimationDelegate*) constructor to properly pull the SkColor from the delegate.
The constructor was incorrectly casting the SkColor to a float before assigning it and this caused loss of precision.
TEST=TargetValueTest.VerifyTestLayerAnimationDelegateConstructor
BUG=483134
Review URL: https://codereview.chromium.org/1119853002
Cr-Commit-Position: refs/heads/master@{#327814}
Diffstat (limited to 'ui/compositor/layer_animation_element.cc')
-rw-r--r-- | ui/compositor/layer_animation_element.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc index 9a528e5..7c3cf8c 100644 --- a/ui/compositor/layer_animation_element.cc +++ b/ui/compositor/layer_animation_element.cc @@ -599,13 +599,13 @@ LayerAnimationElement::TargetValue::TargetValue() LayerAnimationElement::TargetValue::TargetValue( const LayerAnimationDelegate* delegate) : bounds(delegate ? delegate->GetBoundsForAnimation() : gfx::Rect()), - transform(delegate ? - delegate->GetTransformForAnimation() : gfx::Transform()), + transform(delegate ? delegate->GetTransformForAnimation() + : gfx::Transform()), opacity(delegate ? delegate->GetOpacityForAnimation() : 0.0f), visibility(delegate ? delegate->GetVisibilityForAnimation() : false), brightness(delegate ? delegate->GetBrightnessForAnimation() : 0.0f), grayscale(delegate ? delegate->GetGrayscaleForAnimation() : 0.0f), - color(delegate ? delegate->GetColorForAnimation() : 0.0f) { + color(delegate ? delegate->GetColorForAnimation() : SK_ColorTRANSPARENT) { } // LayerAnimationElement ------------------------------------------------------- |