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

Side by Side Diff: ui/gl/android/surface_texture.cc

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « ui/gl/BUILD.gn ('k') | ui/gl/generate_bindings.py » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/gl/android/surface_texture.h" 5 #include "ui/gl/android/surface_texture.h"
6 6
7 #include <android/native_window_jni.h> 7 #include <android/native_window_jni.h>
8 8
9 // TODO(boliu): Remove this include when we move off ICS. 9 // TODO(boliu): Remove this include when we move off ICS.
10 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
11 #include "base/android/jni_android.h" 11 #include "base/android/jni_android.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "jni/SurfaceTexturePlatformWrapper_jni.h" 13 #include "jni/SurfaceTexturePlatformWrapper_jni.h"
14 #include "ui/gl/android/scoped_java_surface.h" 14 #include "ui/gl/android/scoped_java_surface.h"
15 #include "ui/gl/android/surface_texture_listener.h" 15 #include "ui/gl/android/surface_texture_listener.h"
16 #include "ui/gl/gl_bindings.h" 16 #include "ui/gl/gl_bindings.h"
17 17
18 // TODO(boliu): Remove this method when when we move off ICS. See 18 // TODO(boliu): Remove this method when Chromium stops supporting ICS.
19 // http://crbug.com/161864.
20 bool GlContextMethodsAvailable() { 19 bool GlContextMethodsAvailable() {
21 bool available = base::android::BuildInfo::GetInstance()->sdk_int() >= 16; 20 bool available = base::android::BuildInfo::GetInstance()->sdk_int() >= 16;
22 if (!available) 21 if (!available)
23 LOG(WARNING) << "Running on unsupported device: rendering may not work"; 22 LOG(WARNING) << "Running on unsupported device: rendering may not work";
24 return available; 23 return available;
25 } 24 }
26 25
27 namespace gfx { 26 namespace gfx {
28 27
29 scoped_refptr<SurfaceTexture> SurfaceTexture::Create(int texture_id) { 28 scoped_refptr<SurfaceTexture> SurfaceTexture::Create(int texture_id) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // static 134 // static
136 bool SurfaceTexture::IsSingleBufferModeSupported() { 135 bool SurfaceTexture::IsSingleBufferModeSupported() {
137 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; 136 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19;
138 } 137 }
139 138
140 bool SurfaceTexture::RegisterSurfaceTexture(JNIEnv* env) { 139 bool SurfaceTexture::RegisterSurfaceTexture(JNIEnv* env) {
141 return RegisterNativesImpl(env); 140 return RegisterNativesImpl(env);
142 } 141 }
143 142
144 } // namespace gfx 143 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/BUILD.gn ('k') | ui/gl/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698