Index: cc/render_surface_impl.cc |
diff --git a/cc/render_surface_impl.cc b/cc/render_surface_impl.cc |
index 54ff6b10322d019ecb6a39dc74f380badac4ba4d..c8f100fdba8b227e7fd841fda1cd9e8b261f4e32 100644 |
--- a/cc/render_surface_impl.cc |
+++ b/cc/render_surface_impl.cc |
@@ -236,8 +236,8 @@ void RenderSurfaceImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQ |
float maskTexCoordOffsetX = 1; |
float maskTexCoordOffsetY = 1; |
if (maskLayer) { |
- maskTexCoordScaleX = static_cast<float>(contentRect().width()) / maskLayer->contentBounds().width(); |
- maskTexCoordScaleY = static_cast<float>(contentRect().height()) / maskLayer->contentBounds().height(); |
+ maskTexCoordScaleX = contentRect().width() / maskLayer->contentsScaleX() / maskLayer->bounds().width(); |
+ maskTexCoordScaleY = contentRect().height() / maskLayer->contentsScaleY() / maskLayer->bounds().height(); |
maskTexCoordOffsetX = static_cast<float>(contentRect().x()) / contentRect().width() * maskTexCoordScaleX; |
maskTexCoordOffsetY = static_cast<float>(contentRect().y()) / contentRect().height() * maskTexCoordScaleY; |
} |