Merge six commits from master-skia to master
Include external/skia/include/private
use SrcConstraint for drawBitmapRect
clean up to allow removal of flags for SCALAR_DIV and IMAGEINFO_FIELDS
don't call DEPRECATED getDevice()
update to newer API for drawBitmapRect
asABitmap is deprecated, used isABitmap
Change-Id: I519f54f97321a7a365ea81a3b78cb03b9bdca021
previous-Change-Id: I12208855a95948897077b1c1549eb35416cc801e
previous-Change-Id: I5044f0f61315fe48c60d7af5e261a7d0ed574f56
previous-Change-Id: Ic34a3ba77b3f9e091fa7aaba75018a307abacdab
previous-Change-Id: I79f8dd779920565d1204f7fe67b3286b1bbf4e9b
previous-Change-Id: Ic04d1f8274f6a862ea00f8d241363cf31f5ec1ec
previous-Change-Id: I9e4ae257a1976c74302b6a73f17405174ae58cec
diff --git a/libs/hwui/utils/NinePatchImpl.cpp b/libs/hwui/utils/NinePatchImpl.cpp
index f51f5df..9af9911 100644
--- a/libs/hwui/utils/NinePatchImpl.cpp
+++ b/libs/hwui/utils/NinePatchImpl.cpp
@@ -61,7 +61,7 @@
return SkColorSetA(c, a);
}
-static void drawStretchyPatch(SkCanvas* canvas, SkIRect& src, const SkRect& dst,
+static void drawStretchyPatch(SkCanvas* canvas, SkIRect& isrc, const SkRect& dst,
const SkBitmap& bitmap, const SkPaint& paint,
SkColor initColor, uint32_t colorHint,
bool hasXfer) {
@@ -69,9 +69,9 @@
((SkPaint*)&paint)->setColor(modAlpha(colorHint, paint.getAlpha()));
canvas->drawRect(dst, paint);
((SkPaint*)&paint)->setColor(initColor);
- } else if (src.width() == 1 && src.height() == 1) {
+ } else if (isrc.width() == 1 && isrc.height() == 1) {
SkColor c;
- if (!getColor(bitmap, src.fLeft, src.fTop, &c)) {
+ if (!getColor(bitmap, isrc.fLeft, isrc.fTop, &c)) {
goto SLOW_CASE;
}
if (0 != c || hasXfer) {
@@ -82,7 +82,7 @@
}
} else {
SLOW_CASE:
- canvas->drawBitmapRect(bitmap, &src, dst, &paint);
+ canvas->drawBitmapRect(bitmap, SkRect::Make(isrc), dst, &paint);
}
}