Loading core/jni/android/graphics/Bitmap.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -43,8 +43,11 @@ static void FromColor_D32(void* dst, const SkColor src[], int width, static void FromColor_D32_Raw(void* dst, const SkColor src[], int width, int, int) { // Needed to thwart the unreachable code detection from clang. static const bool sk_color_ne_zero = SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER; // SkColor's ordering may be different from SkPMColor if (SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER) { if (sk_color_ne_zero) { memcpy(dst, src, width * sizeof(SkColor)); return; } Loading core/jni/android/graphics/BitmapFactory.cpp +2 −8 Original line number Diff line number Diff line Loading @@ -49,12 +49,6 @@ jmethodID gInsetStruct_constructorMethodID; using namespace android; static inline int32_t validOrNeg1(bool isValid, int32_t value) { // return isValid ? value : -1; SkASSERT((int)isValid == 0 || (int)isValid == 1); return ((int32_t)isValid - 1) | value; } jstring getMimeTypeString(JNIEnv* env, SkImageDecoder::Format format) { static const struct { SkImageDecoder::Format fFormat; Loading Loading @@ -185,8 +179,8 @@ public: const size_t size = sk_64_asS32(size64); if (size > mSize) { ALOGW("bitmap marked for reuse (%d bytes) can't fit new bitmap (%d bytes)", mSize, size); ALOGW("bitmap marked for reuse (%u bytes) can't fit new bitmap " "(%zu bytes)", mSize, size); return false; } Loading core/jni/android/graphics/GraphicsJNI.h +1 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class SkCanvas; namespace android { class Paint; class TypefaceImpl; struct TypefaceImpl; } class GraphicsJNI { Loading Loading @@ -205,7 +205,6 @@ public: private: JavaVM* fVM; bool fAllocateInJavaHeap; jbyteArray fStorageObj; int fAllocCount; }; Loading core/jni/android/graphics/NinePatchImpl.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, 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) { if ((false)) { SkNinePatch::DrawMesh(canvas, bounds, bitmap, xDivs, chunk.numXDivs, yDivs, chunk.numYDivs, Loading core/jni/android/graphics/pdf/PdfEditor.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -72,8 +72,8 @@ static jlong nativeOpen(JNIEnv* env, jclass thiz, jint fd, jlong size) { if (!document) { const long error = FPDF_GetLastError(); jniThrowException(env, "java/io/IOException", "cannot create document. Error:" + error); jniThrowExceptionFmt(env, "java/io/IOException", "cannot create document. Error: %ld", error); destroyLibraryIfNeeded(); return -1; } Loading Loading @@ -138,8 +138,8 @@ static void nativeWrite(JNIEnv* env, jclass thiz, jlong documentPtr, jint fd) { writer.WriteBlock = &writeBlock; const bool success = FPDF_SaveAsCopy(document, &writer, FPDF_NO_INCREMENTAL); if (!success) { jniThrowException(env, "java/io/IOException", "cannot write to fd. Error:" + errno); jniThrowExceptionFmt(env, "java/io/IOException", "cannot write to fd. Error: %d", errno); destroyLibraryIfNeeded(); } } Loading Loading
core/jni/android/graphics/Bitmap.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -43,8 +43,11 @@ static void FromColor_D32(void* dst, const SkColor src[], int width, static void FromColor_D32_Raw(void* dst, const SkColor src[], int width, int, int) { // Needed to thwart the unreachable code detection from clang. static const bool sk_color_ne_zero = SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER; // SkColor's ordering may be different from SkPMColor if (SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER) { if (sk_color_ne_zero) { memcpy(dst, src, width * sizeof(SkColor)); return; } Loading
core/jni/android/graphics/BitmapFactory.cpp +2 −8 Original line number Diff line number Diff line Loading @@ -49,12 +49,6 @@ jmethodID gInsetStruct_constructorMethodID; using namespace android; static inline int32_t validOrNeg1(bool isValid, int32_t value) { // return isValid ? value : -1; SkASSERT((int)isValid == 0 || (int)isValid == 1); return ((int32_t)isValid - 1) | value; } jstring getMimeTypeString(JNIEnv* env, SkImageDecoder::Format format) { static const struct { SkImageDecoder::Format fFormat; Loading Loading @@ -185,8 +179,8 @@ public: const size_t size = sk_64_asS32(size64); if (size > mSize) { ALOGW("bitmap marked for reuse (%d bytes) can't fit new bitmap (%d bytes)", mSize, size); ALOGW("bitmap marked for reuse (%u bytes) can't fit new bitmap " "(%zu bytes)", mSize, size); return false; } Loading
core/jni/android/graphics/GraphicsJNI.h +1 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class SkCanvas; namespace android { class Paint; class TypefaceImpl; struct TypefaceImpl; } class GraphicsJNI { Loading Loading @@ -205,7 +205,6 @@ public: private: JavaVM* fVM; bool fAllocateInJavaHeap; jbyteArray fStorageObj; int fAllocCount; }; Loading
core/jni/android/graphics/NinePatchImpl.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, 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) { if ((false)) { SkNinePatch::DrawMesh(canvas, bounds, bitmap, xDivs, chunk.numXDivs, yDivs, chunk.numYDivs, Loading
core/jni/android/graphics/pdf/PdfEditor.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -72,8 +72,8 @@ static jlong nativeOpen(JNIEnv* env, jclass thiz, jint fd, jlong size) { if (!document) { const long error = FPDF_GetLastError(); jniThrowException(env, "java/io/IOException", "cannot create document. Error:" + error); jniThrowExceptionFmt(env, "java/io/IOException", "cannot create document. Error: %ld", error); destroyLibraryIfNeeded(); return -1; } Loading Loading @@ -138,8 +138,8 @@ static void nativeWrite(JNIEnv* env, jclass thiz, jlong documentPtr, jint fd) { writer.WriteBlock = &writeBlock; const bool success = FPDF_SaveAsCopy(document, &writer, FPDF_NO_INCREMENTAL); if (!success) { jniThrowException(env, "java/io/IOException", "cannot write to fd. Error:" + errno); jniThrowExceptionFmt(env, "java/io/IOException", "cannot write to fd. Error: %d", errno); destroyLibraryIfNeeded(); } } Loading