Chromium Code Reviews| Index: cc/layers/render_surface_impl.cc |
| diff --git a/cc/layers/render_surface_impl.cc b/cc/layers/render_surface_impl.cc |
| index 18d50c5dca9ed003e65f32597da28588d6048b3d..15ca4892aca6ac7ae3695aa5f769f06a189d5695 100644 |
| --- a/cc/layers/render_surface_impl.cc |
| +++ b/cc/layers/render_surface_impl.cc |
| @@ -193,7 +193,8 @@ void RenderSurfaceImpl::AppendQuads( |
| mask_layer = nullptr; |
| } |
| - gfx::RectF mask_uv_rect(0.f, 0.f, 1.f, 1.f); |
| + gfx::Vector2dF mask_uv_scale; |
| + gfx::Size mask_texture_size; |
| if (mask_layer) { |
| gfx::Vector2dF owning_layer_draw_scale = |
| MathUtil::ComputeTransform2dScaleComponents( |
| @@ -202,17 +203,10 @@ void RenderSurfaceImpl::AppendQuads( |
| owning_layer_->content_bounds(), |
| owning_layer_draw_scale.x(), |
| owning_layer_draw_scale.y()); |
| - |
| - float uv_scale_x = |
| - content_rect_.width() / unclipped_mask_target_size.width(); |
| - float uv_scale_y = |
| - content_rect_.height() / unclipped_mask_target_size.height(); |
| - |
| - mask_uv_rect = gfx::RectF( |
| - uv_scale_x * content_rect_.x() / content_rect_.width(), |
| - uv_scale_y * content_rect_.y() / content_rect_.height(), |
| - uv_scale_x, |
| - uv_scale_y); |
| + mask_uv_scale = gfx::Vector2dF( |
| + content_rect_.width() / unclipped_mask_target_size.width(), |
| + content_rect_.height() / unclipped_mask_target_size.height()); |
| + mask_texture_size = mask_layer->content_bounds(); |
|
danakj
2014/10/15 15:33:34
with implside painting this is the same as bounds(
enne (OOO)
2014/10/15 19:10:54
Whoa. Nice catch!
ContentsResourceId now has to
|
| } |
| ResourceProvider::ResourceId mask_resource_id = |
| @@ -231,7 +225,8 @@ void RenderSurfaceImpl::AppendQuads( |
| visible_content_rect, |
| render_pass_id, |
| mask_resource_id, |
| - mask_uv_rect, |
| + mask_uv_scale, |
| + mask_texture_size, |
| owning_layer_->filters(), |
| owning_layer_to_target_scale, |
| owning_layer_->background_filters()); |