diff options
author | Mike Reed <reed@google.com> | 2009-09-11 09:36:35 -0400 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2009-09-11 14:40:15 -0400 |
commit | 211db4a2874f1a2d0e7a8cb8d33e81fa08801763 (patch) | |
tree | 9c53656f75cc3d88ba7c5d2d8b86504b532be3b7 /core/jni/android/graphics | |
parent | d304ae583d862250a21b5949fc3dbdf3af1febac (diff) | |
download | frameworks_base-211db4a2874f1a2d0e7a8cb8d33e81fa08801763.zip frameworks_base-211db4a2874f1a2d0e7a8cb8d33e81fa08801763.tar.gz frameworks_base-211db4a2874f1a2d0e7a8cb8d33e81fa08801763.tar.bz2 |
change default for dither to true
Diffstat (limited to 'core/jni/android/graphics')
-rw-r--r-- | core/jni/android/graphics/NinePatchImpl.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/jni/android/graphics/NinePatchImpl.cpp b/core/jni/android/graphics/NinePatchImpl.cpp index f82053c..32d9b57 100644 --- a/core/jni/android/graphics/NinePatchImpl.cpp +++ b/core/jni/android/graphics/NinePatchImpl.cpp @@ -106,6 +106,13 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, if (canvas && canvas->quickReject(bounds, SkCanvas::kBW_EdgeType)) { return; } + + SkPaint defaultPaint; + if (NULL == paint) { + // matches default dither in NinePatchDrawable.java. + defaultPaint.setDither(true); + paint = &defaultPaint; + } // if our canvas is GL, draw this as a mesh, which will be faster than // in parts (which is faster for raster) @@ -158,11 +165,6 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, if (bitmap.getPixels() == NULL) return; - SkPaint defaultPaint; - if (NULL == paint) { - paint = &defaultPaint; - } - const bool hasXfer = paint->getXfermode() != NULL; SkRect dst; SkIRect src; |