diff options
author | reed <reed@google.com> | 2015-01-05 07:49:08 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-05 07:49:08 -0800 |
commit | 41af966ab338e95eee81ab618ab28195075338f7 (patch) | |
tree | e11def4f93345bfb4204d20f6f28fc7a2fecda1a /src/pipe | |
parent | 49aabde6ef80e39f00a2d00487cf5a881987dd81 (diff) |
Revert of Revert of move remaining virtual draw methods to onDraw (patchset #1 id:1 of https://codereview.chromium.org/835913002/)
Reason for revert:
test to see if it wasn't this CL that broke chromeos
Original issue's description:
> Revert of move remaining virtual draw methods to onDraw (patchset #5 id:80001 of https://codereview.chromium.org/817723005/)
>
> Reason for revert:
> did this cause chromeos heap corruption on skp?
>
> Original issue's description:
> > move remaining virtual draw methods to onDraw
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/2e0f7d53bba5438c9bf11ee5ccae2c301e348419
>
> TBR=robertphillips@google.com,djsollen@google.com,bsalomon@google.com,mtklein@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e87e383351e1547b21d96d02bcd0c3cbbe0837f1
TBR=robertphillips@google.com,djsollen@google.com,bsalomon@google.com,mtklein@google.com,reed@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/831253002
Diffstat (limited to 'src/pipe')
-rw-r--r-- | src/pipe/SkGPipeWrite.cpp | 85 |
1 files changed, 42 insertions, 43 deletions
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp index 45b26dbaf8..6044360933 100644 --- a/src/pipe/SkGPipeWrite.cpp +++ b/src/pipe/SkGPipeWrite.cpp @@ -231,28 +231,6 @@ public: return (NULL == fBitmapHeap) ? 0 : fBitmapHeap->bytesAllocated(); } - // overrides from SkCanvas - virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; - virtual void drawPoints(PointMode, size_t count, const SkPoint pts[], - const SkPaint&) SK_OVERRIDE; - virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; - virtual void drawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE; - virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; - virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE; - virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top, - const SkPaint*) SK_OVERRIDE; - virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src, - const SkRect& dst, const SkPaint* paint, - DrawBitmapRectFlags flags) SK_OVERRIDE; - virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, - const SkRect& dst, const SkPaint* paint = NULL) SK_OVERRIDE; - virtual void drawSprite(const SkBitmap&, int left, int top, - const SkPaint*) SK_OVERRIDE; - virtual void drawVertices(VertexMode, int vertexCount, - const SkPoint vertices[], const SkPoint texs[], - const SkColor colors[], SkXfermode*, - const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; virtual void beginCommentGroup(const char* description) SK_OVERRIDE; virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; virtual void endCommentGroup() SK_OVERRIDE; @@ -285,6 +263,29 @@ protected: virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint) SK_OVERRIDE; + void onDrawPaint(const SkPaint&) SK_OVERRIDE; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; + void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; + void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, + DrawBitmapRectFlags flags) SK_OVERRIDE; +#if 0 + // rely on decomposition into bitmap (for now) + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; +#endif + void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, + const SkPaint*) SK_OVERRIDE; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + void onDrawVertices(VertexMode vmode, int vertexCount, + const SkPoint vertices[], const SkPoint texs[], + const SkColor colors[], SkXfermode* xmode, + const uint16_t indices[], int indexCount, + const SkPaint&) SK_OVERRIDE; virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; @@ -668,7 +669,7 @@ void SkGPipeCanvas::onClipRegion(const SkRegion& region, SkRegion::Op rgnOp) { /////////////////////////////////////////////////////////////////////////////// -void SkGPipeCanvas::drawPaint(const SkPaint& paint) { +void SkGPipeCanvas::onDrawPaint(const SkPaint& paint) { NOTIFY_SETUP(this); this->writePaint(paint); if (this->needOpBytes()) { @@ -676,8 +677,8 @@ void SkGPipeCanvas::drawPaint(const SkPaint& paint) { } } -void SkGPipeCanvas::drawPoints(PointMode mode, size_t count, - const SkPoint pts[], const SkPaint& paint) { +void SkGPipeCanvas::onDrawPoints(PointMode mode, size_t count, + const SkPoint pts[], const SkPaint& paint) { if (count) { NOTIFY_SETUP(this); this->writePaint(paint); @@ -689,7 +690,7 @@ void SkGPipeCanvas::drawPoints(PointMode mode, size_t count, } } -void SkGPipeCanvas::drawOval(const SkRect& rect, const SkPaint& paint) { +void SkGPipeCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { NOTIFY_SETUP(this); this->writePaint(paint); if (this->needOpBytes(sizeof(SkRect))) { @@ -698,7 +699,7 @@ void SkGPipeCanvas::drawOval(const SkRect& rect, const SkPaint& paint) { } } -void SkGPipeCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { +void SkGPipeCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) { NOTIFY_SETUP(this); this->writePaint(paint); if (this->needOpBytes(sizeof(SkRect))) { @@ -707,7 +708,7 @@ void SkGPipeCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { } } -void SkGPipeCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { +void SkGPipeCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { NOTIFY_SETUP(this); this->writePaint(paint); if (this->needOpBytes(kSizeOfFlatRRect)) { @@ -727,7 +728,7 @@ void SkGPipeCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, } } -void SkGPipeCanvas::drawPath(const SkPath& path, const SkPaint& paint) { +void SkGPipeCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) { NOTIFY_SETUP(this); this->writePaint(paint); if (this->needOpBytes(path.writeToMemory(NULL))) { @@ -763,8 +764,8 @@ bool SkGPipeCanvas::commonDrawBitmap(const SkBitmap& bm, DrawOps op, return false; } -void SkGPipeCanvas::drawBitmap(const SkBitmap& bm, SkScalar left, SkScalar top, - const SkPaint* paint) { +void SkGPipeCanvas::onDrawBitmap(const SkBitmap& bm, SkScalar left, SkScalar top, + const SkPaint* paint) { NOTIFY_SETUP(this); size_t opBytesNeeded = sizeof(SkScalar) * 2; @@ -774,9 +775,8 @@ void SkGPipeCanvas::drawBitmap(const SkBitmap& bm, SkScalar left, SkScalar top, } } -void SkGPipeCanvas::drawBitmapRectToRect(const SkBitmap& bm, const SkRect* src, - const SkRect& dst, const SkPaint* paint, - DrawBitmapRectFlags dbmrFlags) { +void SkGPipeCanvas::onDrawBitmapRect(const SkBitmap& bm, const SkRect* src, const SkRect& dst, + const SkPaint* paint, DrawBitmapRectFlags dbmrFlags) { NOTIFY_SETUP(this); size_t opBytesNeeded = sizeof(SkRect); bool hasSrc = src != NULL; @@ -799,8 +799,8 @@ void SkGPipeCanvas::drawBitmapRectToRect(const SkBitmap& bm, const SkRect* src, } } -void SkGPipeCanvas::drawBitmapNine(const SkBitmap& bm, const SkIRect& center, - const SkRect& dst, const SkPaint* paint) { +void SkGPipeCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& center, + const SkRect& dst, const SkPaint* paint) { NOTIFY_SETUP(this); size_t opBytesNeeded = sizeof(int32_t) * 4 + sizeof(SkRect); @@ -813,8 +813,7 @@ void SkGPipeCanvas::drawBitmapNine(const SkBitmap& bm, const SkIRect& center, } } -void SkGPipeCanvas::drawSprite(const SkBitmap& bm, int left, int top, - const SkPaint* paint) { +void SkGPipeCanvas::onDrawSprite(const SkBitmap& bm, int left, int top, const SkPaint* paint) { NOTIFY_SETUP(this); size_t opBytesNeeded = sizeof(int32_t) * 2; @@ -980,11 +979,11 @@ void SkGPipeCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr this->INHERITED::onDrawPicture(picture, matrix, paint); } -void SkGPipeCanvas::drawVertices(VertexMode vmode, int vertexCount, - const SkPoint vertices[], const SkPoint texs[], - const SkColor colors[], SkXfermode* xfer, - const uint16_t indices[], int indexCount, - const SkPaint& paint) { +void SkGPipeCanvas::onDrawVertices(VertexMode vmode, int vertexCount, + const SkPoint vertices[], const SkPoint texs[], + const SkColor colors[], SkXfermode* xfer, + const uint16_t indices[], int indexCount, + const SkPaint& paint) { if (0 == vertexCount) { return; } |