diff options
author | Jim Van Verth <jvanverth@google.com> | 2017-05-02 16:49:24 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-02 21:17:01 +0000 |
commit | 343fe49b82d5b220d64c64f253bb362026006632 (patch) | |
tree | e20dbd15a38ee573b2b90f1e8d955d4a46c4a5ee | |
parent | 5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c (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>
-rw-r--r-- | include/core/SkCanvas.h | 30 | ||||
-rw-r--r-- | include/private/SkRecords.h | 2 | ||||
-rw-r--r-- | src/core/SkCanvas.cpp | 30 | ||||
-rw-r--r-- | src/core/SkLiteDL.cpp | 13 | ||||
-rw-r--r-- | src/core/SkLiteRecorder.cpp | 4 | ||||
-rw-r--r-- | src/core/SkLiteRecorder.h | 6 | ||||
-rw-r--r-- | src/core/SkPictureFlat.h | 4 | ||||
-rw-r--r-- | src/core/SkPicturePlayback.cpp | 8 | ||||
-rw-r--r-- | src/core/SkPictureRecord.cpp | 12 | ||||
-rw-r--r-- | src/core/SkPictureRecord.h | 6 | ||||
-rw-r--r-- | src/core/SkRecordDraw.cpp | 7 | ||||
-rw-r--r-- | src/core/SkRecorder.cpp | 6 | ||||
-rw-r--r-- | src/core/SkRecorder.h | 6 | ||||
-rw-r--r-- | tests/CanvasTest.cpp | 56 | ||||
-rw-r--r-- | tools/debugger/SkDebugCanvas.cpp | 7 | ||||
-rw-r--r-- | tools/debugger/SkDebugCanvas.h | 6 | ||||
-rw-r--r-- | tools/debugger/SkDrawCommand.cpp | 41 | ||||
-rw-r--r-- | tools/debugger/SkDrawCommand.h | 16 |
18 files changed, 5 insertions, 255 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 21e5c1c521..a259e531f3 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -423,24 +423,6 @@ public: */ void resetMatrix(); -#ifdef SK_EXPERIMENTAL_SHADOWING - /** Add the specified translation to the current draw depth of the canvas. - @param z The distance to translate in Z. - Negative into screen, positive out of screen. - Without translation, the draw depth defaults to 0. - */ - void translateZ(SkScalar z); - - /** Set the current set of lights in the canvas. - @param lights The lights that we want the canvas to have. - */ - void setLights(sk_sp<SkLights> lights); - - /** Returns the current set of lights the canvas uses - */ - sk_sp<SkLights> getLights() const; -#endif - /** * Modify the current clip with the specified rectangle. * @param rect The rect to combine with the current clip @@ -1249,14 +1231,6 @@ public: void temporary_internal_getRgnClip(SkRegion*); protected: -#ifdef SK_EXPERIMENTAL_SHADOWING - /** Returns the current (cumulative) draw depth of the canvas. - */ - SkScalar getZ() const; - - sk_sp<SkLights> fLights; -#endif - // default impl defers to getDevice()->newSurface(info) virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&); @@ -1288,10 +1262,6 @@ protected: this->didConcat(SkMatrix::MakeTrans(dx, dy)); } -#ifdef SK_EXPERIMENTAL_SHADOWING - virtual void didTranslateZ(SkScalar) {} -#endif - virtual SkRect onGetLocalClipBounds() const; virtual SkIRect onGetDeviceClipBounds() const; diff --git a/include/private/SkRecords.h b/include/private/SkRecords.h index 95067d18cb..02d2108a4c 100644 --- a/include/private/SkRecords.h +++ b/include/private/SkRecords.h @@ -50,7 +50,6 @@ namespace SkRecords { M(SaveLayer) \ M(SetMatrix) \ M(Translate) \ - M(TranslateZ) \ M(Concat) \ M(ClipPath) \ M(ClipRRect) \ @@ -191,7 +190,6 @@ RECORD(Concat, 0, RECORD(Translate, 0, SkScalar dx; SkScalar dy); -RECORD(TranslateZ, 0, SkScalar z); struct ClipOpAndAA { ClipOpAndAA() {} diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index ad9bcf5132..5e33dbf371 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -293,22 +293,17 @@ public: SkMatrix fMatrix; int fDeferredSaveCount; - // This is the current cumulative depth (aggregate of all done translateZ calls) - SkScalar fCurDrawDepth; - MCRec() { fFilter = nullptr; fLayer = nullptr; fTopLayer = nullptr; fMatrix.reset(); fDeferredSaveCount = 0; - fCurDrawDepth = 0; // don't bother initializing fNext inc_rec(); } - MCRec(const MCRec& prev) : fRasterClip(prev.fRasterClip), fMatrix(prev.fMatrix), - fCurDrawDepth(prev.fCurDrawDepth) { + MCRec(const MCRec& prev) : fRasterClip(prev.fRasterClip), fMatrix(prev.fMatrix) { fFilter = SkSafeRef(prev.fFilter); fLayer = nullptr; fTopLayer = prev.fTopLayer; @@ -640,9 +635,6 @@ SkBaseDevice* SkCanvas::init(SkBaseDevice* device, InitFlags flags) { fAllowSimplifyClip = false; fSaveCount = 1; fMetaData = nullptr; -#ifdef SK_EXPERIMENTAL_SHADOWING - fLights = nullptr; -#endif fMCRec = (MCRec*)fMCStack.push_back(); new (fMCRec) MCRec; @@ -1405,26 +1397,6 @@ void SkCanvas::resetMatrix() { this->setMatrix(SkMatrix::I()); } -#ifdef SK_EXPERIMENTAL_SHADOWING -void SkCanvas::translateZ(SkScalar z) { - this->checkForDeferredSave(); - this->fMCRec->fCurDrawDepth += z; - this->didTranslateZ(z); -} - -SkScalar SkCanvas::getZ() const { - return this->fMCRec->fCurDrawDepth; -} - -void SkCanvas::setLights(sk_sp<SkLights> lights) { - this->fLights = lights; -} - -sk_sp<SkLights> SkCanvas::getLights() const { - return this->fLights; -} -#endif - ////////////////////////////////////////////////////////////////////////////// void SkCanvas::clipRect(const SkRect& rect, SkClipOp op, bool doAA) { diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp index fb629ddc66..0162327d40 100644 --- a/src/core/SkLiteDL.cpp +++ b/src/core/SkLiteDL.cpp @@ -47,7 +47,7 @@ static const D* pod(const T* op, size_t offset = 0) { namespace { #define TYPES(M) \ M(SetDrawFilter) M(Save) M(Restore) M(SaveLayer) \ - M(Concat) M(SetMatrix) M(Translate) M(TranslateZ) \ + M(Concat) M(SetMatrix) M(Translate) \ M(ClipPath) M(ClipRect) M(ClipRRect) M(ClipRegion) \ M(DrawPaint) M(DrawPath) M(DrawRect) M(DrawRegion) M(DrawOval) M(DrawArc) \ M(DrawRRect) M(DrawDRRect) M(DrawAnnotation) M(DrawDrawable) M(DrawPicture) \ @@ -133,16 +133,6 @@ namespace { c->translate(dx, dy); } }; - struct TranslateZ final : Op { - static const auto kType = Type::TranslateZ; - TranslateZ(SkScalar dz) : dz(dz) {} - SkScalar dz; - void draw(SkCanvas* c, const SkMatrix&) const { - #ifdef SK_EXPERIMENTAL_SHADOWING - c->translateZ(dz); - #endif - } - }; struct ClipPath final : Op { static const auto kType = Type::ClipPath; @@ -538,7 +528,6 @@ void SkLiteDL::saveLayer(const SkRect* bounds, const SkPaint* paint, void SkLiteDL:: concat(const SkMatrix& matrix) { this->push <Concat>(0, matrix); } void SkLiteDL::setMatrix(const SkMatrix& matrix) { this->push<SetMatrix>(0, matrix); } void SkLiteDL::translate(SkScalar dx, SkScalar dy) { this->push<Translate>(0, dx, dy); } -void SkLiteDL::translateZ(SkScalar dz) { this->push<TranslateZ>(0, dz); } void SkLiteDL::clipPath(const SkPath& path, SkClipOp op, bool aa) { this->push<ClipPath>(0, path, op, aa); diff --git a/src/core/SkLiteRecorder.cpp b/src/core/SkLiteRecorder.cpp index d25254956d..5affb3d4ab 100644 --- a/src/core/SkLiteRecorder.cpp +++ b/src/core/SkLiteRecorder.cpp @@ -194,7 +194,3 @@ void SkLiteRecorder::onDrawAtlas(const SkImage* atlas, const SkPaint* paint) { fDL->drawAtlas(atlas, xforms, texs, colors, count, bmode, cull, paint); } - -void SkLiteRecorder::didTranslateZ(SkScalar dz) { - fDL->translateZ(dz); -} diff --git a/src/core/SkLiteRecorder.h b/src/core/SkLiteRecorder.h index 9f524939fd..3c156af721 100644 --- a/src/core/SkLiteRecorder.h +++ b/src/core/SkLiteRecorder.h @@ -78,12 +78,6 @@ public: void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[], int, SkBlendMode, const SkRect*, const SkPaint*) override; -#ifdef SK_EXPERIMENTAL_SHADOWING - void didTranslateZ(SkScalar) override; -#else - void didTranslateZ(SkScalar); -#endif - private: typedef SkNoDrawCanvas INHERITED; diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h index 745a7e3c48..5340fcb660 100644 --- a/src/core/SkPictureFlat.h +++ b/src/core/SkPictureFlat.h @@ -87,9 +87,9 @@ enum DrawType { DRAW_DRAWABLE_MATRIX, DRAW_TEXT_RSXFORM, - TRANSLATE_Z, + TRANSLATE_Z, // deprecated (M60) - DRAW_SHADOWED_PICTURE_LIGHTS, + DRAW_SHADOWED_PICTURE_LIGHTS, // deprecated (M60) DRAW_IMAGE_LATTICE, DRAW_ARC, DRAW_REGION, diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index 3af7909eff..cad665bf21 100644 --- a/src/core/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -783,14 +783,6 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader, canvas->translate(dx, dy); } break; - case TRANSLATE_Z: { -#ifdef SK_EXPERIMENTAL_SHADOWING - SkScalar dz = reader->readScalar(); - BREAK_ON_READ_ERROR(reader); - - canvas->translateZ(dz); -#endif - } break; default: SkASSERTF(false, "Unknown draw type: %d", op); } diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp index f794b73423..69a35f59ad 100644 --- a/src/core/SkPictureRecord.cpp +++ b/src/core/SkPictureRecord.cpp @@ -234,18 +234,6 @@ void SkPictureRecord::didSetMatrix(const SkMatrix& matrix) { this->INHERITED::didSetMatrix(matrix); } -void SkPictureRecord::didTranslateZ(SkScalar z) { -#ifdef SK_EXPERIMENTAL_SHADOWING - this->validate(fWriter.bytesWritten(), 0); - // op + scalar - size_t size = 1 * kUInt32Size + 1 * sizeof(SkScalar); - size_t initialOffset = this->addDraw(TRANSLATE_Z, &size); - this->addScalar(z); - this->validate(initialOffset, size); - this->INHERITED::didTranslateZ(z); -#endif -} - static bool clipOpExpands(SkClipOp op) { switch (op) { case kUnion_SkClipOp: diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h index dcdfebe984..08aa33537f 100644 --- a/src/core/SkPictureRecord.h +++ b/src/core/SkPictureRecord.h @@ -164,12 +164,6 @@ protected: void didConcat(const SkMatrix&) override; void didSetMatrix(const SkMatrix&) override; -#ifdef SK_EXPERIMENTAL_SHADOWING - void didTranslateZ(SkScalar) override; -#else - void didTranslateZ(SkScalar); -#endif - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; void onDrawText(const void* text, size_t, SkScalar x, SkScalar y, const SkPaint&) override; diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp index 634676c2d6..fbb7f7ce6a 100644 --- a/src/core/SkRecordDraw.cpp +++ b/src/core/SkRecordDraw.cpp @@ -89,12 +89,6 @@ DRAW(ClipRRect, clipRRect(r.rrect, r.opAA.op(), r.opAA.aa())); DRAW(ClipRect, clipRect(r.rect, r.opAA.op(), r.opAA.aa())); DRAW(ClipRegion, clipRegion(r.region, r.op)); -#ifdef SK_EXPERIMENTAL_SHADOWING -DRAW(TranslateZ, SkCanvas::translateZ(r.z)); -#else -template <> void Draw::draw(const TranslateZ& r) { } -#endif - DRAW(DrawArc, drawArc(r.oval, r.startAngle, r.sweepAngle, r.useCenter, r.paint)); DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint)); DRAW(DrawImage, drawImage(r.image.get(), r.left, r.top, r.paint)); @@ -297,7 +291,6 @@ private: void trackBounds(const SetMatrix&) { this->pushControl(); } void trackBounds(const Concat&) { this->pushControl(); } void trackBounds(const Translate&) { this->pushControl(); } - void trackBounds(const TranslateZ&) { this->pushControl(); } void trackBounds(const ClipRect&) { this->pushControl(); } void trackBounds(const ClipRRect&) { this->pushControl(); } void trackBounds(const ClipPath&) { this->pushControl(); } diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp index c111db6606..64d613df96 100644 --- a/src/core/SkRecorder.cpp +++ b/src/core/SkRecorder.cpp @@ -372,12 +372,6 @@ void SkRecorder::didTranslate(SkScalar dx, SkScalar dy) { APPEND(Translate, dx, dy); } -void SkRecorder::didTranslateZ(SkScalar z) { -#ifdef SK_EXPERIMENTAL_SHADOWING - APPEND(TranslateZ, z); -#endif -} - void SkRecorder::onClipRect(const SkRect& rect, SkClipOp op, ClipEdgeStyle edgeStyle) { INHERITED(onClipRect, rect, op, edgeStyle); SkRecords::ClipOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); diff --git a/src/core/SkRecorder.h b/src/core/SkRecorder.h index c815744046..5344934665 100644 --- a/src/core/SkRecorder.h +++ b/src/core/SkRecorder.h @@ -62,12 +62,6 @@ public: void didSetMatrix(const SkMatrix&) override; void didTranslate(SkScalar, SkScalar) override; -#ifdef SK_EXPERIMENTAL_SHADOWING - void didTranslateZ(SkScalar) override; -#else - void didTranslateZ(SkScalar); -#endif - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; void onDrawDrawable(SkDrawable*, const SkMatrix*) override; void onDrawText(const void* text, 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 } /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp index bed6da03cf..23f4ae3f21 100644 --- a/tools/debugger/SkDebugCanvas.cpp +++ b/tools/debugger/SkDebugCanvas.cpp @@ -621,13 +621,6 @@ void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) { this->INHERITED::didSetMatrix(matrix); } -void SkDebugCanvas::didTranslateZ(SkScalar z) { -#ifdef SK_EXPERIMENTAL_SHADOWING - this->addDrawCommand(new SkTranslateZCommand(z)); - this->INHERITED::didTranslateZ(z); -#endif -} - void SkDebugCanvas::toggleCommand(int index, bool toggle) { SkASSERT(index < fCommandVector.count()); fCommandVector[index]->setVisible(toggle); diff --git a/tools/debugger/SkDebugCanvas.h b/tools/debugger/SkDebugCanvas.h index 6eb3456dff..9b944f7d5d 100644 --- a/tools/debugger/SkDebugCanvas.h +++ b/tools/debugger/SkDebugCanvas.h @@ -195,12 +195,6 @@ protected: void didSetMatrix(const SkMatrix &) override; -#ifdef SK_EXPERIMENTAL_SHADOWING - void didTranslateZ(SkScalar) override; -#else - void didTranslateZ(SkScalar); -#endif - void onDrawAnnotation(const SkRect&, const char[], SkData*) override; void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp index 6029f83018..16a270b037 100644 --- a/tools/debugger/SkDrawCommand.cpp +++ b/tools/debugger/SkDrawCommand.cpp @@ -237,7 +237,6 @@ const char* SkDrawCommand::GetCommandString(OpType type) { case kSave_OpType: return "Save"; case kSaveLayer_OpType: return "SaveLayer"; case kSetMatrix_OpType: return "SetMatrix"; - case kTranslateZ_OpType: return "TranslateZ"; default: SkDebugf("OpType error 0x%08x\n", type); SkASSERT(0); @@ -295,9 +294,6 @@ SkDrawCommand* SkDrawCommand::fromJSON(Json::Value& command, UrlDataManager& url INSTALL_FACTORY(Save); INSTALL_FACTORY(SaveLayer); INSTALL_FACTORY(SetMatrix); -#ifdef SK_EXPERIMENTAL_SHADOWING - INSTALL_FACTORY(TranslateZ); -#endif } SkString name = SkString(command[SKDEBUGCANVAS_ATTRIBUTE_COMMAND].asCString()); FROM_JSON* factory = factories.find(name); @@ -1570,14 +1566,6 @@ static void extract_json_matrix(Json::Value& matrix, SkMatrix* result) { result->set9(values); } -#ifdef SK_EXPERIMENTAL_SHADOWING -// somehow this is only used in shadows... -static void extract_json_scalar(Json::Value& scalar, SkScalar* result) { - SkScalar value = scalar.asFloat(); - *result = value; -} -#endif - static void extract_json_path(Json::Value& path, SkPath* result) { const char* fillType = path[SKDEBUGCANVAS_ATTRIBUTE_FILLTYPE].asCString(); if (!strcmp(fillType, SKDEBUGCANVAS_FILLTYPE_WINDING)) { @@ -3469,32 +3457,3 @@ SkSetMatrixCommand* SkSetMatrixCommand::fromJSON(Json::Value& command, extract_json_matrix(command[SKDEBUGCANVAS_ATTRIBUTE_MATRIX], &matrix); return new SkSetMatrixCommand(matrix); } - -SkTranslateZCommand::SkTranslateZCommand(SkScalar z) - : INHERITED(kTranslateZ_OpType) { - fZTranslate = z; - fInfo.push(SkObjectParser::ScalarToString(fZTranslate, "drawDepthTranslation")); -} - -void SkTranslateZCommand::execute(SkCanvas* canvas) const { -#ifdef SK_EXPERIMENTAL_SHADOWING - canvas->translateZ(fZTranslate); -#endif -} - -Json::Value SkTranslateZCommand::toJSON(UrlDataManager& urlDataManager) const { - Json::Value result = INHERITED::toJSON(urlDataManager); - result[SKDEBUGCANVAS_ATTRIBUTE_DRAWDEPTHTRANS] = MakeJsonScalar(fZTranslate); - return result; -} - -SkTranslateZCommand* SkTranslateZCommand::fromJSON(Json::Value& command, - UrlDataManager& urlDataManager) { - SkScalar z; -#ifdef SK_EXPERIMENTAL_SHADOWING - extract_json_scalar(command[SKDEBUGCANVAS_ATTRIBUTE_DRAWDEPTHTRANS], &z); -#else - z = 0; -#endif - return new SkTranslateZCommand(z); -} diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h index ff64dd5d9f..fc2f45adef 100644 --- a/tools/debugger/SkDrawCommand.h +++ b/tools/debugger/SkDrawCommand.h @@ -57,9 +57,8 @@ public: kSave_OpType, kSaveLayer_OpType, kSetMatrix_OpType, - kTranslateZ_OpType, - kLast_OpType = kTranslateZ_OpType + kLast_OpType = kSetMatrix_OpType }; static const int kOpTypeCount = kLast_OpType + 1; @@ -761,18 +760,5 @@ private: typedef SkDrawCommand INHERITED; }; - -class SkTranslateZCommand : public SkDrawCommand { -public: - SkTranslateZCommand(SkScalar); - void execute(SkCanvas* canvas) const override; - Json::Value toJSON(UrlDataManager& urlDataManager) const override; - static SkTranslateZCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); - -private: - SkScalar fZTranslate; - - typedef SkDrawCommand INHERITED; -}; #endif |