This CL plumbs in the drawBitmapRectToRect "bleed" flag and makes it live on the simplest GPU path.
R=bsalomon@google.com, reed@google.com, edisonn@google.com, scroggo@google.com, jvanverth@google.com, mtklein@google.com
Author: robertphillips@google.com
Review URL: https://chromiumcodereview.appspot.com/20806003
git-svn-id: http://skia.googlecode.com/svn/trunk@10765 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 961b9d7..d143b85 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1751,7 +1751,8 @@
// this one is non-virtual, so it can be called safely by other canvas apis
void SkCanvas::internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
- const SkRect& dst, const SkPaint* paint) {
+ const SkRect& dst, const SkPaint* paint,
+ DrawBitmapRectFlags flags) {
if (bitmap.width() == 0 || bitmap.height() == 0 || dst.isEmpty()) {
return;
}
@@ -1777,16 +1778,17 @@
LOOPER_BEGIN(*paint, SkDrawFilter::kBitmap_Type)
while (iter.next()) {
- iter.fDevice->drawBitmapRect(iter, bitmap, src, dst, looper.paint());
+ iter.fDevice->drawBitmapRect(iter, bitmap, src, dst, looper.paint(), flags);
}
LOOPER_END
}
void SkCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
- const SkRect& dst, const SkPaint* paint) {
+ const SkRect& dst, const SkPaint* paint,
+ DrawBitmapRectFlags flags) {
SkDEBUGCODE(bitmap.validate();)
- this->internalDrawBitmapRect(bitmap, src, dst, paint);
+ this->internalDrawBitmapRect(bitmap, src, dst, paint, flags);
}
void SkCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& matrix,
@@ -1856,7 +1858,8 @@
s.fRight = srcX[x+1];
d.fLeft = dstX[x];
d.fRight = dstX[x+1];
- this->internalDrawBitmapRect(bitmap, &s, d, paint);
+ this->internalDrawBitmapRect(bitmap, &s, d, paint,
+ kNone_DrawBitmapRectflag);
}
}
}