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 13:20:52 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-18 13:20:52 +0000
commitc75c36a14b5dcc0dd5a82651d41792278cb27326 (patch)
tree3a844486daa7132fc317ac76e7ff8ed5b09e7db9 /src/pipe
parentf1ab723033a186dc53434104a636c2dfac5fc863 (diff)
revert 5578 -- broke pipe
git-svn-id: http://skia.googlecode.com/svn/trunk@5579 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pipe')
-rw-r--r--src/pipe/SkGPipePriv.h2
-rw-r--r--src/pipe/SkGPipeWrite.cpp11
2 files changed, 8 insertions, 5 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/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);
}