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

Unified Diff: ui/gfx/android/java_bitmap.cc

Issue 159463004: Packing/unpacking of width and height in gfx::Size is redundant while using CreateJavaBitmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/android/java_bitmap.cc
diff --git a/ui/gfx/android/java_bitmap.cc b/ui/gfx/android/java_bitmap.cc
index 0127ec8ae2c051b15cd0a17073556900bf3663e0..fba158ec7b320ca7fdcbcf2539a677e2c8fcd07f 100644
--- a/ui/gfx/android/java_bitmap.cc
+++ b/ui/gfx/android/java_bitmap.cc
@@ -42,10 +42,10 @@ bool JavaBitmap::RegisterJavaBitmap(JNIEnv* env) {
return RegisterNativesImpl(env);
}
-static ScopedJavaLocalRef<jobject> CreateJavaBitmap(const gfx::Size& size,
+static ScopedJavaLocalRef<jobject> CreateJavaBitmap(int width, int height,
bool is565_config) {
return Java_BitmapHelper_createBitmap(AttachCurrentThread(),
- size.width(), size.height(), is565_config);
+ width, height, is565_config);
}
ScopedJavaLocalRef<jobject> ConvertToJavaBitmap(const SkBitmap* skbitmap) {
@@ -55,7 +55,7 @@ ScopedJavaLocalRef<jobject> ConvertToJavaBitmap(const SkBitmap* skbitmap) {
(config == SkBitmap::kARGB_8888_Config));
// If the Config is not RGB565 it is default i.e ARGB8888
ScopedJavaLocalRef<jobject> jbitmap =
- CreateJavaBitmap(gfx::Size(skbitmap->width(), skbitmap->height()),
+ CreateJavaBitmap(skbitmap->width(), skbitmap->height(),
(config == SkBitmap::kRGB_565_Config));
SkAutoLockPixels src_lock(*skbitmap);
JavaBitmap dst_lock(jbitmap.obj());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698