Loading core/jni/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -189,7 +189,6 @@ LOCAL_C_INCLUDES += \ external/pdfium/core/include/fpdfdoc \ external/pdfium/fpdfsdk/include \ external/pdfium/public \ external/skia/include/private \ external/skia/src/core \ external/skia/src/effects \ external/skia/src/images \ Loading core/jni/android/graphics/BitmapFactory.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ public: virtual bool allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) { const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { ALOGW("unable to reuse a bitmap as the target has an unknown bitmap configuration"); return false; } Loading core/jni/android/graphics/Graphics.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -486,7 +486,7 @@ static bool computeAllocationSize(const SkBitmap& bitmap, size_t* size) { android::Bitmap* GraphicsJNI::allocateJavaPixelRef(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable) { const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); return NULL; } Loading Loading @@ -538,7 +538,7 @@ static void allocatePixelsReleaseProc(void* ptr, void* ctx) { bool GraphicsJNI::allocatePixels(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable) { const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); return NULL; } Loading Loading @@ -581,7 +581,7 @@ android::Bitmap* GraphicsJNI::allocateAshmemPixelRef(JNIEnv* env, SkBitmap* bitm int fd; const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); return nullptr; } Loading Loading @@ -625,7 +625,7 @@ android::Bitmap* GraphicsJNI::allocateAshmemPixelRef(JNIEnv* env, SkBitmap* bitm android::Bitmap* GraphicsJNI::mapAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable, int fd, void* addr, bool readOnly) { const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); return nullptr; } Loading core/jni/android_view_Surface.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -313,11 +313,12 @@ static jlong nativeLockCanvas(JNIEnv* env, jclass clazz, return 0; } SkImageInfo info = SkImageInfo::Make(outBuffer.width, outBuffer.height, convertPixelFormat(outBuffer.format), outBuffer.format == PIXEL_FORMAT_RGBX_8888 ? kOpaque_SkAlphaType : kPremul_SkAlphaType); kPremul_SkAlphaType); if (outBuffer.format == PIXEL_FORMAT_RGBX_8888) { info.fAlphaType = kOpaque_SkAlphaType; } SkBitmap bitmap; ssize_t bpr = outBuffer.stride * bytesPerPixel(outBuffer.format); Loading core/jni/android_view_SurfaceControl.cpp +11 −12 Original line number Diff line number Diff line Loading @@ -138,36 +138,35 @@ static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz, return NULL; } SkColorType ct; SkAlphaType at; SkImageInfo screenshotInfo; screenshotInfo.fWidth = screenshot->getWidth(); screenshotInfo.fHeight = screenshot->getHeight(); switch (screenshot->getFormat()) { case PIXEL_FORMAT_RGBX_8888: { ct = kRGBA_8888_SkColorType; at = kOpaque_SkAlphaType; screenshotInfo.fColorType = kRGBA_8888_SkColorType; screenshotInfo.fAlphaType = kOpaque_SkAlphaType; break; } case PIXEL_FORMAT_RGBA_8888: { ct = kRGBA_8888_SkColorType; at = kPremul_SkAlphaType; screenshotInfo.fColorType = kRGBA_8888_SkColorType; screenshotInfo.fAlphaType = kPremul_SkAlphaType; break; } case PIXEL_FORMAT_RGB_565: { ct = kRGB_565_SkColorType; at = kOpaque_SkAlphaType; screenshotInfo.fColorType = kRGB_565_SkColorType; screenshotInfo.fAlphaType = kOpaque_SkAlphaType; break; } default: { return NULL; } } SkImageInfo screenshotInfo = SkImageInfo::Make(screenshot->getWidth(), screenshot->getHeight(), ct, at); const size_t rowBytes = screenshot->getStride() * android::bytesPerPixel(screenshot->getFormat()); if (!screenshotInfo.width() || !screenshotInfo.height()) { if (!screenshotInfo.fWidth || !screenshotInfo.fHeight) { return NULL; } Loading Loading
core/jni/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -189,7 +189,6 @@ LOCAL_C_INCLUDES += \ external/pdfium/core/include/fpdfdoc \ external/pdfium/fpdfsdk/include \ external/pdfium/public \ external/skia/include/private \ external/skia/src/core \ external/skia/src/effects \ external/skia/src/images \ Loading
core/jni/android/graphics/BitmapFactory.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ public: virtual bool allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) { const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { ALOGW("unable to reuse a bitmap as the target has an unknown bitmap configuration"); return false; } Loading
core/jni/android/graphics/Graphics.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -486,7 +486,7 @@ static bool computeAllocationSize(const SkBitmap& bitmap, size_t* size) { android::Bitmap* GraphicsJNI::allocateJavaPixelRef(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable) { const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); return NULL; } Loading Loading @@ -538,7 +538,7 @@ static void allocatePixelsReleaseProc(void* ptr, void* ctx) { bool GraphicsJNI::allocatePixels(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable) { const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); return NULL; } Loading Loading @@ -581,7 +581,7 @@ android::Bitmap* GraphicsJNI::allocateAshmemPixelRef(JNIEnv* env, SkBitmap* bitm int fd; const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); return nullptr; } Loading Loading @@ -625,7 +625,7 @@ android::Bitmap* GraphicsJNI::allocateAshmemPixelRef(JNIEnv* env, SkBitmap* bitm android::Bitmap* GraphicsJNI::mapAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable, int fd, void* addr, bool readOnly) { const SkImageInfo& info = bitmap->info(); if (info.colorType() == kUnknown_SkColorType) { if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); return nullptr; } Loading
core/jni/android_view_Surface.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -313,11 +313,12 @@ static jlong nativeLockCanvas(JNIEnv* env, jclass clazz, return 0; } SkImageInfo info = SkImageInfo::Make(outBuffer.width, outBuffer.height, convertPixelFormat(outBuffer.format), outBuffer.format == PIXEL_FORMAT_RGBX_8888 ? kOpaque_SkAlphaType : kPremul_SkAlphaType); kPremul_SkAlphaType); if (outBuffer.format == PIXEL_FORMAT_RGBX_8888) { info.fAlphaType = kOpaque_SkAlphaType; } SkBitmap bitmap; ssize_t bpr = outBuffer.stride * bytesPerPixel(outBuffer.format); Loading
core/jni/android_view_SurfaceControl.cpp +11 −12 Original line number Diff line number Diff line Loading @@ -138,36 +138,35 @@ static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz, return NULL; } SkColorType ct; SkAlphaType at; SkImageInfo screenshotInfo; screenshotInfo.fWidth = screenshot->getWidth(); screenshotInfo.fHeight = screenshot->getHeight(); switch (screenshot->getFormat()) { case PIXEL_FORMAT_RGBX_8888: { ct = kRGBA_8888_SkColorType; at = kOpaque_SkAlphaType; screenshotInfo.fColorType = kRGBA_8888_SkColorType; screenshotInfo.fAlphaType = kOpaque_SkAlphaType; break; } case PIXEL_FORMAT_RGBA_8888: { ct = kRGBA_8888_SkColorType; at = kPremul_SkAlphaType; screenshotInfo.fColorType = kRGBA_8888_SkColorType; screenshotInfo.fAlphaType = kPremul_SkAlphaType; break; } case PIXEL_FORMAT_RGB_565: { ct = kRGB_565_SkColorType; at = kOpaque_SkAlphaType; screenshotInfo.fColorType = kRGB_565_SkColorType; screenshotInfo.fAlphaType = kOpaque_SkAlphaType; break; } default: { return NULL; } } SkImageInfo screenshotInfo = SkImageInfo::Make(screenshot->getWidth(), screenshot->getHeight(), ct, at); const size_t rowBytes = screenshot->getStride() * android::bytesPerPixel(screenshot->getFormat()); if (!screenshotInfo.width() || !screenshotInfo.height()) { if (!screenshotInfo.fWidth || !screenshotInfo.fHeight) { return NULL; } Loading