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

Unified Diff: cc/nine_patch_layer_impl_unittest.cc

Issue 11783094: cc: Add point-based UV coordinate on TextureLayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 11 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/nine_patch_layer_impl.cc ('k') | cc/scrollbar_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/nine_patch_layer_impl_unittest.cc
diff --git a/cc/nine_patch_layer_impl_unittest.cc b/cc/nine_patch_layer_impl_unittest.cc
index aa9bc01bb4fbbdecfb6b8d38ff979c2eafcc40a5..fbf765b7694d08d73e1050fb25f3e3ec5f0a5599 100644
--- a/cc/nine_patch_layer_impl_unittest.cc
+++ b/cc/nine_patch_layer_impl_unittest.cc
@@ -82,7 +82,7 @@ TEST(NinePatchLayerImplTest, verifyDrawQuads)
for (size_t i = 0; i < quads.size(); ++i) {
DrawQuad* quad = quads[i];
const TextureDrawQuad* texQuad = TextureDrawQuad::MaterialCast(quad);
- gfx::RectF texRect = texQuad->uv_rect;
+ gfx::RectF texRect = gfx::BoundingRect(texQuad->uv_top_left, texQuad->uv_bottom_right);
texRect.Scale(bitmapSize.width(), bitmapSize.height());
texRemaining.Subtract(Region(ToRoundedIntRect(texRect)));
}
@@ -135,7 +135,7 @@ TEST(NinePatchLayerImplTest, verifyDrawQuadsForSqueezedLayer)
for (size_t i = 0; i < quads.size(); ++i) {
DrawQuad* quad = quads[i];
const TextureDrawQuad* texQuad = TextureDrawQuad::MaterialCast(quad);
- gfx::RectF texRect = texQuad->uv_rect;
+ gfx::RectF texRect = gfx::BoundingRect(texQuad->uv_top_left, texQuad->uv_bottom_right);
texRect.Scale(bitmapSize.width(), bitmapSize.height());
texRemaining.Subtract(Region(ToRoundedIntRect(texRect)));
}
« no previous file with comments | « cc/nine_patch_layer_impl.cc ('k') | cc/scrollbar_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698