Chromium Code Reviews| Index: cc/layer_tree_host_common.cc |
| diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc |
| index e316c370fad9a7c6f3423e0b97c60f7764cd2398..4606dff975fa323c1b43e01bee7cc224fc7f136e 100644 |
| --- a/cc/layer_tree_host_common.cc |
| +++ b/cc/layer_tree_host_common.cc |
| @@ -869,9 +869,9 @@ static void calculateDrawPropertiesInternal(LayerType* layer, const gfx::Transfo |
| // Apply the sublayer transform at the center of the layer. |
|
danakj
2013/02/12 00:58:23
This comment is wrong now.
|
| if (!layer->sublayerTransform().IsIdentity()) { |
| - sublayerMatrix.Translate(0.5 * bounds.width(), 0.5 * bounds.height()); |
| + sublayerMatrix.Translate(layer->anchorPoint().x() * bounds.width(), layer->anchorPoint().y() * bounds.height()); |
| sublayerMatrix.PreconcatTransform(layer->sublayerTransform()); |
| - sublayerMatrix.Translate(-0.5 * bounds.width(), -0.5 * bounds.height()); |
| + sublayerMatrix.Translate(-layer->anchorPoint().x() * bounds.width(), -layer->anchorPoint().y() * bounds.height()); |
| } |
| LayerList& descendants = (layer->renderSurface() ? layer->renderSurface()->layerList() : layerList); |