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

Side by Side Diff: ui/gl/android/surface_texture_bridge.h

Issue 22912020: Introduce facade for interaction with Android SurfaceTexture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fn order Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/gl/android/gl_jni_registrar.cc ('k') | ui/gl/android/surface_texture_bridge.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef UI_GL_ANDROID_SURFACE_TEXTURE_BRIDGE_H_ 5 #ifndef UI_GL_ANDROID_SURFACE_TEXTURE_BRIDGE_H_
6 #define UI_GL_ANDROID_SURFACE_TEXTURE_BRIDGE_H_ 6 #define UI_GL_ANDROID_SURFACE_TEXTURE_BRIDGE_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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Creates a native render surface for this surface texture. 51 // Creates a native render surface for this surface texture.
52 // The caller must release the underlying reference when done with the handle 52 // The caller must release the underlying reference when done with the handle
53 // by calling ANativeWindow_release(). 53 // by calling ANativeWindow_release().
54 ANativeWindow* CreateSurface(); 54 ANativeWindow* CreateSurface();
55 55
56 const base::android::JavaRef<jobject>& j_surface_texture() const { 56 const base::android::JavaRef<jobject>& j_surface_texture() const {
57 return j_surface_texture_; 57 return j_surface_texture_;
58 } 58 }
59 59
60 static bool RegisterSurfaceTextureBridge(JNIEnv* env);
61
60 private: 62 private:
61 friend class base::RefCountedThreadSafe<SurfaceTextureBridge>; 63 friend class base::RefCountedThreadSafe<SurfaceTextureBridge>;
62 ~SurfaceTextureBridge(); 64 ~SurfaceTextureBridge();
63 65
64 // Java SurfaceTexture instance. 66 // Java SurfaceTexture instance.
65 base::android::ScopedJavaGlobalRef<jobject> j_surface_texture_; 67 base::android::ScopedJavaGlobalRef<jobject> j_surface_texture_;
66 68
67 DISALLOW_COPY_AND_ASSIGN(SurfaceTextureBridge); 69 DISALLOW_COPY_AND_ASSIGN(SurfaceTextureBridge);
68 }; 70 };
69 71
70 } // namespace gfx 72 } // namespace gfx
71 73
72 #endif // UI_GL_ANDROID_SURFACE_TEXTURE_BRIDGE_H_ 74 #endif // UI_GL_ANDROID_SURFACE_TEXTURE_BRIDGE_H_
OLDNEW
« no previous file with comments | « ui/gl/android/gl_jni_registrar.cc ('k') | ui/gl/android/surface_texture_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698