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

Side by Side Diff: ui/android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
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 package org.chromium.ui.gl; 5 package org.chromium.ui.gl;
6 6
7 import android.graphics.SurfaceTexture; 7 import android.graphics.SurfaceTexture;
8 8
9 import org.chromium.base.annotations.JNINamespace; 9 import org.chromium.base.annotations.JNINamespace;
10 10
11 /** 11 /**
12 * Listener to an android SurfaceTexture object for frame availability. 12 * Listener to an android SurfaceTexture object for frame availability.
13 */ 13 */
14 @JNINamespace("gfx") 14 @JNINamespace("gl")
15 class SurfaceTextureListener implements SurfaceTexture.OnFrameAvailableListener { 15 class SurfaceTextureListener implements SurfaceTexture.OnFrameAvailableListener {
16 // Used to determine the class instance to dispatch the native call to. 16 // Used to determine the class instance to dispatch the native call to.
17 private final long mNativeSurfaceTextureListener; 17 private final long mNativeSurfaceTextureListener;
18 18
19 SurfaceTextureListener(long nativeSurfaceTextureListener) { 19 SurfaceTextureListener(long nativeSurfaceTextureListener) {
20 assert nativeSurfaceTextureListener != 0; 20 assert nativeSurfaceTextureListener != 0;
21 mNativeSurfaceTextureListener = nativeSurfaceTextureListener; 21 mNativeSurfaceTextureListener = nativeSurfaceTextureListener;
22 } 22 }
23 23
24 @Override 24 @Override
25 public void onFrameAvailable(SurfaceTexture surfaceTexture) { 25 public void onFrameAvailable(SurfaceTexture surfaceTexture) {
26 nativeFrameAvailable(mNativeSurfaceTextureListener); 26 nativeFrameAvailable(mNativeSurfaceTextureListener);
27 } 27 }
28 28
29 @Override 29 @Override
30 protected void finalize() throws Throwable { 30 protected void finalize() throws Throwable {
31 try { 31 try {
32 nativeDestroy(mNativeSurfaceTextureListener); 32 nativeDestroy(mNativeSurfaceTextureListener);
33 } finally { 33 } finally {
34 super.finalize(); 34 super.finalize();
35 } 35 }
36 } 36 }
37 37
38 private native void nativeFrameAvailable(long nativeSurfaceTextureListener); 38 private native void nativeFrameAvailable(long nativeSurfaceTextureListener);
39 private native void nativeDestroy(long nativeSurfaceTextureListener); 39 private native void nativeDestroy(long nativeSurfaceTextureListener);
40 } 40 }
OLDNEW
« no previous file with comments | « media/gpu/vaapi_video_decode_accelerator.cc ('k') | ui/android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698