summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/GLUtils.cpp
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2011-08-03 11:06:56 -0400
committerDerek Sollenberger <djsollen@google.com>2011-08-03 14:00:17 -0400
commit2c05b037dcbc9de2f41781747422c2098c42c16e (patch)
treec7dc65608bd8e57fa550413cc04211c670dbbfa8 /Source/WebCore/platform/graphics/android/GLUtils.cpp
parent03137dd16df459ef3bee925373347982cb98124d (diff)
downloadexternal_webkit-2c05b037dcbc9de2f41781747422c2098c42c16e.zip
external_webkit-2c05b037dcbc9de2f41781747422c2098c42c16e.tar.gz
external_webkit-2c05b037dcbc9de2f41781747422c2098c42c16e.tar.bz2
Replace plugin's OpenGL API with a NativeWindow API.
bug: 5114637 Change-Id: Idfadf95b9b65bf87ad2edf76fd2c5fc0513a75c3
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GLUtils.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/GLUtils.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLUtils.cpp b/Source/WebCore/platform/graphics/android/GLUtils.cpp
index 5a6a158..d39b05b 100644
--- a/Source/WebCore/platform/graphics/android/GLUtils.cpp
+++ b/Source/WebCore/platform/graphics/android/GLUtils.cpp
@@ -623,6 +623,21 @@ void GLUtils::createTextureFromEGLImage(GLuint texture, EGLImageKHR image, GLint
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
}
+GLenum GLUtils::getTextureTarget(android::SurfaceTexture* surfaceTexture)
+{
+#if DEPRECATED_SURFACE_TEXTURE_MODE
+ if (surfaceTexture) {
+ GLenum target = surfaceTexture->getCurrentTextureTarget();
+ // TODO: remove this translation when TEXTURE_2D+RGBA surface texture
+ // support is deprecated.
+ if (target == GL_TEXTURE_2D)
+ return 0;
+ return target;
+ }
+#endif
+ return GL_TEXTURE_2D;
+}
+
} // namespace WebCore
#endif // USE(ACCELERATED_COMPOSITING)