diff options
-rw-r--r-- | experimental/CocoaDebugger/SkDumpCanvasM.cpp | 8 | ||||
-rw-r--r-- | experimental/CocoaDebugger/SkDumpCanvasM.h | 2 | ||||
-rw-r--r-- | gm/shapes.cpp | 8 | ||||
-rw-r--r-- | include/core/SkCanvas.h | 7 | ||||
-rw-r--r-- | include/pdf/SkPDFDevice.h | 6 | ||||
-rw-r--r-- | include/utils/SkDumpCanvas.h | 2 | ||||
-rw-r--r-- | include/utils/SkNWayCanvas.h | 1 | ||||
-rw-r--r-- | include/utils/SkProxyCanvas.h | 1 | ||||
-rw-r--r-- | samplecode/SamplePicture.cpp | 64 | ||||
-rw-r--r-- | samplecode/SampleShapes.cpp | 8 | ||||
-rw-r--r-- | src/core/SkCanvas.cpp | 6 | ||||
-rw-r--r-- | src/core/SkPictureFlat.h | 1 | ||||
-rw-r--r-- | src/core/SkPicturePlayback.cpp | 45 | ||||
-rw-r--r-- | src/core/SkPicturePlayback.h | 9 | ||||
-rw-r--r-- | src/core/SkPictureRecord.cpp | 16 | ||||
-rw-r--r-- | src/core/SkPictureRecord.h | 5 | ||||
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 21 | ||||
-rw-r--r-- | src/pipe/SkGPipePriv.h | 1 | ||||
-rw-r--r-- | src/pipe/SkGPipeRead.cpp | 6 | ||||
-rw-r--r-- | src/pipe/SkGPipeWrite.cpp | 5 | ||||
-rw-r--r-- | src/utils/SkDumpCanvas.cpp | 8 | ||||
-rw-r--r-- | src/utils/SkNWayCanvas.cpp | 7 | ||||
-rw-r--r-- | src/utils/SkProxyCanvas.cpp | 4 |
23 files changed, 26 insertions, 215 deletions
diff --git a/experimental/CocoaDebugger/SkDumpCanvasM.cpp b/experimental/CocoaDebugger/SkDumpCanvasM.cpp index dae5fdbe0f..841837d7cd 100644 --- a/experimental/CocoaDebugger/SkDumpCanvasM.cpp +++ b/experimental/CocoaDebugger/SkDumpCanvasM.cpp @@ -351,14 +351,6 @@ void SkDumpCanvasM::drawTextOnPath(const void* text, size_t byteLength, str.c_str(), byteLength); } -void SkDumpCanvasM::drawShape(SkShape* shape) { - this->dump(kDrawShape_Verb, NULL, "drawShape(%p)", shape); - fNestLevel += 1; - this->INHERITED::drawShape(shape); - fNestLevel -= 1; - this->dump(kDrawShape_Verb, NULL, "endShape(%p)", shape); -} - void SkDumpCanvasM::drawPicture(SkPicture& picture) { this->dump(kDrawPicture_Verb, NULL, "drawPicture(%p) %d:%d", &picture, picture.width(), picture.height()); diff --git a/experimental/CocoaDebugger/SkDumpCanvasM.h b/experimental/CocoaDebugger/SkDumpCanvasM.h index 23b62ec391..24f0ca71f2 100644 --- a/experimental/CocoaDebugger/SkDumpCanvasM.h +++ b/experimental/CocoaDebugger/SkDumpCanvasM.h @@ -33,7 +33,6 @@ public: kDrawBitmap_Verb, kDrawText_Verb, kDrawPicture_Verb, - kDrawShape_Verb, kDrawVertices_Verb, kDrawData_Verb }; @@ -97,7 +96,6 @@ public: const SkPath& path, const SkMatrix* matrix, const SkPaint& paint); virtual void drawPicture(SkPicture&); - virtual void drawShape(SkShape*); virtual void drawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, diff --git a/gm/shapes.cpp b/gm/shapes.cpp index 5daea0aa4d..c4ba9aded8 100644 --- a/gm/shapes.cpp +++ b/gm/shapes.cpp @@ -95,16 +95,14 @@ protected: matrix.preScale(SK_Scalar1*2, SK_Scalar1*2); gs->appendShape(&fGroup, matrix); -#if 0 - canvas->drawShape(gs); -#else +#if 1 SkPicture* pict = new SkPicture; SkCanvas* cv = pict->beginRecording(1000, 1000); cv->scale(SK_ScalarHalf, SK_ScalarHalf); - cv->drawShape(gs); + gs->draw(cv); cv->translate(SkIntToScalar(680), SkIntToScalar(480)); cv->scale(-SK_Scalar1, SK_Scalar1); - cv->drawShape(gs); + gs->draw(cv); pict->endRecording(); canvas->drawPicture(*pict); pict->unref(); diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 9b96790f3e..a7f01c4b3d 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -34,7 +34,6 @@ class SkDeviceFactory; class SkDraw; class SkDrawFilter; class SkPicture; -class SkShape; /** \class SkCanvas @@ -63,7 +62,7 @@ public: */ explicit SkCanvas(SkDeviceFactory* factory = NULL); - /** Construct a canvas with the specified device to draw into. The device
+ /** Construct a canvas with the specified device to draw into. The device factory will be retrieved from the passed device. @param device Specifies a device for the canvas to draw into. @@ -677,10 +676,6 @@ public: */ virtual void drawPicture(SkPicture& picture); - /** Draws the specified shape - */ - virtual void drawShape(SkShape*); - enum VertexMode { kTriangles_VertexMode, kTriangleStrip_VertexMode, diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index 2205f6cf58..afe0ffff80 100644 --- a/include/pdf/SkPDFDevice.h +++ b/include/pdf/SkPDFDevice.h @@ -137,9 +137,15 @@ public: /** Returns a SkStream with the page contents. The caller is responsible for a reference to the returned value. + DEPRECATED: use copyContentToData() */ SK_API SkStream* content() const; + /** Returns a SkStream with the page contents. The caller is responsible + * for calling data->unref() when it is finished. + */ + SK_API SkData* copyContentToData() const; + SK_API const SkMatrix& initialTransform() const { return fInitialTransform; } diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h index 3731bef822..3d2805ced8 100644 --- a/include/utils/SkDumpCanvas.h +++ b/include/utils/SkDumpCanvas.h @@ -33,7 +33,6 @@ public: kDrawBitmap_Verb, kDrawText_Verb, kDrawPicture_Verb, - kDrawShape_Verb, kDrawVertices_Verb, kDrawData_Verb }; @@ -97,7 +96,6 @@ public: const SkPath& path, const SkMatrix* matrix, const SkPaint& paint); virtual void drawPicture(SkPicture&); - virtual void drawShape(SkShape*); virtual void drawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h index 03bd6d10c6..21d1ba6ea4 100644 --- a/include/utils/SkNWayCanvas.h +++ b/include/utils/SkNWayCanvas.h @@ -57,7 +57,6 @@ public: const SkPath& path, const SkMatrix* matrix, const SkPaint& paint); virtual void drawPicture(SkPicture&); - virtual void drawShape(SkShape*); virtual void drawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, diff --git a/include/utils/SkProxyCanvas.h b/include/utils/SkProxyCanvas.h index 8d8daec589..195b74d9e4 100644 --- a/include/utils/SkProxyCanvas.h +++ b/include/utils/SkProxyCanvas.h @@ -64,7 +64,6 @@ public: const SkPath& path, const SkMatrix* matrix, const SkPaint& paint); virtual void drawPicture(SkPicture&); - virtual void drawShape(SkShape*); virtual void drawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp index d7b6b229f4..585b2f20f1 100644 --- a/samplecode/SamplePicture.cpp +++ b/samplecode/SamplePicture.cpp @@ -14,7 +14,6 @@ #include "SkUtils.h" #include "SkColorPriv.h" #include "SkColorFilter.h" -#include "SkShape.h" #include "SkTime.h" #include "SkTypeface.h" #include "SkXfermode.h" @@ -22,67 +21,6 @@ #include "SkStream.h" #include "SkXMLParser.h" -class SignalShape : public SkShape { -public: - SignalShape() : fSignal(0) {} - - SkShape* setSignal(int n) { - fSignal = n; - return this; - } - -protected: - virtual void onDraw(SkCanvas* canvas) { - // SkDebugf("---- sc %d\n", canvas->getSaveCount() - 1); - } - -private: - int fSignal; -}; - -static SkPMColor SignalProc(SkPMColor src, SkPMColor dst) { - return dst; -} - -/* Picture playback will skip blocks of draw calls that follow a clip() call - that returns empty, and jump down to the corresponding restore() call. - - This is a great preformance win for drawing very large/tall pictures with - a small visible window (think scrolling a long document). These tests make - sure that (a) we are performing the culling, and (b) we don't get confused - by nested save() calls, nor by calls to restoreToCount(). - */ -static void test_saveRestoreCulling() { - SkPaint signalPaint; - SignalShape signalShape; - - SkPicture pic; - SkRect r = SkRect::MakeWH(0, 0); - int n; - SkCanvas* canvas = pic.beginRecording(100, 100); - int startN = canvas->getSaveCount(); - SkDebugf("---- start sc %d\n", startN); - canvas->drawShape(signalShape.setSignal(1)); - canvas->save(); - canvas->drawShape(signalShape.setSignal(2)); - n = canvas->save(); - canvas->drawShape(signalShape.setSignal(3)); - canvas->save(); - canvas->clipRect(r); - canvas->drawShape(signalShape.setSignal(4)); - canvas->restoreToCount(n); - canvas->drawShape(signalShape.setSignal(5)); - canvas->restore(); - canvas->drawShape(signalShape.setSignal(6)); - SkASSERT(canvas->getSaveCount() == startN); - - SkBitmap bm; - bm.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); - bm.allocPixels(); - SkCanvas c(bm); - c.drawPicture(pic); -} - /////////////////////////////////////////////////////////////////////////////// #include "SkImageRef_GlobalPool.h" @@ -137,8 +75,6 @@ public: // unref fPicture in our destructor, and it will in turn take care of // the other references to fSubPicture fSubPicture->unref(); - - test_saveRestoreCulling(); } virtual ~PictureView() { diff --git a/samplecode/SampleShapes.cpp b/samplecode/SampleShapes.cpp index dc10f1a454..6742017a48 100644 --- a/samplecode/SampleShapes.cpp +++ b/samplecode/SampleShapes.cpp @@ -127,16 +127,14 @@ protected: matrix.preScale(SK_Scalar1*2, SK_Scalar1*2); gs->appendShape(&fGroup, matrix); -#if 0 - canvas->drawShape(gs); -#else +#if 1 SkPicture* pict = new SkPicture; SkCanvas* cv = pict->beginRecording(1000, 1000); cv->scale(SK_ScalarHalf, SK_ScalarHalf); - cv->drawShape(gs); + gs->draw(cv); cv->translate(SkIntToScalar(680), SkIntToScalar(480)); cv->scale(-SK_Scalar1, SK_Scalar1); - cv->drawShape(gs); + gs->draw(cv); pict->endRecording(); drawpicture(canvas, *pict); diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index f8dd0288f1..7325c025ec 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -22,7 +22,6 @@ #include "SkDrawLooper.h" #include "SkPicture.h" #include "SkScalarCompare.h" -#include "SkShape.h" #include "SkTemplates.h" #include "SkTLazy.h" #include "SkUtils.h" @@ -1646,11 +1645,6 @@ void SkCanvas::drawPicture(SkPicture& picture) { restoreToCount(saveCount); } -void SkCanvas::drawShape(SkShape* shape) { - // shape baseclass takes care of save/restore - shape->draw(this); -} - /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h index 697b399a6a..a11f5565d8 100644 --- a/src/core/SkPictureFlat.h +++ b/src/core/SkPictureFlat.h @@ -28,7 +28,6 @@ enum DrawType { DRAW_POS_TEXT_H, DRAW_POS_TEXT_H_TOP_BOTTOM, // fast variant of DRAW_POS_TEXT_H DRAW_RECT, - DRAW_SHAPE, DRAW_SPRITE, DRAW_TEXT, DRAW_TEXT_ON_PATH, diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index 67b68655a8..05663e5fd7 100644 --- a/src/core/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -120,17 +120,6 @@ SkPicturePlayback::SkPicturePlayback(const SkPictureRecord& record) { } } - const SkTDArray<SkShape* >& shapes = record.getShapes(); - fShapeCount = shapes.count(); - if (fShapeCount > 0) { - fShapes = SkNEW_ARRAY(SkShape*, fShapeCount); - for (int i = 0; i < fShapeCount; i++) { - SkShape* s = shapes[i]; - SkSafeRef(s); - fShapes[i] = s; - } - } - const SkTDArray<const SkFlatRegion* >& regions = record.getRegions(); fRegionCount = regions.count(); if (fRegionCount > 0) { @@ -203,14 +192,6 @@ SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src) { fPictureRefs[i]->ref(); } - fShapeCount = src.fShapeCount; - fShapes = SkNEW_ARRAY(SkShape*, fShapeCount); - for (int i = 0; i < fShapeCount; i++) { - SkShape* s = src.fShapes[i]; - SkSafeRef(s); - fShapes[i] = s; - } - fRegionCount = src.fRegionCount; fRegions = SkNEW_ARRAY(SkRegion, fRegionCount); for (i = 0; i < fRegionCount; i++) { @@ -224,10 +205,9 @@ void SkPicturePlayback::init() { fPaints = NULL; fPathHeap = NULL; fPictureRefs = NULL; - fShapes = NULL; fRegions = NULL; fBitmapCount = fMatrixCount = fPaintCount = fPictureCount = - fRegionCount = fShapeCount = 0; + fRegionCount = 0; fFactoryPlayback = NULL; } @@ -247,11 +227,6 @@ SkPicturePlayback::~SkPicturePlayback() { } SkDELETE_ARRAY(fPictureRefs); - for (int i = 0; i < fShapeCount; i++) { - SkSafeUnref(fShapes[i]); - } - SkDELETE_ARRAY(fShapes); - SkDELETE(fFactoryPlayback); } @@ -281,7 +256,6 @@ void SkPicturePlayback::dumpSize() const { #define PICT_PAINT_TAG SkSetFourByteTag('p', 'n', 't', ' ') #define PICT_PATH_TAG SkSetFourByteTag('p', 't', 'h', ' ') #define PICT_REGION_TAG SkSetFourByteTag('r', 'g', 'n', ' ') -#define PICT_SHAPE_TAG SkSetFourByteTag('s', 'h', 'p', ' ') #include "SkStream.h" @@ -378,11 +352,6 @@ void SkPicturePlayback::serialize(SkWStream* stream) const { buffer.writePad(storage.get(), size); } - writeTagSize(buffer, PICT_SHAPE_TAG, fShapeCount); - for (i = 0; i < fShapeCount; i++) { - buffer.writeFlattenable(fShapes[i]); - } - // now we can write to the stream again writeFactories(stream, factSet); @@ -491,12 +460,6 @@ SkPicturePlayback::SkPicturePlayback(SkStream* stream) { SkDEBUGCODE(uint32_t bytes =) fRegions[i].unflatten(buffer.skip(size)); SkASSERT(size == bytes); } - - fShapeCount = readTagSize(buffer, PICT_SHAPE_TAG); - fShapes = SkNEW_ARRAY(SkShape*, fShapeCount); - for (i = 0; i < fShapeCount; i++) { - fShapes[i] = reinterpret_cast<SkShape*>(buffer.readFlattenable()); - } } /////////////////////////////////////////////////////////////////////////////// @@ -651,12 +614,6 @@ void SkPicturePlayback::draw(SkCanvas& canvas) { const SkPaint& paint = *getPaint(); canvas.drawRect(*fReader.skipRect(), paint); } break; - case DRAW_SHAPE: { - SkShape* shape = getShape(); - if (shape) { - canvas.drawShape(shape); - } - } break; case DRAW_SPRITE: { const SkPaint* paint = getPaint(); const SkBitmap& bitmap = getBitmap(); diff --git a/src/core/SkPicturePlayback.h b/src/core/SkPicturePlayback.h index 350df78363..7eda16750a 100644 --- a/src/core/SkPicturePlayback.h +++ b/src/core/SkPicturePlayback.h @@ -11,7 +11,6 @@ #include "SkPathHeap.h" #include "SkRegion.h" #include "SkPictureFlat.h" -#include "SkShape.h" #ifdef ANDROID #include "SkThread.h" @@ -78,12 +77,6 @@ private: return *fPictureRefs[index - 1]; } - SkShape* getShape() { - int index = getInt(); - SkASSERT(index > 0 && index <= fShapeCount); - return fShapes[index - 1]; - } - const SkPaint* getPaint() { int index = getInt(); if (index == 0) { @@ -170,8 +163,6 @@ private: SkPicture** fPictureRefs; int fPictureCount; - SkShape** fShapes; - int fShapeCount; SkRefCntPlayback fRCPlayback; SkTypefacePlayback fTFPlayback; diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp index 6b2b330c55..9339efca38 100644 --- a/src/core/SkPictureRecord.cpp +++ b/src/core/SkPictureRecord.cpp @@ -1,5 +1,4 @@ #include "SkPictureRecord.h" -#include "SkShape.h" #include "SkTSearch.h" #define MIN_WRITER_SIZE 16384 @@ -368,20 +367,6 @@ void SkPictureRecord::drawPicture(SkPicture& picture) { validate(); } -void SkPictureRecord::drawShape(SkShape* shape) { - addDraw(DRAW_SHAPE); - - int index = fShapes.find(shape); - if (index < 0) { // not found - index = fShapes.count(); - *fShapes.append() = shape; - shape->ref(); - } - // follow the convention of recording a 1-based index - addInt(index + 1); - validate(); -} - void SkPictureRecord::drawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode*, @@ -433,7 +418,6 @@ void SkPictureRecord::reset() { fPaints.reset(); fPictureRefs.unrefAll(); fRegions.reset(); - fShapes.safeUnrefAll(); fWriter.reset(); fHeap.reset(); diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h index e0d6a508ae..9c86cf90d9 100644 --- a/src/core/SkPictureRecord.h +++ b/src/core/SkPictureRecord.h @@ -51,7 +51,6 @@ public: const SkPath& path, const SkMatrix* matrix, const SkPaint&); virtual void drawPicture(SkPicture& picture); - virtual void drawShape(SkShape*); virtual void drawVertices(VertexMode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode*, @@ -73,9 +72,6 @@ public: const SkTDArray<SkPicture* >& getPictureRefs() const { return fPictureRefs; } - const SkTDArray<SkShape* >& getShapes() const { - return fShapes; - } const SkTDArray<const SkFlatRegion* >& getRegions() const { return fRegions; } @@ -173,7 +169,6 @@ private: // we ref each item in these arrays SkTDArray<SkPicture*> fPictureRefs; - SkTDArray<SkShape*> fShapes; SkRefCntSet fRCSet; SkRefCntSet fTFSet; diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index bd944710e8..d48ce7dda7 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -1081,10 +1081,13 @@ SkRefPtr<SkPDFArray> SkPDFDevice::getMediaBox() const { return mediaBox; } -/** - * Can this return SkData instead of SkStream? - */ SkStream* SkPDFDevice::content() const { + SkMemoryStream* result = new SkMemoryStream; + result->setData(this->copyContentToData())->unref(); + return result; +} + +SkData* SkPDFDevice::copyContentToData() const { SkDynamicMemoryWStream data; if (fInitialTransform.getType() != SkMatrix::kIdentity_Mask) { SkPDFUtils::AppendTransform(fInitialTransform, &data); @@ -1097,11 +1100,11 @@ SkStream* SkPDFDevice::content() const { SkRect r = SkRect::MakeWH(this->width(), this->height()); emit_clip(NULL, &r, &data); } - + GraphicStackState gsState(fExistingClipStack, fExistingClipRegion, &data); for (ContentEntry* entry = fContentEntries.get(); - entry != NULL; - entry = entry->fNext.get()) { + entry != NULL; + entry = entry->fNext.get()) { SkIPoint translation = this->getOrigin(); translation.negate(); gsState.updateClip(entry->fState.fClipStack, entry->fState.fClipRegion, @@ -1114,9 +1117,9 @@ SkStream* SkPDFDevice::content() const { } gsState.drainStack(); - SkMemoryStream* result = new SkMemoryStream; - result->setData(data.copyToData())->unref(); - return result; + // potentially we could cache this SkData, and only rebuild it if we + // see that our state has changed. + return data.copyToData(); } void SkPDFDevice::createFormXObjectFromDevice( diff --git a/src/pipe/SkGPipePriv.h b/src/pipe/SkGPipePriv.h index 06ba7b6aaa..7122992a46 100644 --- a/src/pipe/SkGPipePriv.h +++ b/src/pipe/SkGPipePriv.h @@ -56,7 +56,6 @@ enum DrawOps { kDrawPosText_DrawOp, kDrawPosTextH_DrawOp, kDrawRect_DrawOp, - kDrawShape_DrawOp, kDrawSprite_DrawOp, kDrawText_DrawOp, kDrawTextOnPath_DrawOp, diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp index fb0fbc497e..07d4ee21e3 100644 --- a/src/pipe/SkGPipeRead.cpp +++ b/src/pipe/SkGPipeRead.cpp @@ -364,11 +364,6 @@ static void drawData_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, canvas->drawData(data, size); } -static void drawShape_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, - SkGPipeState* state) { - UNIMPLEMENTED -} - static void drawPicture_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, SkGPipeState* state) { UNIMPLEMENTED @@ -463,7 +458,6 @@ static const ReadProc gReadTable[] = { drawPosText_rp, drawPosTextH_rp, drawRect_rp, - drawShape_rp, drawSprite_rp, drawText_rp, drawTextOnPath_rp, diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp index 1ff7d4501f..b1eebc87ce 100644 --- a/src/pipe/SkGPipeWrite.cpp +++ b/src/pipe/SkGPipeWrite.cpp @@ -127,7 +127,6 @@ public: const SkPath& path, const SkMatrix* matrix, const SkPaint&); virtual void drawPicture(SkPicture& picture); - virtual void drawShape(SkShape*); virtual void drawVertices(VertexMode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode*, @@ -591,10 +590,6 @@ void SkGPipeCanvas::drawPicture(SkPicture& picture) { this->INHERITED::drawPicture(picture); } -void SkGPipeCanvas::drawShape(SkShape* shape) { - UNIMPLEMENTED -} - void SkGPipeCanvas::drawVertices(VertexMode mode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode*, diff --git a/src/utils/SkDumpCanvas.cpp b/src/utils/SkDumpCanvas.cpp index 223a4f704f..af67c06035 100644 --- a/src/utils/SkDumpCanvas.cpp +++ b/src/utils/SkDumpCanvas.cpp @@ -351,14 +351,6 @@ void SkDumpCanvas::drawTextOnPath(const void* text, size_t byteLength, str.c_str(), byteLength); } -void SkDumpCanvas::drawShape(SkShape* shape) { - this->dump(kDrawShape_Verb, NULL, "drawShape(%p)", shape); - fNestLevel += 1; - this->INHERITED::drawShape(shape); - fNestLevel -= 1; - this->dump(kDrawShape_Verb, NULL, "endShape(%p)", shape); -} - void SkDumpCanvas::drawPicture(SkPicture& picture) { this->dump(kDrawPicture_Verb, NULL, "drawPicture(%p) %d:%d", &picture, picture.width(), picture.height()); diff --git a/src/utils/SkNWayCanvas.cpp b/src/utils/SkNWayCanvas.cpp index d3c84a145e..d60f259f67 100644 --- a/src/utils/SkNWayCanvas.cpp +++ b/src/utils/SkNWayCanvas.cpp @@ -248,13 +248,6 @@ void SkNWayCanvas::drawPicture(SkPicture& picture) { } } -void SkNWayCanvas::drawShape(SkShape* shape) { - Iter iter(fList); - while (iter.next()) { - iter->drawShape(shape); - } -} - void SkNWayCanvas::drawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, diff --git a/src/utils/SkProxyCanvas.cpp b/src/utils/SkProxyCanvas.cpp index 33f77e485e..9c94d598e3 100644 --- a/src/utils/SkProxyCanvas.cpp +++ b/src/utils/SkProxyCanvas.cpp @@ -126,10 +126,6 @@ void SkProxyCanvas::drawPicture(SkPicture& picture) { fProxy->drawPicture(picture); } -void SkProxyCanvas::drawShape(SkShape* shape) { - fProxy->drawShape(shape); -} - void SkProxyCanvas::drawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, |