aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CanvasTest.cpp
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-05-02 16:49:24 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-02 21:17:01 +0000
commit343fe49b82d5b220d64c64f253bb362026006632 (patch)
treee20dbd15a38ee573b2b90f1e8d955d4a46c4a5ee /tests/CanvasTest.cpp
parent5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c (diff)
Remove translateZ and lights from SkCanvas
Bug: skia:6557 Change-Id: I0dbf70c4131ab59e7fc6c674a6587767af98e13a Reviewed-on: https://skia-review.googlesource.com/15151 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/CanvasTest.cpp')
-rw-r--r--tests/CanvasTest.cpp56
1 files changed, 0 insertions, 56 deletions
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index cca692b47a..b304a0d253 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -658,46 +658,6 @@ DEF_TEST(Canvas_ClipEmptyPath, reporter) {
canvas.restore();
}
-#define SHADOW_TEST_CANVAS_CONST 10
-#ifdef SK_EXPERIMENTAL_SHADOWING
-class SkShadowTestCanvas : public SkPaintFilterCanvas {
-public:
-
- SkShadowTestCanvas(int x, int y, skiatest::Reporter* reporter)
- : INHERITED(x,y)
- , fReporter(reporter) {}
-
- bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type type) const {
- REPORTER_ASSERT(this->fReporter, this->getZ() == SHADOW_TEST_CANVAS_CONST);
-
- return true;
- }
-
- void testUpdateDepth(skiatest::Reporter *reporter) {
- // set some depths (with picture enabled), then check them as they get set
-
- REPORTER_ASSERT(reporter, this->getZ() == 0);
- this->translateZ(-10);
- REPORTER_ASSERT(reporter, this->getZ() == -10);
-
- this->save();
- this->translateZ(20);
- REPORTER_ASSERT(reporter, this->getZ() == 10);
-
- this->restore();
- REPORTER_ASSERT(reporter, this->getZ() == -10);
-
- this->translateZ(13.14f);
- REPORTER_ASSERT(reporter, SkScalarNearlyEqual(this->getZ(), 3.14f));
- }
-
-private:
- skiatest::Reporter* fReporter;
-
- typedef SkPaintFilterCanvas INHERITED;
-};
-#endif
-
namespace {
class MockFilterCanvas : public SkPaintFilterCanvas {
@@ -727,22 +687,6 @@ DEF_TEST(PaintFilterCanvas_ConsistentState, reporter) {
filterCanvas.scale(0.75f, 0.5f);
REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMatrix());
REPORTER_ASSERT(reporter, filterCanvas.getLocalClipBounds().contains(canvas.getLocalClipBounds()));
-
-#ifdef SK_EXPERIMENTAL_SHADOWING
- SkShadowTestCanvas* tCanvas = new SkShadowTestCanvas(100,100, reporter);
- tCanvas->testUpdateDepth(reporter);
- delete(tCanvas);
-
- SkPictureRecorder recorder;
- SkShadowTestCanvas *tSCanvas = new SkShadowTestCanvas(100, 100, reporter);
- SkCanvas *tPCanvas = recorder.beginRecording(SkRect::MakeIWH(100, 100));
-
- tPCanvas->translateZ(SHADOW_TEST_CANVAS_CONST);
- sk_sp<SkPicture> pic = recorder.finishRecordingAsPicture();
- tSCanvas->drawPicture(pic);
-
- delete(tSCanvas);
-#endif
}
///////////////////////////////////////////////////////////////////////////////////////////////////