diff options
author | Mike Reed <reed@google.com> | 2017-01-19 22:21:16 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-20 04:07:06 +0000 |
commit | 1e18aecd0b5bdb6dea0b0bcebf985a8bb221e6a6 (patch) | |
tree | 830c0a3d09524893921c7c65f48a7c260dd0572b /src/core/SkBitmapDevice.h | |
parent | 34c69d63477c8992d3242c02899008810e04af6e (diff) |
remove unused device apis
BUG=skia:
Change-Id: I7a6b185a0fbe779e3fa4c135437d4d1fb9b94bd8
Reviewed-on: https://skia-review.googlesource.com/7322
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkBitmapDevice.h')
-rw-r--r-- | src/core/SkBitmapDevice.h | 60 |
1 files changed, 16 insertions, 44 deletions
diff --git a/src/core/SkBitmapDevice.h b/src/core/SkBitmapDevice.h index 776b6a0dec..2d67271c02 100644 --- a/src/core/SkBitmapDevice.h +++ b/src/core/SkBitmapDevice.h @@ -71,14 +71,11 @@ protected: DrawFilter. */ void drawPaint(const SkDraw&, const SkPaint& paint) override; - virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, + void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, const SkPoint[], const SkPaint& paint) override; - virtual void drawRect(const SkDraw&, const SkRect& r, - const SkPaint& paint) override; - virtual void drawOval(const SkDraw&, const SkRect& oval, - const SkPaint& paint) override; - virtual void drawRRect(const SkDraw&, const SkRRect& rr, - const SkPaint& paint) override; + void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) override; + void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) override; + void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) override; /** * If pathIsMutable, then the implementation is allowed to cast path to a @@ -91,14 +88,10 @@ protected: * affect the geometry/rasterization, then the pre matrix can just be * pre-concated with the current matrix. */ - virtual void drawPath(const SkDraw&, const SkPath& path, - const SkPaint& paint, - const SkMatrix* prePathMatrix = NULL, - bool pathIsMutable = false) override; - virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, - const SkMatrix& matrix, const SkPaint& paint) override; - virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, - int x, int y, const SkPaint& paint) override; + void drawPath(const SkDraw&, const SkPath&, const SkPaint&, const SkMatrix* prePathMatrix, + bool pathIsMutable) override; + void drawBitmap(const SkDraw&, const SkBitmap&, const SkMatrix&, const SkPaint&) override; + void drawSprite(const SkDraw&, const SkBitmap&, int x, int y, const SkPaint&) override; /** * The default impl. will create a bitmap-shader from the bitmap, @@ -111,17 +104,14 @@ protected: * Does not handle text decoration. * Decorations (underline and stike-thru) will be handled by SkCanvas. */ - virtual void drawText(const SkDraw&, const void* text, size_t len, - SkScalar x, SkScalar y, const SkPaint& paint) override; - virtual void drawPosText(const SkDraw&, const void* text, size_t len, - const SkScalar pos[], int scalarsPerPos, - const SkPoint& offset, const SkPaint& paint) override; - virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, - const SkPoint verts[], const SkPoint texs[], - const SkColor colors[], SkBlendMode, - const uint16_t indices[], int indexCount, - const SkPaint& paint) override; - virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&) override; + void drawText(const SkDraw&, const void* text, size_t len, SkScalar x, SkScalar y, + const SkPaint&) override; + void drawPosText(const SkDraw&, const void* text, size_t len, const SkScalar pos[], + int scalarsPerPos, const SkPoint& offset, const SkPaint& paint) override; + void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, const SkPoint verts[], + const SkPoint texs[], const SkColor colors[], SkBlendMode, + const uint16_t indices[], int indexCount, const SkPaint&) override; + void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&) override; /////////////////////////////////////////////////////////////////////////// @@ -132,24 +122,6 @@ protected: /////////////////////////////////////////////////////////////////////////// - /** Update as needed the pixel value in the bitmap, so that the caller can - access the pixels directly. Note: only the pixels field should be - altered. The config/width/height/rowbytes must remain unchanged. - @return the device contents as a bitmap - */ -#ifdef SK_SUPPORT_LEGACY_ACCESSBITMAP - const SkBitmap& onAccessBitmap() override; -#else - const SkBitmap& onAccessBitmap(); -#endif - - SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } - // just for subclasses, to assign a custom pixelref - void setPixelRef(sk_sp<SkPixelRef> pr) { fBitmap.setPixelRef(std::move(pr), 0, 0); } -#ifdef SK_SUPPORT_LEGACY_BITMAP_SETPIXELREF - SkPixelRef* setPixelRef(SkPixelRef* pr) { return fBitmap.setPixelRef(pr); } -#endif - bool onReadPixels(const SkImageInfo&, void*, size_t, int x, int y) override; bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) override; bool onPeekPixels(SkPixmap*) override; |