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

Side by Side Diff: content/common/android/scoped_java_surface.h

Issue 12388038: Android: Remove Surface cruft (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_ANDROID_SCOPED_JAVA_SURFACE_H_
6 #define CONTENT_COMMON_ANDROID_SCOPED_JAVA_SURFACE_H_
7
8 #include <jni.h>
9
10 #include "base/android/scoped_java_ref.h"
11
12 namespace content {
13
14 class SurfaceTextureBridge;
15
16 // A helper class for holding a scoped reference to a Java Surface instance.
17 // When going out of scope, release() is called on the Java object to make
bulach 2013/03/05 10:32:33 nit: to be extra clear, "Surface.release() is call
no sievers 2013/03/05 21:21:46 Done.
18 // sure server-side references (esp. wrt graphics memory) are released.
19 class ScopedJavaSurface {
20 public:
21 ScopedJavaSurface();
22
23 // Wraps an existing Java Surface object in a ScopedJavaSurface.
24 explicit ScopedJavaSurface(const base::android::JavaRef<jobject>& surface);
bulach 2013/03/05 10:32:33 the thing about "ResetFrom*" is that we could pote
25
26 // Creates a Java Surface from a SurfaceTexture and wraps it in a
27 // ScopedJavaSurface.
28 explicit ScopedJavaSurface(const SurfaceTextureBridge* surface_texture);
29
30 ~ScopedJavaSurface();
31
32 const base::android::JavaRef<jobject>& j_surface() const {
33 return j_surface_;
34 }
35
36 private:
37 base::android::ScopedJavaGlobalRef<jobject> j_surface_;
38 };
39
40 } // namespace content
41
42 #endif // CONTENT_COMMON_ANDROID_SCOPED_JAVA_SURFACE_H_
OLDNEW
« no previous file with comments | « content/common/android/common_jni_registrar.cc ('k') | content/common/android/scoped_java_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698