Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: ui/gfx/android/java_bitmap.h

Issue 176943004: [Android] Implement asynchronous zero-copy bitmap capture API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_ANDROID_JAVA_BITMAP_H_ 5 #ifndef UI_GFX_ANDROID_JAVA_BITMAP_H_
6 #define UI_GFX_ANDROID_JAVA_BITMAP_H_ 6 #define UI_GFX_ANDROID_JAVA_BITMAP_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 23 matching lines...) Expand all
34 private: 34 private:
35 jobject bitmap_; 35 jobject bitmap_;
36 void* pixels_; 36 void* pixels_;
37 gfx::Size size_; 37 gfx::Size size_;
38 int format_; 38 int format_;
39 uint32_t stride_; 39 uint32_t stride_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(JavaBitmap); 41 DISALLOW_COPY_AND_ASSIGN(JavaBitmap);
42 }; 42 };
43 43
44 GFX_EXPORT base::android::ScopedJavaLocalRef<jobject> CreateJavaBitmap(
45 int width,
46 int height,
47 bool is565_config);
48
44 GFX_EXPORT base::android::ScopedJavaLocalRef<jobject> ConvertToJavaBitmap( 49 GFX_EXPORT base::android::ScopedJavaLocalRef<jobject> ConvertToJavaBitmap(
45 const SkBitmap* skbitmap); 50 const SkBitmap* skbitmap);
46 51
47 GFX_EXPORT SkBitmap CreateSkBitmapFromJavaBitmap(JavaBitmap& jbitmap); 52 GFX_EXPORT SkBitmap CreateSkBitmapFromJavaBitmap(JavaBitmap& jbitmap);
48 53
49 // If the resource loads successfully, it will be resized to |size|. 54 // If the resource loads successfully, it will be resized to |size|.
50 // Note: If the source resource is smaller than |size|, quality may suffer. 55 // Note: If the source resource is smaller than |size|, quality may suffer.
51 GFX_EXPORT SkBitmap CreateSkBitmapFromResource(const char* name, 56 GFX_EXPORT SkBitmap CreateSkBitmapFromResource(const char* name,
52 gfx::Size size); 57 gfx::Size size);
53 58
54 } // namespace gfx 59 } // namespace gfx
55 60
56 #endif // UI_GFX_ANDROID_JAVA_BITMAP_H_ 61 #endif // UI_GFX_ANDROID_JAVA_BITMAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698