Commit bee28bfc authored by sataya.m@samsung.com's avatar sataya.m@samsung.com

[Android] Use SetTransformOrigin for glow-effect layers

The effect layers were transformed to the wrong position, as the anchor
point has been replaced with transformed origin in
https://codereview.chromium.org/295193002.

BUG=382087

Review URL: https://codereview.chromium.org/319183011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275731 0039d316-1c4b-4281-b951-d872f2087c98
parent a0b229ed
...@@ -133,8 +133,11 @@ void UpdateLayer(cc::Layer* layer, ...@@ -133,8 +133,11 @@ void UpdateLayer(cc::Layer* layer,
float opacity) { float opacity) {
DCHECK(layer); DCHECK(layer);
layer->SetIsDrawable(true); layer->SetIsDrawable(true);
gfx::Size bounds = ComputeBounds(edge, window_size, height);
layer->SetTransformOrigin(
gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0));
layer->SetTransform(ComputeTransform(edge, window_size, offset, height)); layer->SetTransform(ComputeTransform(edge, window_size, offset, height));
layer->SetBounds(ComputeBounds(edge, window_size, height)); layer->SetBounds(bounds);
layer->SetOpacity(Clamp(opacity, 0.f, 1.f)); layer->SetOpacity(Clamp(opacity, 0.f, 1.f));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment