diff options
author | Romain Guy <romainguy@google.com> | 2011-07-28 16:26:08 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-28 16:26:08 -0700 |
commit | b3a900d7cd3842a208c0448b26806ed9f6d7fa2d (patch) | |
tree | 8cd653d4a27b3ed3983254d8e37e7534c2e399ca /native | |
parent | 8d88cde56dc6624501482f6a11bab4115025d78b (diff) | |
parent | 17e5f4cc706bed08367af8fa60ffb8c7c3ca7f62 (diff) | |
download | frameworks_base-b3a900d7cd3842a208c0448b26806ed9f6d7fa2d.zip frameworks_base-b3a900d7cd3842a208c0448b26806ed9f6d7fa2d.tar.gz frameworks_base-b3a900d7cd3842a208c0448b26806ed9f6d7fa2d.tar.bz2 |
Merge "Add notifyPixelsChanged() call to NDK unlockPixels()."
Diffstat (limited to 'native')
-rw-r--r-- | native/graphics/jni/bitmap.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/native/graphics/jni/bitmap.cpp b/native/graphics/jni/bitmap.cpp index fd73430..51a631f 100644 --- a/native/graphics/jni/bitmap.cpp +++ b/native/graphics/jni/bitmap.cpp @@ -88,6 +88,12 @@ int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap) { return ANDROID_BITMAP_RESULT_JNI_EXCEPTION; } + // notifyPixelsChanged() needs be called to apply writes to GL-backed + // bitmaps. Note that this will slow down read-only accesses to the + // bitmaps, but the NDK methods are primarily intended to be used for + // writes. + bm->notifyPixelsChanged(); + bm->unlockPixels(); return ANDROID_BITMAP_RESUT_SUCCESS; } |