diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-25 12:10:42 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-25 12:10:42 +0000 |
commit | 9bf380ce7f848dfb5886dd52b82746521454b739 (patch) | |
tree | b54c0fb5c026b791e4114e7d47dd43904674a9fb /src/device/xps | |
parent | 5c561cb8d8151d38c69128345106cbf225033a1a (diff) |
drawBitmap* cleanup
https://codereview.chromium.org/19977003/
git-svn-id: http://skia.googlecode.com/svn/trunk@10342 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/device/xps')
-rw-r--r-- | src/device/xps/SkXPSDevice.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp index 30e81bf386..442a51f507 100644 --- a/src/device/xps/SkXPSDevice.cpp +++ b/src/device/xps/SkXPSDevice.cpp @@ -1949,25 +1949,13 @@ HRESULT SkXPSDevice::clipToPath(IXpsOMVisual* xpsVisual, } void SkXPSDevice::drawBitmap(const SkDraw& d, const SkBitmap& bitmap, - const SkIRect* srcRectOrNull, const SkMatrix& matrix, const SkPaint& paint) { if (d.fClip->isEmpty()) { return; } SkIRect srcRect; - SkBitmap tmp; - const SkBitmap* bitmapPtr = &bitmap; - if (NULL == srcRectOrNull) { - srcRect.set(0, 0, bitmap.width(), bitmap.height()); - bitmapPtr = &bitmap; - } else { - srcRect = *srcRectOrNull; - if (!bitmap.extractSubset(&tmp, srcRect)) { - return; // extraction failed - } - bitmapPtr = &tmp; - } + srcRect.set(0, 0, bitmap.width(), bitmap.height()); //Create the new shaded path. SkTScopedComPtr<IXpsOMPath> shadedPath; @@ -2007,7 +1995,7 @@ void SkXPSDevice::drawBitmap(const SkDraw& d, const SkBitmap& bitmap, SkShader::kClamp_TileMode, }; SkTScopedComPtr<IXpsOMTileBrush> xpsImageBrush; - HRV(this->createXpsImageBrush(*bitmapPtr, + HRV(this->createXpsImageBrush(bitmap, transform, xy, paint.getAlpha(), |