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

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

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « ui/base/l10n/l10n_util_android.cc ('k') | ui/gfx/android/shared_device_display_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/gfx/android/java_bitmap.h" 5 #include "ui/gfx/android/java_bitmap.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "jni/BitmapHelper_jni.h" 11 #include "jni/BitmapHelper_jni.h"
12 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
13 13
14 using base::android::AttachCurrentThread; 14 using base::android::AttachCurrentThread;
15 using base::android::ConvertUTF8ToJavaString; 15 using base::android::ConvertUTF8ToJavaString;
16 using base::android::ScopedJavaLocalRef;
16 17
17 namespace gfx { 18 namespace gfx {
18 19
19 JavaBitmap::JavaBitmap(jobject bitmap) 20 JavaBitmap::JavaBitmap(jobject bitmap)
20 : bitmap_(bitmap), 21 : bitmap_(bitmap),
21 pixels_(NULL) { 22 pixels_(NULL) {
22 int err = AndroidBitmap_lockPixels(AttachCurrentThread(), bitmap_, &pixels_); 23 int err = AndroidBitmap_lockPixels(AttachCurrentThread(), bitmap_, &pixels_);
23 DCHECK(!err); 24 DCHECK(!err);
24 DCHECK(pixels_); 25 DCHECK(pixels_);
25 26
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return kN32_SkColorType; 125 return kN32_SkColorType;
125 case BITMAP_FORMAT_RGB_565: 126 case BITMAP_FORMAT_RGB_565:
126 return kRGB_565_SkColorType; 127 return kRGB_565_SkColorType;
127 case BITMAP_FORMAT_NO_CONFIG: 128 case BITMAP_FORMAT_NO_CONFIG:
128 default: 129 default:
129 return kUnknown_SkColorType; 130 return kUnknown_SkColorType;
130 } 131 }
131 } 132 }
132 133
133 } // namespace gfx 134 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/base/l10n/l10n_util_android.cc ('k') | ui/gfx/android/shared_device_display_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698