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

Unified Diff: cc/layers/nine_patch_layer_impl_unittest.cc

Issue 12967018: cc: Avoid pointless gfx::Point/Size contructors when making Rects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RectFs as well Created 7 years, 9 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/layers/nine_patch_layer.cc ('k') | cc/layers/render_surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/nine_patch_layer_impl_unittest.cc
diff --git a/cc/layers/nine_patch_layer_impl_unittest.cc b/cc/layers/nine_patch_layer_impl_unittest.cc
index e2cb118cfbf7c5dc3777f16908f1dc80a093caf7..740fa50c4cd862b78cfe50ce4469ad0aba4df8e7 100644
--- a/cc/layers/nine_patch_layer_impl_unittest.cc
+++ b/cc/layers/nine_patch_layer_impl_unittest.cc
@@ -36,7 +36,7 @@ TEST(NinePatchLayerImplTest, VerifyDrawQuads) {
MockQuadCuller quad_culler;
gfx::Size bitmap_size(100, 100);
gfx::Size layer_size(400, 400);
- gfx::Rect visible_content_rect(gfx::Point(), layer_size);
+ gfx::Rect visible_content_rect(layer_size);
gfx::Rect aperture_rect(20, 30, 40, 50);
gfx::Rect scaled_aperture_non_uniform(20, 30, 340, 350);
@@ -79,7 +79,7 @@ TEST(NinePatchLayerImplTest, VerifyDrawQuads) {
EXPECT_EQ(scaled_aperture_region, remaining);
// Verify UV rects
- gfx::Rect bitmap_rect(gfx::Point(), bitmap_size);
+ gfx::Rect bitmap_rect(bitmap_size);
Region tex_remaining(bitmap_rect);
for (size_t i = 0; i < quads.size(); ++i) {
DrawQuad* quad = quads[i];
@@ -99,7 +99,7 @@ TEST(NinePatchLayerImplTest, VerifyDrawQuadsForSqueezedLayer) {
MockQuadCuller quad_culler;
gfx::Size bitmap_size(101, 101);
gfx::Size layer_size(51, 51);
- gfx::Rect visible_content_rect(gfx::Point(), layer_size);
+ gfx::Rect visible_content_rect(layer_size);
gfx::Rect aperture_rect(20, 30, 40, 45); // rightWidth: 40, botHeight: 25
FakeImplProxy proxy;
@@ -133,7 +133,7 @@ TEST(NinePatchLayerImplTest, VerifyDrawQuadsForSqueezedLayer) {
// Verify UV rects cover the corners of the bitmap and the crop is weighted
// proportionately to the relative corner sizes (for uneven apertures).
- gfx::Rect bitmap_rect(gfx::Point(), bitmap_size);
+ gfx::Rect bitmap_rect(bitmap_size);
Region tex_remaining(bitmap_rect);
for (size_t i = 0; i < quads.size(); ++i) {
DrawQuad* quad = quads[i];
« no previous file with comments | « cc/layers/nine_patch_layer.cc ('k') | cc/layers/render_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698