diff --git a/src/core/SkBBoxRecord.cpp b/src/core/SkBBoxRecord.cpp
index 52d599f..3668087 100644
--- a/src/core/SkBBoxRecord.cpp
+++ b/src/core/SkBBoxRecord.cpp
@@ -134,9 +134,10 @@
 }
 
 void SkBBoxRecord::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
-                                  const SkRect& dst, const SkPaint* paint) {
+                                        const SkRect& dst, const SkPaint* paint,
+                                        DrawBitmapRectFlags flags) {
     if (this->transformBounds(dst, paint)) {
-        INHERITED::drawBitmapRectToRect(bitmap, src, dst, paint);
+        INHERITED::drawBitmapRectToRect(bitmap, src, dst, paint, flags);
     }
 }
 
diff --git a/src/core/SkBBoxRecord.h b/src/core/SkBBoxRecord.h
index 9f79671..7859df1 100644
--- a/src/core/SkBBoxRecord.h
+++ b/src/core/SkBBoxRecord.h
@@ -42,7 +42,8 @@
     virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
                             const SkPaint* paint = NULL) SK_OVERRIDE;
     virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
-                                const SkRect& dst, const SkPaint* paint) SK_OVERRIDE;
+                                      const SkRect& dst, const SkPaint* paint,
+                                      DrawBitmapRectFlags flags) SK_OVERRIDE;
     virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& mat,
                                   const SkPaint* paint) SK_OVERRIDE;
     virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
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);
         }
     }
 }
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index 408cda2..8b7131a 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -377,7 +377,8 @@
 
 void SkDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
                               const SkRect* src, const SkRect& dst,
-                              const SkPaint& paint) {
+                              const SkPaint& paint, 
+                              SkCanvas::DrawBitmapRectFlags flags) {
     SkMatrix    matrix;
     SkRect      bitmapBounds, tmpSrc, tmpDst;
     SkBitmap    tmpBitmap;
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index d8ad80d..06b54f6 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -273,7 +273,11 @@
     if (!stream->read(&info, sizeof(SkPictInfo))) {
         return false;
     }
-    if (PICTURE_VERSION != info.fVersion) {
+    if (PICTURE_VERSION != info.fVersion
+#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO
+        && PRIOR_PICTURE_VERSION != info.fVersion  // TODO: remove when .skps regenerated
+#endif
+        ) { 
         return false;
     }
 
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index fe1a037..77c2afd 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -834,7 +834,20 @@
                 const SkBitmap& bitmap = getBitmap(reader);
                 const SkRect* src = this->getRectPtr(reader);   // may be null
                 const SkRect& dst = reader.skipT<SkRect>();     // required
-                canvas.drawBitmapRectToRect(bitmap, src, dst, paint);
+                SkCanvas::DrawBitmapRectFlags flags;
+#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO
+                flags = SkCanvas::kNone_DrawBitmapRectflag;
+                // TODO: remove this backwards compatibility code once the .skps are 
+                // regenerated
+                SkASSERT(32 == size || 48 == size ||    // old sizes
+                         36 == size || 52 == size);     // new sizes
+                if (36 == size || 52 == size) {
+#endif
+                    flags = (SkCanvas::DrawBitmapRectFlags) reader.readInt();
+#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO
+                }
+#endif
+                canvas.drawBitmapRectToRect(bitmap, src, dst, paint, flags);
             } break;
             case DRAW_BITMAP_MATRIX: {
                 const SkPaint* paint = getPaint(reader);
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 2c2d334..7a85381 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -913,9 +913,10 @@
 }
 
 void SkPictureRecord::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
-                            const SkRect& dst, const SkPaint* paint) {
-    // id + paint index + bitmap index + bool for 'src'
-    uint32_t size = 4 * kUInt32Size;
+                                           const SkRect& dst, const SkPaint* paint,
+                                           DrawBitmapRectFlags flags) {
+    // id + paint index + bitmap index + bool for 'src' + flags
+    uint32_t size = 5 * kUInt32Size;
     if (NULL != src) {
         size += sizeof(*src);   // + rect
     }
@@ -927,6 +928,7 @@
     addBitmap(bitmap);
     addRectPtr(src);  // may be null
     addRect(dst);
+    addInt(flags);
     validate(initialOffset, size);
 }
 
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index 0ea857d..4e30302 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -59,7 +59,8 @@
     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*) SK_OVERRIDE;
+                                      const SkRect& dst, const SkPaint* paint, 
+                                      DrawBitmapRectFlags flags) SK_OVERRIDE;
     virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&,
                                   const SkPaint*) SK_OVERRIDE;
     virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index be56eb6..81e8a78 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1082,14 +1082,16 @@
                              const SkMatrix& m,
                              const SkPaint& paint) {
     // We cannot call drawBitmapRect here since 'm' could be anything
-    this->drawBitmapCommon(draw, bitmap, NULL, m, paint);
+    this->drawBitmapCommon(draw, bitmap, NULL, m, paint,
+                           SkCanvas::kNone_DrawBitmapRectflag);
 }
 
 void SkGpuDevice::drawBitmapCommon(const SkDraw& draw,
                                    const SkBitmap& bitmap,
                                    const SkRect* srcRectPtr,
                                    const SkMatrix& m,
-                                   const SkPaint& paint) {
+                                   const SkPaint& paint,
+                                   SkCanvas::DrawBitmapRectFlags flags) {
     CHECK_SHOULD_DRAW(draw, false);
 
     SkRect srcRect;
@@ -1100,6 +1102,8 @@
     }
 
     if (paint.getMaskFilter()){
+        // TODO: this path needs to be updated to respect the bleed flag
+
         // Convert the bitmap to a shader so that the rect can be drawn
         // through drawRect, which supports mask filters.
         SkMatrix        newM(m);
@@ -1168,9 +1172,9 @@
 
     if (!this->shouldTileBitmap(bitmap, params, srcRectPtr)) {
         // take the simple case
-        this->internalDrawBitmap(bitmap, srcRect, m, params, paint);
+        this->internalDrawBitmap(bitmap, srcRect, m, params, paint, flags);
     } else {
-        this->drawTiledBitmap(bitmap, srcRect, m, params, paint);
+        this->drawTiledBitmap(bitmap, srcRect, m, params, paint, flags);
     }
 }
 
@@ -1180,7 +1184,9 @@
                                   const SkRect& srcRect,
                                   const SkMatrix& m,
                                   const GrTextureParams& params,
-                                  const SkPaint& paint) {
+                                  const SkPaint& paint,
+                                  SkCanvas::DrawBitmapRectFlags flags) {
+    // TODO: this method needs to be updated to respect the bleed flag
     const int maxTextureSize = fContext->getMaxTextureSize();
 
     int tileSize = determine_tile_size(bitmap, srcRect, maxTextureSize);
@@ -1229,7 +1235,7 @@
                 tmpM.preTranslate(SkIntToScalar(iTileR.fLeft),
                                   SkIntToScalar(iTileR.fTop));
 
-                this->internalDrawBitmap(tmpB, tileR, tmpM, params, paint);
+                this->internalDrawBitmap(tmpB, tileR, tmpM, params, paint, flags);
             }
         }
     }
@@ -1288,7 +1294,8 @@
                                      const SkRect& srcRect,
                                      const SkMatrix& m,
                                      const GrTextureParams& params,
-                                     const SkPaint& paint) {
+                                     const SkPaint& paint,
+                                     SkCanvas::DrawBitmapRectFlags flags) {
     SkASSERT(bitmap.width() <= fContext->getMaxTextureSize() &&
              bitmap.height() <= fContext->getMaxTextureSize());
 
@@ -1308,7 +1315,8 @@
                       SkScalarMul(srcRect.fBottom, hInv));
 
     bool needsTextureDomain = false;
-    if (params.filterMode() != GrTextureParams::kNone_FilterMode) {
+    if (!(flags & SkCanvas::kBleed_DrawBitmapRectFlag) &&
+        params.filterMode() != GrTextureParams::kNone_FilterMode) {
         // Need texture domain if drawing a sub rect.
         needsTextureDomain = srcRect.width() < bitmap.width() ||
                              srcRect.height() < bitmap.height();
@@ -1440,7 +1448,8 @@
 
 void SkGpuDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
                                  const SkRect* src, const SkRect& dst,
-                                 const SkPaint& paint) {
+                                 const SkPaint& paint,
+                                 SkCanvas::DrawBitmapRectFlags flags) {
     SkMatrix    matrix;
     SkRect      bitmapBounds, tmpSrc;
 
@@ -1465,7 +1474,7 @@
         }
     }
 
-    this->drawBitmapCommon(draw, bitmap, &tmpSrc, matrix, paint);
+    this->drawBitmapCommon(draw, bitmap, &tmpSrc, matrix, paint, flags);
 }
 
 void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device,
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 410b049..a24c4ec 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -964,7 +964,9 @@
 
 void SkPDFDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
                                  const SkRect* src, const SkRect& dst,
-                                 const SkPaint& paint) {
+                                 const SkPaint& paint,
+                                 SkCanvas::DrawBitmapRectFlags flags) {
+    // TODO: this code path must be updated to respect the flags parameter
     SkMatrix    matrix;
     SkRect      bitmapBounds, tmpSrc, tmpDst;
     SkBitmap    tmpBitmap;
diff --git a/src/pipe/SkGPipePriv.h b/src/pipe/SkGPipePriv.h
index f5f98f2..2c59071 100644
--- a/src/pipe/SkGPipePriv.h
+++ b/src/pipe/SkGPipePriv.h
@@ -148,6 +148,9 @@
     // Specific to drawBitmapRect, but needs to be different from HasPaint,
     // which is used for all drawBitmap calls, so include it here.
     kDrawBitmap_HasSrcRect_DrawOpFlag = 1 << 1,
+    // SkCanvas::DrawBitmapRectFlags::kBleed_DrawBitmapRectFlag is 
+    // converted into and out of this flag to save space
+    kDrawBitmap_Bleed_DrawOpFlag      = 1 << 2,
 };
 enum {
     kClip_HasAntiAlias_DrawOpFlag = 1 << 0,
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp
index 3f9ce12..ae4e4b2 100644
--- a/src/pipe/SkGPipeRead.cpp
+++ b/src/pipe/SkGPipeRead.cpp
@@ -572,10 +572,15 @@
     } else {
         src = NULL;
     }
+    SkCanvas::DrawBitmapRectFlags dbmrFlags = SkCanvas::kNone_DrawBitmapRectflag;
+    if (flags & kDrawBitmap_Bleed_DrawOpFlag) {
+        dbmrFlags = (SkCanvas::DrawBitmapRectFlags)(dbmrFlags|SkCanvas::kBleed_DrawBitmapRectFlag);
+    }
     const SkRect* dst = skip<SkRect>(reader);
     const SkBitmap* bitmap = holder.getBitmap();
     if (state->shouldDraw()) {
-        canvas->drawBitmapRectToRect(*bitmap, src, *dst, hasPaint ? &state->paint() : NULL);
+        canvas->drawBitmapRectToRect(*bitmap, src, *dst, 
+                                     hasPaint ? &state->paint() : NULL, dbmrFlags);
     }
 }
 
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index 3b22a5e..a90a3ac 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -231,7 +231,8 @@
     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*) SK_OVERRIDE;
+                                      const SkRect& dst, const SkPaint* paint, 
+                                      DrawBitmapRectFlags flags) SK_OVERRIDE;
     virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&,
                                   const SkPaint*) SK_OVERRIDE;
     virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
@@ -774,7 +775,8 @@
 }
 
 void SkGPipeCanvas::drawBitmapRectToRect(const SkBitmap& bm, const SkRect* src,
-                                   const SkRect& dst, const SkPaint* paint) {
+                                         const SkRect& dst, const SkPaint* paint,
+                                         DrawBitmapRectFlags dbmrFlags) {
     NOTIFY_SETUP(this);
     size_t opBytesNeeded = sizeof(SkRect);
     bool hasSrc = src != NULL;
@@ -785,6 +787,9 @@
     } else {
         flags = 0;
     }
+    if (dbmrFlags & kBleed_DrawBitmapRectFlag) {
+        flags |= kDrawBitmap_Bleed_DrawOpFlag;
+    }
 
     if (this->commonDrawBitmap(bm, kDrawBitmapRectToRect_DrawOp, flags, opBytesNeeded, paint)) {
         if (hasSrc) {
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index 05daf63..e3b761f 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -893,7 +893,8 @@
 void SkDeferredCanvas::drawBitmapRectToRect(const SkBitmap& bitmap,
                                             const SkRect* src,
                                             const SkRect& dst,
-                                            const SkPaint* paint) {
+                                            const SkPaint* paint,
+                                            DrawBitmapRectFlags flags) {
     if (fDeferredDrawing &&
         this->isFullFrame(&dst, paint) &&
         isPaintOpaque(paint, &bitmap)) {
@@ -901,7 +902,7 @@
     }
 
     AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
-    this->drawingCanvas()->drawBitmapRectToRect(bitmap, src, dst, paint);
+    this->drawingCanvas()->drawBitmapRectToRect(bitmap, src, dst, paint, flags);
     this->recordedDrawCommand();
 }
 
diff --git a/src/utils/SkDumpCanvas.cpp b/src/utils/SkDumpCanvas.cpp
index 0d5ca2b..d3e84a3 100644
--- a/src/utils/SkDumpCanvas.cpp
+++ b/src/utils/SkDumpCanvas.cpp
@@ -349,7 +349,8 @@
 }
 
 void SkDumpCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
-                                        const SkRect& dst, const SkPaint* paint) {
+                                        const SkRect& dst, const SkPaint* paint,
+                                        DrawBitmapRectFlags flags) {
     SkString bs, rs;
     bitmap.toString(&bs);
     toString(dst, &rs);
diff --git a/src/utils/SkLuaCanvas.cpp b/src/utils/SkLuaCanvas.cpp
index 1299a0e..c5ec006 100644
--- a/src/utils/SkLuaCanvas.cpp
+++ b/src/utils/SkLuaCanvas.cpp
@@ -206,7 +206,7 @@
 }
 
 void SkLuaCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
-                               const SkPaint* paint) {
+                             const SkPaint* paint) {
     AUTO_LUA("drawBitmap");
     if (paint) {
         lua.pushPaint(*paint, "paint");
@@ -214,7 +214,8 @@
 }
 
 void SkLuaCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
-                                   const SkRect& dst, const SkPaint* paint) {
+                                       const SkRect& dst, const SkPaint* paint,
+                                       DrawBitmapRectFlags flags) {
     AUTO_LUA("drawBitmapRectToRect");
     if (paint) {
         lua.pushPaint(*paint, "paint");
@@ -222,7 +223,7 @@
 }
 
 void SkLuaCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
-                                     const SkPaint* paint) {
+                                   const SkPaint* paint) {
     AUTO_LUA("drawBitmapMatrix");
     if (paint) {
         lua.pushPaint(*paint, "paint");
diff --git a/src/utils/SkNWayCanvas.cpp b/src/utils/SkNWayCanvas.cpp
index 5eebd01..eeb1bc2 100644
--- a/src/utils/SkNWayCanvas.cpp
+++ b/src/utils/SkNWayCanvas.cpp
@@ -220,10 +220,11 @@
 }
 
 void SkNWayCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
-                                  const SkRect& dst, const SkPaint* paint) {
+                                  const SkRect& dst, const SkPaint* paint,
+                                  DrawBitmapRectFlags flags) {
     Iter iter(fList);
     while (iter.next()) {
-        iter->drawBitmapRectToRect(bitmap, src, dst, paint);
+        iter->drawBitmapRectToRect(bitmap, src, dst, paint, flags);
     }
 }
 
diff --git a/src/utils/SkPictureUtils.cpp b/src/utils/SkPictureUtils.cpp
index 36b62e5..31d9fc7 100644
--- a/src/utils/SkPictureUtils.cpp
+++ b/src/utils/SkPictureUtils.cpp
@@ -108,7 +108,8 @@
     }
     virtual void drawBitmapRect(const SkDraw&, const SkBitmap& bitmap,
                                 const SkRect* srcOrNull, const SkRect& dst,
-                                const SkPaint&) SK_OVERRIDE {
+                                const SkPaint&, 
+                                SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE {
         this->addBitmap(bitmap);
     }
     virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap,
diff --git a/src/utils/SkProxyCanvas.cpp b/src/utils/SkProxyCanvas.cpp
index 053a757..f530313 100644
--- a/src/utils/SkProxyCanvas.cpp
+++ b/src/utils/SkProxyCanvas.cpp
@@ -105,8 +105,9 @@
 }
 
 void SkProxyCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
-                                   const SkRect& dst, const SkPaint* paint) {
-    fProxy->drawBitmapRectToRect(bitmap, src, dst, paint);
+                                   const SkRect& dst, const SkPaint* paint,
+                                   DrawBitmapRectFlags flags) {
+    fProxy->drawBitmapRectToRect(bitmap, src, dst, paint, flags);
 }
 
 void SkProxyCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp
index 0e07084..dae5f33 100644
--- a/src/utils/debugger/SkDebugCanvas.cpp
+++ b/src/utils/debugger/SkDebugCanvas.cpp
@@ -276,17 +276,19 @@
 }
 
 void SkDebugCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar left,
-        SkScalar top, const SkPaint* paint = NULL) {
+                               SkScalar top, const SkPaint* paint = NULL) {
     addDrawCommand(new SkDrawBitmapCommand(bitmap, left, top, paint));
 }
 
 void SkDebugCanvas::drawBitmapRectToRect(const SkBitmap& bitmap,
-        const SkRect* src, const SkRect& dst, const SkPaint* paint) {
-    addDrawCommand(new SkDrawBitmapRectCommand(bitmap, src, dst, paint));
+                                         const SkRect* src, const SkRect& dst, 
+                                         const SkPaint* paint,
+                                         SkCanvas::DrawBitmapRectFlags flags) {
+    addDrawCommand(new SkDrawBitmapRectCommand(bitmap, src, dst, paint, flags));
 }
 
 void SkDebugCanvas::drawBitmapMatrix(const SkBitmap& bitmap,
-        const SkMatrix& matrix, const SkPaint* paint) {
+                                     const SkMatrix& matrix, const SkPaint* paint) {
     addDrawCommand(new SkDrawBitmapMatrixCommand(bitmap, matrix, paint));
 }
 
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index 5fb99aa..705f49a 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -161,7 +161,8 @@
                             const SkPaint*) SK_OVERRIDE;
 
     virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src,
-                                  const SkRect& dst, const SkPaint*) SK_OVERRIDE;
+                                      const SkRect& dst, const SkPaint* paint,
+                                      DrawBitmapRectFlags flags) SK_OVERRIDE;
 
     virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&,
                                   const SkPaint*) SK_OVERRIDE;
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp
index ad66c8d..1d4bfed 100644
--- a/src/utils/debugger/SkDrawCommand.cpp
+++ b/src/utils/debugger/SkDrawCommand.cpp
@@ -342,7 +342,8 @@
 }
 
 SkDrawBitmapRectCommand::SkDrawBitmapRectCommand(const SkBitmap& bitmap, const SkRect* src,
-                                                 const SkRect& dst, const SkPaint* paint) {
+                                                 const SkRect& dst, const SkPaint* paint,
+                                                 SkCanvas::DrawBitmapRectFlags flags) {
     fBitmap = bitmap;
     if (NULL != src) {
         fSrc = *src;
@@ -357,6 +358,8 @@
     } else {
         fPaintPtr = NULL;
     }
+    fFlags = flags;
+
     fDrawType = DRAW_BITMAP_RECT_TO_RECT;
 
     fInfo.push(SkObjectParser::BitmapToString(bitmap));
@@ -367,10 +370,11 @@
     if (NULL != paint) {
         fInfo.push(SkObjectParser::PaintToString(*paint));
     }
+    fInfo.push(SkObjectParser::IntToString(fFlags, "Flags: "));
 }
 
 void SkDrawBitmapRectCommand::execute(SkCanvas* canvas) {
-    canvas->drawBitmapRectToRect(fBitmap, this->srcRect(), fDst, fPaintPtr);
+    canvas->drawBitmapRectToRect(fBitmap, this->srcRect(), fDst, fPaintPtr, fFlags);
 }
 
 bool SkDrawBitmapRectCommand::render(SkCanvas* canvas) const {
diff --git a/src/utils/debugger/SkDrawCommand.h b/src/utils/debugger/SkDrawCommand.h
index e62fe4f..aabc2e0 100644
--- a/src/utils/debugger/SkDrawCommand.h
+++ b/src/utils/debugger/SkDrawCommand.h
@@ -193,7 +193,8 @@
 class SkDrawBitmapRectCommand : public SkDrawCommand {
 public:
     SkDrawBitmapRectCommand(const SkBitmap& bitmap, const SkRect* src,
-                   const SkRect& dst, const SkPaint* paint);
+                            const SkRect& dst, const SkPaint* paint,
+                            SkCanvas::DrawBitmapRectFlags flags);
     virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
     virtual bool render(SkCanvas* canvas) const SK_OVERRIDE;
 
@@ -209,17 +210,21 @@
     void setPaint(const SkPaint& paint) { fPaint = paint; fPaintPtr = &fPaint; }
 
     const SkRect* srcRect() const { return fSrc.isEmpty() ? NULL : &fSrc; }
-    const SkRect& dstRect() const { return fDst; }
-
     void setSrcRect(const SkRect& src) { fSrc = src; }
+
+    const SkRect& dstRect() const { return fDst; }
     void setDstRect(const SkRect& dst) { fDst = dst; }
 
+    SkCanvas::DrawBitmapRectFlags flags() const { return fFlags; }
+    void setFlags(SkCanvas::DrawBitmapRectFlags flags) { fFlags = flags; }
+
 private:
-    SkBitmap fBitmap;
-    SkRect   fSrc;
-    SkRect   fDst;
-    SkPaint  fPaint;
-    SkPaint* fPaintPtr;
+    SkBitmap                      fBitmap;
+    SkRect                        fSrc;
+    SkRect                        fDst;
+    SkPaint                       fPaint;
+    SkPaint*                      fPaintPtr;
+    SkCanvas::DrawBitmapRectFlags fFlags;
 
     typedef SkDrawCommand INHERITED;
 };
