Index: ui/compositor/layer.cc |
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc |
index 17ab8993305a0c0c5b0c49879f7185ba785ce29d..150e1efe5e0633c1e663f59cb73102f86b0d908c 100644 |
--- a/ui/compositor/layer.cc |
+++ b/ui/compositor/layer.cc |
@@ -243,6 +243,11 @@ void Layer::SetBounds(const gfx::Rect& bounds) { |
GetAnimator()->SetBounds(bounds); |
} |
+void Layer::SetSubpixelPositionOffset(const gfx::Vector2dF offset) { |
+ subpixel_position_offset_ = offset; |
+ RecomputePosition(); |
+} |
+ |
gfx::Rect Layer::GetTargetBounds() const { |
if (animator_.get() && animator_->IsAnimatingProperty( |
LayerAnimationElement::BOUNDS)) { |
@@ -959,7 +964,7 @@ void Layer::RecomputeDrawsContentAndUVRect() { |
} |
void Layer::RecomputePosition() { |
- cc_layer_->SetPosition(gfx::PointF(bounds_.x(), bounds_.y())); |
+ cc_layer_->SetPosition(bounds_.origin() + subpixel_position_offset_); |
} |
void Layer::AddAnimatorsInTreeToCollection( |