diff options
Diffstat (limited to 'libs/hwui/utils/NinePatchImpl.cpp')
-rw-r--r-- | libs/hwui/utils/NinePatchImpl.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/libs/hwui/utils/NinePatchImpl.cpp b/libs/hwui/utils/NinePatchImpl.cpp index 985f3fb66814..cef214be6a85 100644 --- a/libs/hwui/utils/NinePatchImpl.cpp +++ b/libs/hwui/utils/NinePatchImpl.cpp @@ -20,7 +20,6 @@ #include "SkBitmap.h" #include "SkCanvas.h" #include "SkColorPriv.h" -#include "SkNinePatch.h" #include "SkPaint.h" #include "SkUnPreMultiply.h" @@ -111,15 +110,6 @@ void NinePatch::Draw(SkCanvas* canvas, const SkRect& bounds, const int32_t* xDivs = chunk.getXDivs(); const int32_t* yDivs = chunk.getYDivs(); - // if our SkCanvas were back by GL we should enable this and draw this as - // a mesh, which will be faster in most cases. - if ((false)) { - SkNinePatch::DrawMesh(canvas, bounds, bitmap, - xDivs, chunk.numXDivs, - yDivs, chunk.numYDivs, - paint); - return; - } if (kUseTrace) { gTrace = true; @@ -144,7 +134,7 @@ void NinePatch::Draw(SkCanvas* canvas, const SkRect& bounds, if (bounds.isEmpty() || bitmap.width() == 0 || bitmap.height() == 0 || - (paint && paint->getXfermode() == NULL && paint->getAlpha() == 0)) + (paint && paint->isSrcOver() && paint->getAlpha() == 0)) { if (kUseTrace) { ALOGV("======== abort ninepatch draw\n"); @@ -159,7 +149,7 @@ void NinePatch::Draw(SkCanvas* canvas, const SkRect& bounds, if (bitmap.getPixels() == NULL) return; - const bool hasXfer = paint->getXfermode() != NULL; + const bool hasXfer = !paint->isSrcOver(); SkRect dst; SkIRect src; |