| OLD | NEW |
| 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 import android.util.Log; | 8 import android.util.Log; |
| 9 | 9 |
| 10 import org.chromium.base.annotations.CalledByNative; | 10 import org.chromium.base.annotations.CalledByNative; |
| 11 import org.chromium.base.annotations.JNINamespace; | 11 import org.chromium.base.annotations.JNINamespace; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * Wrapper class for the underlying platform's SurfaceTexture in order to | 14 * Wrapper class for the underlying platform's SurfaceTexture in order to |
| 15 * provide a stable JNI API. | 15 * provide a stable JNI API. |
| 16 */ | 16 */ |
| 17 @JNINamespace("gfx") | 17 @JNINamespace("gl") |
| 18 class SurfaceTexturePlatformWrapper { | 18 class SurfaceTexturePlatformWrapper { |
| 19 | 19 |
| 20 private static final String TAG = "SurfaceTexturePlatformWrapper"; | 20 private static final String TAG = "SurfaceTexturePlatformWrapper"; |
| 21 | 21 |
| 22 @CalledByNative | 22 @CalledByNative |
| 23 private static SurfaceTexture create(int textureId) { | 23 private static SurfaceTexture create(int textureId) { |
| 24 return new SurfaceTexture(textureId); | 24 return new SurfaceTexture(textureId); |
| 25 } | 25 } |
| 26 | 26 |
| 27 @CalledByNative | 27 @CalledByNative |
| (...skipping 26 matching lines...) Expand all Loading... |
| 54 @CalledByNative | 54 @CalledByNative |
| 55 private static void attachToGLContext(SurfaceTexture surfaceTexture, int tex
Name) { | 55 private static void attachToGLContext(SurfaceTexture surfaceTexture, int tex
Name) { |
| 56 surfaceTexture.attachToGLContext(texName); | 56 surfaceTexture.attachToGLContext(texName); |
| 57 } | 57 } |
| 58 | 58 |
| 59 @CalledByNative | 59 @CalledByNative |
| 60 private static void detachFromGLContext(SurfaceTexture surfaceTexture) { | 60 private static void detachFromGLContext(SurfaceTexture surfaceTexture) { |
| 61 surfaceTexture.detachFromGLContext(); | 61 surfaceTexture.detachFromGLContext(); |
| 62 } | 62 } |
| 63 } | 63 } |
| OLD | NEW |