summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-17 04:45:40 +0000
committerernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-17 04:45:40 +0000
commit68f404105a46cf9f09b6b5cd30170e883e71be91 (patch)
tree3db05dc8d3ed099a2053bdb735d8b5146a0e423c /cc
parent78bddc5ca26ff2bc6e775583aee226915d7e237d (diff)
downloadchromium_src-68f404105a46cf9f09b6b5cd30170e883e71be91.zip
chromium_src-68f404105a46cf9f09b6b5cd30170e883e71be91.tar.gz
chromium_src-68f404105a46cf9f09b6b5cd30170e883e71be91.tar.bz2
cc: Fix clipping of texture rect.
The clipping in texture_rect calculation needs to happen before the offset is added. This becomes relevant when tiling rect has an offset. R=enne@chromium.org BUG=362668 Review URL: https://codereview.chromium.org/238023010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/resources/picture_layer_tiling.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 2a4ad2e..d2a732d 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -356,8 +356,10 @@ gfx::RectF PictureLayerTiling::CoverageIterator::texture_rect() const {
gfx::RectF texture_rect(current_geometry_rect_);
texture_rect.Scale(dest_to_content_scale_,
dest_to_content_scale_);
- texture_rect.Offset(-tex_origin.OffsetFromOrigin());
texture_rect.Intersect(tiling_->TilingRect());
+ if (texture_rect.IsEmpty())
+ return texture_rect;
+ texture_rect.Offset(-tex_origin.OffsetFromOrigin());
return texture_rect;
}