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

Unified Diff: cc/occlusion_tracker_unittest.cc

Issue 11293194: ui: Prefer +/- operators to apply offsets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: floats Created 8 years, 1 month 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
Index: cc/occlusion_tracker_unittest.cc
diff --git a/cc/occlusion_tracker_unittest.cc b/cc/occlusion_tracker_unittest.cc
index babd9cd82f10761377766e94ab6936ee63757bdc..187ab21c7e8c39da71125bb6a7d509b9ce595ef5 100644
--- a/cc/occlusion_tracker_unittest.cc
+++ b/cc/occlusion_tracker_unittest.cc
@@ -905,22 +905,22 @@ protected:
EXPECT_TRUE(occlusion.occludedLayer(child, clippedLayerInChild));
EXPECT_TRUE(occlusion.unoccludedLayerContentRect(child, clippedLayerInChild).IsEmpty());
- clippedLayerInChild.Offset(-1, 0);
+ clippedLayerInChild += gfx::Vector2d(-1, 0);
EXPECT_FALSE(occlusion.occludedLayer(child, clippedLayerInChild));
EXPECT_FALSE(occlusion.unoccludedLayerContentRect(child, clippedLayerInChild).IsEmpty());
- clippedLayerInChild.Offset(1, 0);
- clippedLayerInChild.Offset(1, 0);
+ clippedLayerInChild += gfx::Vector2d(1, 0);
+ clippedLayerInChild += gfx::Vector2d(1, 0);
EXPECT_FALSE(occlusion.occludedLayer(child, clippedLayerInChild));
EXPECT_FALSE(occlusion.unoccludedLayerContentRect(child, clippedLayerInChild).IsEmpty());
- clippedLayerInChild.Offset(-1, 0);
- clippedLayerInChild.Offset(0, -1);
+ clippedLayerInChild += gfx::Vector2d(-1, 0);
+ clippedLayerInChild += gfx::Vector2d(0, -1);
EXPECT_FALSE(occlusion.occludedLayer(child, clippedLayerInChild));
EXPECT_FALSE(occlusion.unoccludedLayerContentRect(child, clippedLayerInChild).IsEmpty());
- clippedLayerInChild.Offset(0, 1);
- clippedLayerInChild.Offset(0, 1);
+ clippedLayerInChild += gfx::Vector2d(0, 1);
+ clippedLayerInChild += gfx::Vector2d(0, 1);
EXPECT_FALSE(occlusion.occludedLayer(child, clippedLayerInChild));
EXPECT_FALSE(occlusion.unoccludedLayerContentRect(child, clippedLayerInChild).IsEmpty());
- clippedLayerInChild.Offset(0, -1);
+ clippedLayerInChild += gfx::Vector2d(0, -1);
this->leaveContributingSurface(child, occlusion);
this->enterLayer(parent, occlusion);
« .gitmodules ('K') | « cc/math_util.cc ('k') | cc/page_scale_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698