diff options
| author | 2011-07-28 16:26:08 -0700 | |
|---|---|---|
| committer | 2011-07-28 16:26:08 -0700 | |
| commit | b3a900d7cd3842a208c0448b26806ed9f6d7fa2d (patch) | |
| tree | 8cd653d4a27b3ed3983254d8e37e7534c2e399ca | |
| parent | 8d88cde56dc6624501482f6a11bab4115025d78b (diff) | |
| parent | 17e5f4cc706bed08367af8fa60ffb8c7c3ca7f62 (diff) | |
Merge "Add notifyPixelsChanged() call to NDK unlockPixels()."
| -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 fd73430bf7aa..51a631fa6875 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; } |