diff options
author | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-24 20:07:08 +0000 |
---|---|---|
committer | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-24 20:07:08 +0000 |
commit | 421bcc375af0616c37a59b0508957ab54d8f6d12 (patch) | |
tree | e80529f6e6aefd08da53b3a4a333431544fad5ce /tests | |
parent | ddd0ed560721bc082b38eed7c11ea792ae0713ca (diff) |
Modify SkDeferredCanvas so that it uses its inherited SkCanvas to track matrix and clipping state
Removed 'virtual' from a few canvas methods that no longer need it thanks to this change.
BUG=http://code.google.com/p/skia/issues/detail?id=506
TEST=Canvas unit test
REVIEW=http://codereview.appspot.com/5697052/
git-svn-id: http://skia.googlecode.com/svn/trunk@3256 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CanvasTest.cpp | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp index 54b728b9a0..0c4683e58b 100644 --- a/tests/CanvasTest.cpp +++ b/tests/CanvasTest.cpp @@ -224,27 +224,25 @@ TEST_STEP(NAME, NAME##TestStep ) // Basic test steps for most virtual methods in SkCanvas that draw or affect // the state of the canvas. -// The following test steps are commented-out because they currently fail -// Issue: http://code.google.com/p/skia/issues/detail?id=506 -//SIMPLE_TEST_STEP(SaveMatrix, save(SkCanvas::kMatrix_SaveFlag)); -//SIMPLE_TEST_STEP(SaveClip, save(SkCanvas::kClip_SaveFlag)); -//SIMPLE_TEST_STEP(SaveMatrixClip, save(SkCanvas::kMatrixClip_SaveFlag)); -//SIMPLE_TEST_STEP(SaveLayer, saveLayer(NULL, NULL)); -//SIMPLE_TEST_STEP(BoundedSaveLayer, saveLayer(&kTestRect, NULL)); -//SIMPLE_TEST_STEP(PaintSaveLayer, saveLayer(NULL, &kTestPaint)); -//SIMPLE_TEST_STEP_WITH_ASSERT(Translate, -// translate(SkIntToScalar(1), SkIntToScalar(2))); -//SIMPLE_TEST_STEP_WITH_ASSERT(Scale, -// scale(SkIntToScalar(1), SkIntToScalar(2))); -//SIMPLE_TEST_STEP_WITH_ASSERT(Rotate, rotate(SkIntToScalar(1))); -//SIMPLE_TEST_STEP_WITH_ASSERT(Skew, -// skew(SkIntToScalar(1), SkIntToScalar(2))); -//SIMPLE_TEST_STEP_WITH_ASSERT(Concat, concat(kTestMatrix)); -//SIMPLE_TEST_STEP(SetMatrix, setMatrix(kTestMatrix)); -//SIMPLE_TEST_STEP_WITH_ASSERT(ClipRect, clipRect(kTestRect)); -//SIMPLE_TEST_STEP_WITH_ASSERT(ClipPath, clipPath(kTestPath)); -//SIMPLE_TEST_STEP_WITH_ASSERT(ClipRegion, -// clipRegion(kTestRegion, SkRegion::kReplace_Op)); +SIMPLE_TEST_STEP(SaveMatrix, save(SkCanvas::kMatrix_SaveFlag)); +SIMPLE_TEST_STEP(SaveClip, save(SkCanvas::kClip_SaveFlag)); +SIMPLE_TEST_STEP(SaveMatrixClip, save(SkCanvas::kMatrixClip_SaveFlag)); +SIMPLE_TEST_STEP(SaveLayer, saveLayer(NULL, NULL)); +SIMPLE_TEST_STEP(BoundedSaveLayer, saveLayer(&kTestRect, NULL)); +SIMPLE_TEST_STEP(PaintSaveLayer, saveLayer(NULL, &kTestPaint)); +SIMPLE_TEST_STEP_WITH_ASSERT(Translate, + translate(SkIntToScalar(1), SkIntToScalar(2))); +SIMPLE_TEST_STEP_WITH_ASSERT(Scale, + scale(SkIntToScalar(1), SkIntToScalar(2))); +SIMPLE_TEST_STEP_WITH_ASSERT(Rotate, rotate(SkIntToScalar(1))); +SIMPLE_TEST_STEP_WITH_ASSERT(Skew, + skew(SkIntToScalar(1), SkIntToScalar(2))); +SIMPLE_TEST_STEP_WITH_ASSERT(Concat, concat(kTestMatrix)); +SIMPLE_TEST_STEP(SetMatrix, setMatrix(kTestMatrix)); +SIMPLE_TEST_STEP_WITH_ASSERT(ClipRect, clipRect(kTestRect)); +SIMPLE_TEST_STEP_WITH_ASSERT(ClipPath, clipPath(kTestPath)); +SIMPLE_TEST_STEP_WITH_ASSERT(ClipRegion, + clipRegion(kTestRegion, SkRegion::kReplace_Op)); SIMPLE_TEST_STEP(Clear, clear(kTestColor)); SIMPLE_TEST_STEP(DrawPaint, drawPaint(kTestPaint)); SIMPLE_TEST_STEP(DrawPointsPoints, drawPoints(SkCanvas::kPoints_PointMode, @@ -341,9 +339,6 @@ static void SaveRestoreTestStep(SkCanvas* canvas, } TEST_STEP(SaveRestore, SaveRestoreTestStep); -// The following test step is commented-out because it currently fails -// Issue: http://code.google.com/p/skia/issues/detail?id=506 -/* static void DrawLayerTestStep(SkCanvas* canvas, skiatest::Reporter* reporter, CanvasTestStep* testStep) { @@ -376,7 +371,6 @@ static void DrawLayerTestStep(SkCanvas* canvas, testStep->assertMessage()); } TEST_STEP(DrawLayer, DrawLayerTestStep); -*/ static void AssertCanvasStatesEqual(skiatest::Reporter* reporter, const SkCanvas* canvas1, |