| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |