Loading core/jni/android_view_SurfaceControl.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz, switch (screenshot->getFormat()) { case PIXEL_FORMAT_RGBX_8888: { screenshotInfo.fColorType = kRGBA_8888_SkColorType; screenshotInfo.fAlphaType = kIgnore_SkAlphaType; screenshotInfo.fAlphaType = kOpaque_SkAlphaType; break; } case PIXEL_FORMAT_RGBA_8888: { Loading @@ -160,7 +160,7 @@ static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz, } case PIXEL_FORMAT_RGB_565: { screenshotInfo.fColorType = kRGB_565_SkColorType; screenshotInfo.fAlphaType = kIgnore_SkAlphaType; screenshotInfo.fAlphaType = kOpaque_SkAlphaType; break; } default: { Loading core/jni/android_view_TextureView.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -88,12 +88,15 @@ static inline SkImageInfo convertPixelFormat(const ANativeWindow_Buffer& buffer) case WINDOW_FORMAT_RGBX_8888: info.fColorType = kN32_SkColorType; info.fAlphaType = kOpaque_SkAlphaType; break; case WINDOW_FORMAT_RGB_565: info.fColorType = kRGB_565_SkColorType; info.fAlphaType = kOpaque_SkAlphaType; break; default: info.fColorType = kUnknown_SkColorType; info.fAlphaType = kIgnore_SkAlphaType; // switch to kUnknown_SkAlphaType when its in skia info.fAlphaType = kOpaque_SkAlphaType; break; } return info; Loading Loading
core/jni/android_view_SurfaceControl.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz, switch (screenshot->getFormat()) { case PIXEL_FORMAT_RGBX_8888: { screenshotInfo.fColorType = kRGBA_8888_SkColorType; screenshotInfo.fAlphaType = kIgnore_SkAlphaType; screenshotInfo.fAlphaType = kOpaque_SkAlphaType; break; } case PIXEL_FORMAT_RGBA_8888: { Loading @@ -160,7 +160,7 @@ static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz, } case PIXEL_FORMAT_RGB_565: { screenshotInfo.fColorType = kRGB_565_SkColorType; screenshotInfo.fAlphaType = kIgnore_SkAlphaType; screenshotInfo.fAlphaType = kOpaque_SkAlphaType; break; } default: { Loading
core/jni/android_view_TextureView.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -88,12 +88,15 @@ static inline SkImageInfo convertPixelFormat(const ANativeWindow_Buffer& buffer) case WINDOW_FORMAT_RGBX_8888: info.fColorType = kN32_SkColorType; info.fAlphaType = kOpaque_SkAlphaType; break; case WINDOW_FORMAT_RGB_565: info.fColorType = kRGB_565_SkColorType; info.fAlphaType = kOpaque_SkAlphaType; break; default: info.fColorType = kUnknown_SkColorType; info.fAlphaType = kIgnore_SkAlphaType; // switch to kUnknown_SkAlphaType when its in skia info.fAlphaType = kOpaque_SkAlphaType; break; } return info; Loading