summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-08-09 17:48:07 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-09 17:48:07 -0700
commit5c403a0d2cc6f6936b56beeb5f601fe21e837254 (patch)
treeda30b1dda0b2ecc170895536954a42e34a9bd6fe /Source/WebCore
parent92ca5508d5114ba07de5fa64b9f34571bff00831 (diff)
parent6153ed745705dd52428aee5726ed410eb5424008 (diff)
downloadexternal_webkit-5c403a0d2cc6f6936b56beeb5f601fe21e837254.zip
external_webkit-5c403a0d2cc6f6936b56beeb5f601fe21e837254.tar.gz
external_webkit-5c403a0d2cc6f6936b56beeb5f601fe21e837254.tar.bz2
Merge "Revert "Remove ANativeWindow call to avoid blocking call""
Diffstat (limited to 'Source/WebCore')
-rw-r--r--Source/WebCore/platform/graphics/android/MediaTexture.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/Source/WebCore/platform/graphics/android/MediaTexture.cpp b/Source/WebCore/platform/graphics/android/MediaTexture.cpp
index b9c640d..3fecfb5 100644
--- a/Source/WebCore/platform/graphics/android/MediaTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/MediaTexture.cpp
@@ -104,19 +104,10 @@ void MediaTexture::drawContent(const TransformationMatrix& matrix)
m_surfaceTexture->updateTexImage();
- sp<GraphicBuffer> buf = m_surfaceTexture->getCurrentBuffer();
- PixelFormat f = buf->getPixelFormat();
-
- // only attempt to use alpha blending if alpha channel exists
- bool forceAlphaBlending = !(
- PIXEL_FORMAT_RGBX_8888 == f ||
- PIXEL_FORMAT_RGB_888 == f ||
- PIXEL_FORMAT_RGB_565 == f ||
- PIXEL_FORMAT_RGB_332 == f);
-
+ bool forceBlending = ANativeWindow_getFormat(m_surfaceTextureClient.get()) == WINDOW_FORMAT_RGB_565;
TilesManager::instance()->shader()->drawLayerQuad(matrix, m_dimensions,
m_textureId, 1.0f,
- forceAlphaBlending, GL_TEXTURE_EXTERNAL_OES);
+ forceBlending, GL_TEXTURE_EXTERNAL_OES);
}
void MediaTexture::drawVideo(const TransformationMatrix& matrix, const SkRect& parentBounds)