diff options
author | John Reck <jreck@google.com> | 2015-04-20 22:06:31 +0000 |
---|---|---|
committer | John Reck <jreck@google.com> | 2015-04-20 22:06:31 +0000 |
commit | edc22fba5921f5c2d3502727e707f959b8c3a460 (patch) | |
tree | 947113958a48609f55d003e2735739727b6cc70f /core/jni/com_google_android_gles_jni_EGLImpl.cpp | |
parent | a771b9861d11671c780092d35c0062eeefcf37c0 (diff) | |
download | frameworks_base-edc22fba5921f5c2d3502727e707f959b8c3a460.zip frameworks_base-edc22fba5921f5c2d3502727e707f959b8c3a460.tar.gz frameworks_base-edc22fba5921f5c2d3502727e707f959b8c3a460.tar.bz2 |
Revert "Change how Java Bitmaps are accessed in a few places"
Bug: 20207616
This reverts commit a771b9861d11671c780092d35c0062eeefcf37c0.
Change-Id: Ifd891cc075274a7986e987229e0fed5a04ed9ff0
Diffstat (limited to 'core/jni/com_google_android_gles_jni_EGLImpl.cpp')
-rw-r--r-- | core/jni/com_google_android_gles_jni_EGLImpl.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/jni/com_google_android_gles_jni_EGLImpl.cpp b/core/jni/com_google_android_gles_jni_EGLImpl.cpp index baeb7dd..7080e2a 100644 --- a/core/jni/com_google_android_gles_jni_EGLImpl.cpp +++ b/core/jni/com_google_android_gles_jni_EGLImpl.cpp @@ -277,9 +277,8 @@ static void jni_eglCreatePixmapSurface(JNIEnv *_env, jobject _this, jobject out_ EGLConfig cnf = getConfig(_env, config); jint* base = 0; - SkBitmap nativeBitmap; - GraphicsJNI::getSkBitmap(_env, native_pixmap, &nativeBitmap); - SkPixelRef* ref = nativeBitmap.pixelRef(); + SkBitmap const * nativeBitmap = GraphicsJNI::getSkBitmap(_env, native_pixmap); + SkPixelRef* ref = nativeBitmap ? nativeBitmap->pixelRef() : 0; if (ref == NULL) { jniThrowException(_env, "java/lang/IllegalArgumentException", "Bitmap has no PixelRef"); return; @@ -290,10 +289,10 @@ static void jni_eglCreatePixmapSurface(JNIEnv *_env, jobject _this, jobject out_ egl_native_pixmap_t pixmap; pixmap.version = sizeof(pixmap); - pixmap.width = nativeBitmap.width(); - pixmap.height = nativeBitmap.height(); - pixmap.stride = nativeBitmap.rowBytes() / nativeBitmap.bytesPerPixel(); - pixmap.format = convertPixelFormat(nativeBitmap.colorType()); + pixmap.width = nativeBitmap->width(); + pixmap.height = nativeBitmap->height(); + pixmap.stride = nativeBitmap->rowBytes() / nativeBitmap->bytesPerPixel(); + pixmap.format = convertPixelFormat(nativeBitmap->colorType()); pixmap.data = (uint8_t*)ref->pixels(); base = beginNativeAttribList(_env, attrib_list); |