diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-18 15:14:33 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-18 15:14:33 +0000 |
commit | 7112173c3c4cd1b1e7da8cdf971d71f01dd91299 (patch) | |
tree | 854ffd9e48edda9dd70b2f7ad3d788000b8f7def /src/pipe | |
parent | acfb30e5bb797249f4ec41edda4c4d4b86e0e5d0 (diff) |
re-re-land 5578
will follow w/ new .skp files to keep the waterfall green (I hope)
git-svn-id: http://skia.googlecode.com/svn/trunk@5584 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pipe')
-rw-r--r-- | src/pipe/SkGPipePriv.h | 2 | ||||
-rw-r--r-- | src/pipe/SkGPipeRead.cpp | 6 | ||||
-rw-r--r-- | src/pipe/SkGPipeWrite.cpp | 11 |
3 files changed, 8 insertions, 11 deletions
diff --git a/src/pipe/SkGPipePriv.h b/src/pipe/SkGPipePriv.h index 207a3bdc8a..31803ea9b5 100644 --- a/src/pipe/SkGPipePriv.h +++ b/src/pipe/SkGPipePriv.h @@ -41,7 +41,7 @@ enum DrawOps { kDrawBitmap_DrawOp, kDrawBitmapMatrix_DrawOp, kDrawBitmapNine_DrawOp, - kDrawBitmapRect_DrawOp, + kDrawBitmapRectToRect_DrawOp, kDrawClear_DrawOp, kDrawData_DrawOp, kDrawPaint_DrawOp, diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp index 803685a07d..137ecb7062 100644 --- a/src/pipe/SkGPipeRead.cpp +++ b/src/pipe/SkGPipeRead.cpp @@ -490,14 +490,14 @@ static void drawBitmapRect_rp(SkCanvas* canvas, SkReader32* reader, unsigned flags = DrawOp_unpackFlags(op32); bool hasPaint = SkToBool(flags & kDrawBitmap_HasPaint_DrawOpFlag); bool hasSrc = SkToBool(flags & kDrawBitmap_HasSrcRect_DrawOpFlag); - const SkIRect* src; + const SkRect* src; if (hasSrc) { - src = skip<SkIRect>(reader); + src = skip<SkRect>(reader); } else { src = NULL; } const SkRect* dst = skip<SkRect>(reader); - canvas->drawBitmapRect(*holder.getBitmap(), src, *dst, hasPaint ? &state->paint() : NULL); + canvas->drawBitmapRectToRect(*holder.getBitmap(), src, *dst, hasPaint ? &state->paint() : NULL); } static void drawSprite_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp index b41ebb72fd..f0b4e0aee6 100644 --- a/src/pipe/SkGPipeWrite.cpp +++ b/src/pipe/SkGPipeWrite.cpp @@ -221,7 +221,7 @@ public: 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 drawBitmapRect(const SkBitmap&, const SkIRect* src, + virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*) SK_OVERRIDE; virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&, const SkPaint*) SK_OVERRIDE; @@ -732,7 +732,7 @@ void SkGPipeCanvas::drawBitmap(const SkBitmap& bm, SkScalar left, SkScalar top, } } -void SkGPipeCanvas::drawBitmapRect(const SkBitmap& bm, const SkIRect* src, +void SkGPipeCanvas::drawBitmapRectToRect(const SkBitmap& bm, const SkRect* src, const SkRect& dst, const SkPaint* paint) { NOTIFY_SETUP(this); size_t opBytesNeeded = sizeof(SkRect); @@ -745,12 +745,9 @@ void SkGPipeCanvas::drawBitmapRect(const SkBitmap& bm, const SkIRect* src, flags = 0; } - if (this->commonDrawBitmap(bm, kDrawBitmapRect_DrawOp, flags, opBytesNeeded, paint)) { + if (this->commonDrawBitmap(bm, kDrawBitmapRectToRect_DrawOp, flags, opBytesNeeded, paint)) { if (hasSrc) { - fWriter.write32(src->fLeft); - fWriter.write32(src->fTop); - fWriter.write32(src->fRight); - fWriter.write32(src->fBottom); + fWriter.writeRect(*src); } fWriter.writeRect(dst); } |