summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp6
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
index a410ba9..10bf363 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
@@ -776,13 +776,15 @@ void PlatformGraphicsContextRecording::drawBitmapPattern(
}
void PlatformGraphicsContextRecording::drawBitmapRect(const SkBitmap& bitmap,
- const SkIRect* src, const SkRect& dst,
+ const SkIRect* srcPtr, const SkRect& dst,
CompositeOperator op)
{
float widthScale = dst.width() == 0 ? 1 : bitmap.width() / dst.width();
float heightScale = dst.height() == 0 ? 1 : bitmap.height() / dst.height();
m_maxZoomScale = std::max(m_maxZoomScale, std::max(widthScale, heightScale));
- appendDrawingOperation(NEW_OP(DrawBitmapRect)(bitmap, *src, dst, op), dst);
+ // null src implies full bitmap as source rect
+ SkIRect src = srcPtr ? *srcPtr : SkIRect::MakeWH(bitmap.width(), bitmap.height());
+ appendDrawingOperation(NEW_OP(DrawBitmapRect)(bitmap, src, dst, op), dst);
}
void PlatformGraphicsContextRecording::drawConvexPolygon(size_t numPoints,
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
index a8e69f5..eefd270 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
@@ -112,7 +112,7 @@ public:
virtual void clearRect(const FloatRect& rect);
virtual void drawBitmapPattern(const SkBitmap& bitmap, const SkMatrix& matrix,
CompositeOperator compositeOp, const FloatRect& destRect);
- virtual void drawBitmapRect(const SkBitmap& bitmap, const SkIRect* src,
+ virtual void drawBitmapRect(const SkBitmap& bitmap, const SkIRect* srcPtr,
const SkRect& dst, CompositeOperator op = CompositeSourceOver);
virtual void drawConvexPolygon(size_t numPoints, const FloatPoint* points,
bool shouldAntialias);