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

Unified Diff: ui/gl/android/surface_texture.h

Issue 2706653002: Added SurfaceTextureGLOwner to create / own GL objects. (Closed)
Patch Set: stopped including gl_initializer.h Created 3 years, 9 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 | « media/gpu/surface_texture_gl_owner_unittest.cc ('k') | ui/gl/android/surface_texture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/android/surface_texture.h
diff --git a/ui/gl/android/surface_texture.h b/ui/gl/android/surface_texture.h
index 3f0d8e1dbb3b7d45680376b8bd46412e2254981d..db2258126ba800829b643b505d5d2f0ac65d3af0 100644
--- a/ui/gl/android/surface_texture.h
+++ b/ui/gl/android/surface_texture.h
@@ -46,11 +46,11 @@ class GL_EXPORT SurfaceTexture
// Attach the SurfaceTexture to the texture currently bound to
// GL_TEXTURE_EXTERNAL_OES.
- void AttachToGLContext();
+ virtual void AttachToGLContext();
// Detaches the SurfaceTexture from the context that owns its current GL
// texture. Must be called with that context current on the calling thread.
- void DetachFromGLContext();
+ virtual void DetachFromGLContext();
// Creates a native render surface for this surface texture.
// The caller must release the underlying reference when done with the handle
@@ -70,12 +70,19 @@ class GL_EXPORT SurfaceTexture
}
protected:
+ static base::android::ScopedJavaLocalRef<jobject> CreateJavaSurfaceTexture(
+ int texture_id);
+
explicit SurfaceTexture(
const base::android::ScopedJavaLocalRef<jobject>& j_surface_texture);
+ virtual ~SurfaceTexture();
+
+ // Destroy |j_surface_texture| if it hasn't been destroyed already.
+ void DestroyJavaObject();
+
private:
friend class base::RefCountedThreadSafe<SurfaceTexture>;
- ~SurfaceTexture();
// Java SurfaceTexture instance.
base::android::ScopedJavaGlobalRef<jobject> j_surface_texture_;
« no previous file with comments | « media/gpu/surface_texture_gl_owner_unittest.cc ('k') | ui/gl/android/surface_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698