Lines Matching refs:env

79 bool GraphicsJNI::SetPixels(JNIEnv* env, jintArray srcColors,

91 const jint* array = env->GetIntArrayElements(srcColors, NULL);
105 env->ReleaseIntArrayElements(srcColors, const_cast<jint*>(array),
213 static jobject Bitmap_creator(JNIEnv* env, jobject, jintArray jColors,
217 size_t n = env->GetArrayLength(jColors);
219 doThrowAIOOBE(env);
228 jbyteArray buff = GraphicsJNI::allocateJavaPixelRef(env, &bitmap, NULL);
234 GraphicsJNI::SetPixels(env, jColors, offset, stride,
238 return GraphicsJNI::createBitmap(env, new SkBitmap(bitmap), buff, isMutable, NULL);
241 static jobject Bitmap_copy(JNIEnv* env, jobject, const SkBitmap* src,
244 JavaPixelAllocator allocator(env);
250 return GraphicsJNI::createBitmap(env, new SkBitmap(result), allocator.getStorageObj(), isMutable, NULL);
253 static void Bitmap_destructor(JNIEnv* env, jobject, SkBitmap* bitmap) {
263 static void Bitmap_recycle(JNIEnv* env, jobject, SkBitmap* bitmap) {
280 static bool Bitmap_compress(JNIEnv* env, jobject clazz, SkBitmap* bitmap,
300 SkWStream* strm = CreateJavaOutputStreamAdaptor(env, jstream, jstorage);
312 static void Bitmap_erase(JNIEnv* env, jobject, SkBitmap* bitmap, jint color) {
316 static int Bitmap_width(JNIEnv* env, jobject, SkBitmap* bitmap) {
320 static int Bitmap_height(JNIEnv* env, jobject, SkBitmap* bitmap) {
324 static int Bitmap_rowBytes(JNIEnv* env, jobject, SkBitmap* bitmap) {
328 static int Bitmap_config(JNIEnv* env, jobject, SkBitmap* bitmap) {
332 static int Bitmap_getGenerationId(JNIEnv* env, jobject, SkBitmap* bitmap) {
336 static jboolean Bitmap_hasAlpha(JNIEnv* env, jobject, SkBitmap* bitmap) {
340 static void Bitmap_setHasAlpha(JNIEnv* env, jobject, SkBitmap* bitmap,
347 static jobject Bitmap_createFromParcel(JNIEnv* env, jobject, jobject parcel) {
353 android::Parcel* p = android::parcelForJavaObject(env, parcel);
385 jbyteArray buffer = GraphicsJNI::allocateJavaPixelRef(env, bitmap, ctable);
399 doThrowRE(env, "Could not read bitmap from parcel blob.");
409 return GraphicsJNI::createBitmap(env, bitmap, buffer, isMutable, NULL, density);
412 static jboolean Bitmap_writeToParcel(JNIEnv* env, jobject,
421 android::Parcel* p = android::parcelForJavaObject(env, parcel);
448 doThrowRE(env, "Could not write bitmap to parcel blob.");
465 static jobject Bitmap_extractAlpha(JNIEnv* env, jobject clazz,
470 JavaPixelAllocator allocator(env);
477 doThrowOOME(env, "failed to allocate pixels for alpha");
480 if (offsetXY != 0 && env->GetArrayLength(offsetXY) >= 2) {
481 int* array = env->GetIntArrayElements(offsetXY, NULL);
484 env->ReleaseIntArrayElements(offsetXY, array, 0);
487 return GraphicsJNI::createBitmap(env, dst, allocator.getStorageObj(), true, NULL);
492 static int Bitmap_getPixel(JNIEnv* env, jobject, const SkBitmap* bitmap,
510 static void Bitmap_getPixels(JNIEnv* env, jobject, const SkBitmap* bitmap,
525 jint* dst = env->GetIntArrayElements(pixelArray, NULL);
532 env->ReleaseIntArrayElements(pixelArray, dst, 0);
537 static void Bitmap_setPixel(JNIEnv* env, jobject, const SkBitmap* bitmap,
553 static void Bitmap_setPixels(JNIEnv* env, jobject, const SkBitmap* bitmap,
556 GraphicsJNI::SetPixels(env, pixelArray, offset, stride,
560 static void Bitmap_copyPixelsToBuffer(JNIEnv* env, jobject,
566 android::AutoBufferPointer abp(env, jbuffer, JNI_TRUE);
573 static void Bitmap_copyPixelsFromBuffer(JNIEnv* env, jobject,
579 android::AutoBufferPointer abp(env, jbuffer, JNI_FALSE);
586 static bool Bitmap_sameAs(JNIEnv* env, jobject, const SkBitmap* bm0,
633 static void Bitmap_prepareToDraw(JNIEnv* env, jobject, SkBitmap* bitmap) {
680 int register_android_graphics_Bitmap(JNIEnv* env)
682 return android::AndroidRuntime::registerNativeMethods(env, kClassPathName,