Update filter tool to allow more flexible filtering
https://codereview.appspot.com/7227055/
git-svn-id: http://skia.googlecode.com/svn/trunk@7492 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/SkDrawCommand.cpp b/debugger/SkDrawCommand.cpp
index a2459b3..dce0af6 100644
--- a/debugger/SkDrawCommand.cpp
+++ b/debugger/SkDrawCommand.cpp
@@ -230,7 +230,12 @@
this->fBitmap = &bitmap;
this->fSrc = src;
this->fDst = &dst;
- this->fPaint = paint;
+ if (NULL != paint) {
+ this->fPaint = *paint;
+ this->fPaintPtr = &this->fPaint;
+ } else {
+ this->fPaintPtr = NULL;
+ }
this->fDrawType = DRAW_BITMAP_RECT_TO_RECT;
this->fResizedBitmap = resizedBitmap;
@@ -245,7 +250,7 @@
}
void DrawBitmapRect::execute(SkCanvas* canvas) {
- canvas->drawBitmapRectToRect(*this->fBitmap, this->fSrc, *this->fDst, this->fPaint);
+ canvas->drawBitmapRectToRect(*this->fBitmap, this->fSrc, *this->fDst, this->fPaintPtr);
}
const SkBitmap* DrawBitmapRect::getBitmap() const {