| 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.gfx; | 5 package org.chromium.ui.gl; |
| 6 | 6 |
| 7 import android.graphics.SurfaceTexture; | 7 import android.graphics.SurfaceTexture; |
| 8 import android.os.Build; | 8 import android.os.Build; |
| 9 | 9 |
| 10 import org.chromium.base.CalledByNative; | 10 import org.chromium.base.CalledByNative; |
| 11 import org.chromium.base.JNINamespace; | 11 import org.chromium.base.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. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 assert Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; | 55 assert Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; |
| 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 assert Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; | 61 assert Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; |
| 62 surfaceTexture.detachFromGLContext(); | 62 surfaceTexture.detachFromGLContext(); |
| 63 } | 63 } |
| 64 } | 64 } |
| OLD | NEW |