summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-08-05 14:05:23 -0700
committerChris Craik <ccraik@google.com>2011-08-05 14:15:25 -0700
commitb7ca8e8315c6a4514200d2dbb823984267b4f9cc (patch)
tree85eca75dd3499ff1276b3dbcd234f7638abf3c37 /Source/WebCore/platform/graphics/android
parent2c05b037dcbc9de2f41781747422c2098c42c16e (diff)
downloadexternal_webkit-b7ca8e8315c6a4514200d2dbb823984267b4f9cc.zip
external_webkit-b7ca8e8315c6a4514200d2dbb823984267b4f9cc.tar.gz
external_webkit-b7ca8e8315c6a4514200d2dbb823984267b4f9cc.tar.bz2
Force NativeWindow rendering to use EXTERNAL_OES textures
bug:5114637 Allows browser plugin to draw texture correctly Change-Id: Ibd61b11598d0ca5bcff28ed0c92e6f20073f5ad6
Diffstat (limited to 'Source/WebCore/platform/graphics/android')
-rw-r--r--Source/WebCore/platform/graphics/android/GLUtils.cpp15
-rw-r--r--Source/WebCore/platform/graphics/android/GLUtils.h2
-rw-r--r--Source/WebCore/platform/graphics/android/MediaTexture.cpp3
3 files changed, 1 insertions, 19 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLUtils.cpp b/Source/WebCore/platform/graphics/android/GLUtils.cpp
index d39b05b..5a6a158 100644
--- a/Source/WebCore/platform/graphics/android/GLUtils.cpp
+++ b/Source/WebCore/platform/graphics/android/GLUtils.cpp
@@ -623,21 +623,6 @@ 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)
diff --git a/Source/WebCore/platform/graphics/android/GLUtils.h b/Source/WebCore/platform/graphics/android/GLUtils.h
index 67ff77a..b952513 100644
--- a/Source/WebCore/platform/graphics/android/GLUtils.h
+++ b/Source/WebCore/platform/graphics/android/GLUtils.h
@@ -83,8 +83,6 @@ public:
static void updateSurfaceTextureWithBitmap(const TileRenderInfo* , int x, int y, const SkBitmap& bitmap, GLint filter = GL_LINEAR);
#endif
static void updateSharedSurfaceTextureWithBitmap(const TileRenderInfo* , int x, int y, const SkBitmap& bitmap);
-
- static GLenum getTextureTarget(android::SurfaceTexture*);
};
} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/android/MediaTexture.cpp b/Source/WebCore/platform/graphics/android/MediaTexture.cpp
index a653d6e..3fecfb5 100644
--- a/Source/WebCore/platform/graphics/android/MediaTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/MediaTexture.cpp
@@ -105,10 +105,9 @@ void MediaTexture::drawContent(const TransformationMatrix& matrix)
m_surfaceTexture->updateTexImage();
bool forceBlending = ANativeWindow_getFormat(m_surfaceTextureClient.get()) == WINDOW_FORMAT_RGB_565;
- GLenum target = GLUtils::getTextureTarget(m_surfaceTexture.get());
TilesManager::instance()->shader()->drawLayerQuad(matrix, m_dimensions,
m_textureId, 1.0f,
- forceBlending, target);
+ forceBlending, GL_TEXTURE_EXTERNAL_OES);
}
void MediaTexture::drawVideo(const TransformationMatrix& matrix, const SkRect& parentBounds)