aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/device/xps
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-25 12:10:42 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-25 12:10:42 +0000
commit9bf380ce7f848dfb5886dd52b82746521454b739 (patch)
treeb54c0fb5c026b791e4114e7d47dd43904674a9fb /src/device/xps
parent5c561cb8d8151d38c69128345106cbf225033a1a (diff)
drawBitmap* cleanup
Diffstat (limited to 'src/device/xps')
-rw-r--r--src/device/xps/SkXPSDevice.cpp16
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(),