Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1697)

Unified Diff: cc/layers/render_surface_impl.cc

Issue 14244021: cc: Remove incorrect dcheck for masks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With pixel tests Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/render_surface_impl.cc
diff --git a/cc/layers/render_surface_impl.cc b/cc/layers/render_surface_impl.cc
index 741526a8db0904ac03824340c84eb6e0fe5b563b..52c81ec5aff6d9431288a565d9a6d49551499260 100644
--- a/cc/layers/render_surface_impl.cc
+++ b/cc/layers/render_surface_impl.cc
@@ -250,16 +250,15 @@ void RenderSurfaceImpl::AppendQuads(QuadSink* quad_sink,
gfx::Vector2dF owning_layer_draw_scale =
MathUtil::ComputeTransform2dScaleComponents(
owning_layer_->draw_transform(), 1.f);
- gfx::SizeF unclipped_surface_size = gfx::ScaleSize(
+ gfx::SizeF unclipped_mask_target_size = gfx::ScaleSize(
owning_layer_->content_bounds(),
owning_layer_draw_scale.x(),
owning_layer_draw_scale.y());
- // This assumes that the owning layer clips its subtree when a mask is
- // present.
- DCHECK(gfx::RectF(unclipped_surface_size).Contains(content_rect_));
- float uv_scale_x = content_rect_.width() / unclipped_surface_size.width();
- float uv_scale_y = content_rect_.height() / unclipped_surface_size.height();
+ 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(),
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698