Index: cc/render_surface_impl.cc |
diff --git a/cc/render_surface_impl.cc b/cc/render_surface_impl.cc |
index ece1d1023085cb766f58ba0e8a19b12a07ef8b14..40c0deae305abfc2e71b2f08babfdf5342caed3e 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 = 0; |
float maskTexCoordOffsetY = 0; |
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; |
} |