OLD | NEW |
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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 SIMPLE_TEST_STEP(Translate, translate(SkIntToScalar(1), SkIntToScalar(2))); | 341 SIMPLE_TEST_STEP(Translate, translate(SkIntToScalar(1), SkIntToScalar(2))); |
342 SIMPLE_TEST_STEP(Scale, scale(SkIntToScalar(1), SkIntToScalar(2))); | 342 SIMPLE_TEST_STEP(Scale, scale(SkIntToScalar(1), SkIntToScalar(2))); |
343 SIMPLE_TEST_STEP(Rotate, rotate(SkIntToScalar(1))); | 343 SIMPLE_TEST_STEP(Rotate, rotate(SkIntToScalar(1))); |
344 SIMPLE_TEST_STEP(Skew, skew(SkIntToScalar(1), SkIntToScalar(2))); | 344 SIMPLE_TEST_STEP(Skew, skew(SkIntToScalar(1), SkIntToScalar(2))); |
345 SIMPLE_TEST_STEP(Concat, concat(d.fMatrix)); | 345 SIMPLE_TEST_STEP(Concat, concat(d.fMatrix)); |
346 SIMPLE_TEST_STEP(SetMatrix, setMatrix(d.fMatrix)); | 346 SIMPLE_TEST_STEP(SetMatrix, setMatrix(d.fMatrix)); |
347 SIMPLE_TEST_STEP(ClipRect, clipRect(d.fRect)); | 347 SIMPLE_TEST_STEP(ClipRect, clipRect(d.fRect)); |
348 SIMPLE_TEST_STEP(ClipPath, clipPath(d.fPath)); | 348 SIMPLE_TEST_STEP(ClipPath, clipPath(d.fPath)); |
349 SIMPLE_TEST_STEP(ClipRegion, clipRegion(d.fRegion, SkRegion::kReplace_Op)); | 349 SIMPLE_TEST_STEP(ClipRegion, clipRegion(d.fRegion, SkRegion::kReplace_Op)); |
350 SIMPLE_TEST_STEP(Clear, clear(d.fColor)); | 350 SIMPLE_TEST_STEP(Clear, clear(d.fColor)); |
351 SIMPLE_TEST_STEP(BeginGroup, beginCommentGroup(d.fText.c_str())); | |
352 SIMPLE_TEST_STEP(AddComment, addComment(d.fText.c_str(), d.fText.c_str())); | |
353 SIMPLE_TEST_STEP(EndGroup, endCommentGroup()); | |
354 | 351 |
355 /////////////////////////////////////////////////////////////////////////////// | 352 /////////////////////////////////////////////////////////////////////////////// |
356 // Complex test steps | 353 // Complex test steps |
357 | 354 |
358 static void SaveMatrixClipStep(SkCanvas* canvas, const TestData& d, | 355 static void SaveMatrixClipStep(SkCanvas* canvas, const TestData& d, |
359 skiatest::Reporter* reporter, CanvasTestStep* tes
tStep) { | 356 skiatest::Reporter* reporter, CanvasTestStep* tes
tStep) { |
360 int saveCount = canvas->getSaveCount(); | 357 int saveCount = canvas->getSaveCount(); |
361 canvas->save(); | 358 canvas->save(); |
362 canvas->translate(SkIntToScalar(1), SkIntToScalar(2)); | 359 canvas->translate(SkIntToScalar(1), SkIntToScalar(2)); |
363 canvas->clipRegion(d.fRegion); | 360 canvas->clipRegion(d.fRegion); |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 canvas.restore(); | 767 canvas.restore(); |
771 canvas.save(); | 768 canvas.save(); |
772 path.moveTo(5, 5); | 769 path.moveTo(5, 5); |
773 canvas.clipPath(path); | 770 canvas.clipPath(path); |
774 canvas.restore(); | 771 canvas.restore(); |
775 canvas.save(); | 772 canvas.save(); |
776 path.moveTo(7, 7); | 773 path.moveTo(7, 7); |
777 canvas.clipPath(path); // should not assert here | 774 canvas.clipPath(path); // should not assert here |
778 canvas.restore(); | 775 canvas.restore(); |
779 } | 776 } |
OLD | NEW |