aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pipe
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-18 14:04:54 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-18 14:04:54 +0000
commit10f9f4a844c8d5260c0a02df94b940b6abf66b0d (patch)
tree3a844486daa7132fc317ac76e7ff8ed5b09e7db9 /src/pipe
parenteab16dea1ce249dc8e4dc635cd76b6b1b7d0cc98 (diff)
revert 5580
git-svn-id: http://skia.googlecode.com/svn/trunk@5581 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pipe')
-rw-r--r--src/pipe/SkGPipePriv.h2
-rw-r--r--src/pipe/SkGPipeRead.cpp6
-rw-r--r--src/pipe/SkGPipeWrite.cpp11
3 files changed, 11 insertions, 8 deletions
diff --git a/src/pipe/SkGPipePriv.h b/src/pipe/SkGPipePriv.h
index 31803ea9b5..207a3bdc8a 100644
--- a/src/pipe/SkGPipePriv.h
+++ b/src/pipe/SkGPipePriv.h
@@ -41,7 +41,7 @@ enum DrawOps {
kDrawBitmap_DrawOp,
kDrawBitmapMatrix_DrawOp,
kDrawBitmapNine_DrawOp,
- kDrawBitmapRectToRect_DrawOp,
+ kDrawBitmapRect_DrawOp,
kDrawClear_DrawOp,
kDrawData_DrawOp,
kDrawPaint_DrawOp,
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp
index 137ecb7062..803685a07d 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 SkRect* src;
+ const SkIRect* src;
if (hasSrc) {
- src = skip<SkRect>(reader);
+ src = skip<SkIRect>(reader);
} else {
src = NULL;
}
const SkRect* dst = skip<SkRect>(reader);
- canvas->drawBitmapRectToRect(*holder.getBitmap(), src, *dst, hasPaint ? &state->paint() : NULL);
+ canvas->drawBitmapRect(*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 f0b4e0aee6..b41ebb72fd 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 drawBitmapRectToRect(const SkBitmap&, const SkRect* src,
+ virtual void drawBitmapRect(const SkBitmap&, const SkIRect* 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::drawBitmapRectToRect(const SkBitmap& bm, const SkRect* src,
+void SkGPipeCanvas::drawBitmapRect(const SkBitmap& bm, const SkIRect* src,
const SkRect& dst, const SkPaint* paint) {
NOTIFY_SETUP(this);
size_t opBytesNeeded = sizeof(SkRect);
@@ -745,9 +745,12 @@ void SkGPipeCanvas::drawBitmapRectToRect(const SkBitmap& bm, const SkRect* src,
flags = 0;
}
- if (this->commonDrawBitmap(bm, kDrawBitmapRectToRect_DrawOp, flags, opBytesNeeded, paint)) {
+ if (this->commonDrawBitmap(bm, kDrawBitmapRect_DrawOp, flags, opBytesNeeded, paint)) {
if (hasSrc) {
- fWriter.writeRect(*src);
+ fWriter.write32(src->fLeft);
+ fWriter.write32(src->fTop);
+ fWriter.write32(src->fRight);
+ fWriter.write32(src->fBottom);
}
fWriter.writeRect(dst);
}