| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 /* Description: | 9 /* Description: |
| 10 * This test defines a series of elementatry test steps that perform | 10 * This test defines a series of elementatry test steps that perform |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #include "SkShader.h" | 62 #include "SkShader.h" |
| 63 #include "SkStream.h" | 63 #include "SkStream.h" |
| 64 #include "SkSurface.h" | 64 #include "SkSurface.h" |
| 65 #include "SkTDArray.h" | 65 #include "SkTDArray.h" |
| 66 #include "Test.h" | 66 #include "Test.h" |
| 67 | 67 |
| 68 class Canvas2CanvasClipVisitor : public SkCanvas::ClipVisitor { | 68 class Canvas2CanvasClipVisitor : public SkCanvas::ClipVisitor { |
| 69 public: | 69 public: |
| 70 Canvas2CanvasClipVisitor(SkCanvas* target) : fTarget(target) {} | 70 Canvas2CanvasClipVisitor(SkCanvas* target) : fTarget(target) {} |
| 71 | 71 |
| 72 virtual void clipRect(const SkRect& r, SkRegion::Op op, bool aa) { | 72 virtual void clipRect(const SkRect& r, SkRegion::Op op, bool aa) SK_OVERRIDE
{ |
| 73 fTarget->clipRect(r, op, aa); | 73 fTarget->clipRect(r, op, aa); |
| 74 } | 74 } |
| 75 virtual void clipPath(const SkPath& p, SkRegion::Op op, bool aa) { | 75 virtual void clipRRect(const SkRRect& r, SkRegion::Op op, bool aa) SK_OVERRI
DE { |
| 76 fTarget->clipRRect(r, op, aa); |
| 77 } |
| 78 virtual void clipPath(const SkPath& p, SkRegion::Op op, bool aa) SK_OVERRIDE
{ |
| 76 fTarget->clipPath(p, op, aa); | 79 fTarget->clipPath(p, op, aa); |
| 77 } | 80 } |
| 78 | 81 |
| 79 private: | 82 private: |
| 80 SkCanvas* fTarget; | 83 SkCanvas* fTarget; |
| 81 }; | 84 }; |
| 82 | 85 |
| 83 static void test_clipVisitor(skiatest::Reporter* reporter, SkCanvas* canvas) { | 86 static void test_clipVisitor(skiatest::Reporter* reporter, SkCanvas* canvas) { |
| 84 SkISize size = canvas->getDeviceSize(); | 87 SkISize size = canvas->getDeviceSize(); |
| 85 | 88 |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 SkPictureTester::TestPictureFlattenedObjectReuse(reporter, | 903 SkPictureTester::TestPictureFlattenedObjectReuse(reporter, |
| 901 testStepArray()[testStep], 0); | 904 testStepArray()[testStep], 0); |
| 902 if (testStepArray()[testStep]->enablePdfTesting()) { | 905 if (testStepArray()[testStep]->enablePdfTesting()) { |
| 903 TestPdfDevice(reporter, testStepArray()[testStep]); | 906 TestPdfDevice(reporter, testStepArray()[testStep]); |
| 904 } | 907 } |
| 905 } | 908 } |
| 906 | 909 |
| 907 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i
s a global) | 910 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i
s a global) |
| 908 kTestBitmap.reset(); | 911 kTestBitmap.reset(); |
| 909 } | 912 } |
| OLD | NEW |