Index: content/browser/android/edge_effect.cc |
diff --git a/content/browser/android/edge_effect.cc b/content/browser/android/edge_effect.cc |
index a23dff89e3c1a3f3d2bbfe6a0ad936687a4bc938..94e5b512e20505bf5ad12c59f9258e88f9fa41b1 100644 |
--- a/content/browser/android/edge_effect.cc |
+++ b/content/browser/android/edge_effect.cc |
@@ -133,8 +133,11 @@ void UpdateLayer(cc::Layer* layer, |
float opacity) { |
DCHECK(layer); |
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->SetBounds(ComputeBounds(edge, window_size, height)); |
+ layer->SetBounds(bounds); |
layer->SetOpacity(Clamp(opacity, 0.f, 1.f)); |
} |