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

Side by Side Diff: tests/CanvasTest.cpp

Issue 200223008: Remove SkCanvas matrix ops return value. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated per comments Created 6 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 unified diff | Download patch | Annotate | Revision Log
« src/core/SkMatrix.cpp ('K') | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 /* Description: 8 /* Description:
9 * This test defines a series of elementatry test steps that perform 9 * This test defines a series of elementatry test steps that perform
10 * a single or a small group of canvas API calls. Each test step is 10 * a single or a small group of canvas API calls. Each test step is
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 REPORTER_ASSERT_MESSAGE(reporter, canvas-> CALL , \ 305 REPORTER_ASSERT_MESSAGE(reporter, canvas-> CALL , \
306 testStep->assertMessage()); \ 306 testStep->assertMessage()); \
307 } \ 307 } \
308 TEST_STEP(NAME, NAME##TestStep ) 308 TEST_STEP(NAME, NAME##TestStep )
309 309
310 310
311 /////////////////////////////////////////////////////////////////////////////// 311 ///////////////////////////////////////////////////////////////////////////////
312 // Basic test steps for most virtual methods in SkCanvas that draw or affect 312 // Basic test steps for most virtual methods in SkCanvas that draw or affect
313 // the state of the canvas. 313 // the state of the canvas.
314 314
315 SIMPLE_TEST_STEP_WITH_ASSERT(Translate, 315 SIMPLE_TEST_STEP(Translate, translate(SkIntToScalar(1), SkIntToScalar(2)));
316 translate(SkIntToScalar(1), SkIntToScalar(2))); 316 SIMPLE_TEST_STEP(Scale, scale(SkIntToScalar(1), SkIntToScalar(2)));
317 SIMPLE_TEST_STEP_WITH_ASSERT(Scale, 317 SIMPLE_TEST_STEP(Rotate, rotate(SkIntToScalar(1)));
318 scale(SkIntToScalar(1), SkIntToScalar(2))); 318 SIMPLE_TEST_STEP(Skew, skew(SkIntToScalar(1), SkIntToScalar(2)));
319 SIMPLE_TEST_STEP_WITH_ASSERT(Rotate, rotate(SkIntToScalar(1))); 319 SIMPLE_TEST_STEP(Concat, concat(kTestMatrix));
320 SIMPLE_TEST_STEP_WITH_ASSERT(Skew,
321 skew(SkIntToScalar(1), SkIntToScalar(2)));
322 SIMPLE_TEST_STEP_WITH_ASSERT(Concat, concat(kTestMatrix));
323 SIMPLE_TEST_STEP(SetMatrix, setMatrix(kTestMatrix)); 320 SIMPLE_TEST_STEP(SetMatrix, setMatrix(kTestMatrix));
324 SIMPLE_TEST_STEP(ClipRect, clipRect(kTestRect)); 321 SIMPLE_TEST_STEP(ClipRect, clipRect(kTestRect));
325 SIMPLE_TEST_STEP(ClipPath, clipPath(kTestPath)); 322 SIMPLE_TEST_STEP(ClipPath, clipPath(kTestPath));
326 SIMPLE_TEST_STEP(ClipRegion, 323 SIMPLE_TEST_STEP(ClipRegion,
327 clipRegion(kTestRegion, SkRegion::kReplace_Op)); 324 clipRegion(kTestRegion, SkRegion::kReplace_Op));
328 SIMPLE_TEST_STEP(Clear, clear(kTestColor)); 325 SIMPLE_TEST_STEP(Clear, clear(kTestColor));
329 SIMPLE_TEST_STEP(DrawPaint, drawPaint(kTestPaint)); 326 SIMPLE_TEST_STEP(DrawPaint, drawPaint(kTestPaint));
330 SIMPLE_TEST_STEP(DrawPointsPoints, drawPoints(SkCanvas::kPoints_PointMode, 327 SIMPLE_TEST_STEP(DrawPointsPoints, drawPoints(SkCanvas::kPoints_PointMode,
331 kTestPointCount, kTestPoints, kTestPaint)); 328 kTestPointCount, kTestPoints, kTestPaint));
332 SIMPLE_TEST_STEP(DrawPointsLiness, drawPoints(SkCanvas::kLines_PointMode, 329 SIMPLE_TEST_STEP(DrawPointsLiness, drawPoints(SkCanvas::kLines_PointMode,
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 if (testStepArray()[testStep]->enablePdfTesting()) { 951 if (testStepArray()[testStep]->enablePdfTesting()) {
955 TestPdfDevice(reporter, testStepArray()[testStep]); 952 TestPdfDevice(reporter, testStepArray()[testStep]);
956 } 953 }
957 } 954 }
958 955
959 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i s a global) 956 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i s a global)
960 kTestBitmap.reset(); 957 kTestBitmap.reset();
961 958
962 test_newraster(reporter); 959 test_newraster(reporter);
963 } 960 }
OLDNEW
« src/core/SkMatrix.cpp ('K') | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698