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

Unified Diff: Source/platform/graphics/GraphicsContextTest.cpp

Issue 323013004: Clean up transform methods in GraphicsContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2nd Attempt Mac build fix Created 6 years, 6 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 | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/platform/graphics/filters/FETile.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContextTest.cpp
diff --git a/Source/platform/graphics/GraphicsContextTest.cpp b/Source/platform/graphics/GraphicsContextTest.cpp
index 0162c18c0cc4382d435daa8499e2da81e18f4189..dbf9861c7863e36989a07aebc4a1b04170f2e16c 100644
--- a/Source/platform/graphics/GraphicsContextTest.cpp
+++ b/Source/platform/graphics/GraphicsContextTest.cpp
@@ -1042,7 +1042,8 @@ TEST(GraphicsContextTest, PreserveOpaqueOnlyMattersForFirstLayer)
EXPECT_PIXELS_MATCH_EXACT(bitmap, context.opaqueRegion().asRect());
}
-#define DISPATCH(c1, c2, op, params) do { c1.op(params); c2.op(params); } while (0);
+#define DISPATCH1(c1, c2, op, param1) do { c1.op(param1); c2.op(param1); } while (0);
+#define DISPATCH2(c1, c2, op, param1, param2) do { c1.op(param1, param2); c2.op(param1, param2); } while (0);
TEST(GraphicsContextTest, RecordingTotalMatrix)
{
@@ -1056,17 +1057,17 @@ TEST(GraphicsContextTest, RecordingTotalMatrix)
GraphicsContext controlContext(&controlCanvas);
EXPECT_EQ(context.getCTM(), controlContext.getCTM());
- DISPATCH(context, controlContext, scale, FloatSize(2, 2));
+ DISPATCH2(context, controlContext, scale, 2, 2);
EXPECT_EQ(context.getCTM(), controlContext.getCTM());
controlContext.save();
context.beginRecording(FloatRect(0, 0, 200, 200));
- DISPATCH(context, controlContext, translate, FloatSize(10, 10));
+ DISPATCH2(context, controlContext, translate, 10, 10);
EXPECT_EQ(context.getCTM(), controlContext.getCTM());
controlContext.save();
context.beginRecording(FloatRect(10, 10, 100, 100));
- DISPATCH(context, controlContext, rotate, 45);
+ DISPATCH1(context, controlContext, rotate, 45);
EXPECT_EQ(context.getCTM(), controlContext.getCTM());
controlContext.restore();
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/platform/graphics/filters/FETile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698