Index: ui/compositor/layer.cc |
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc |
index 053ddac57be75b23212d07aab9cf973a03bf8142..119a1cfa868390103209691c432da434f32c665f 100644 |
--- a/ui/compositor/layer.cc |
+++ b/ui/compositor/layer.cc |
@@ -786,12 +786,11 @@ void Layer::RecomputeDrawsContentAndUVRect() { |
gfx::Size size(std::min(bounds().width(), texture_size.width()), |
std::min(bounds().height(), texture_size.height())); |
- gfx::RectF rect( |
- 0, |
- 0, |
+ gfx::PointF uv_top_left(0.f, 0.f); |
+ gfx::PointF uv_bottom_right( |
static_cast<float>(size.width())/texture_size.width(), |
static_cast<float>(size.height())/texture_size.height()); |
- texture_layer_->setUVRect(rect); |
+ texture_layer_->setUV(uv_top_left, uv_bottom_right); |
cc_layer_->setBounds(ConvertSizeToPixel(this, size)); |
} |