From 6153ed745705dd52428aee5726ed410eb5424008 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Tue, 9 Aug 2011 17:41:14 -0700 Subject: Revert "Remove ANativeWindow call to avoid blocking call" This reverts commit aa809ca82529a9d546f50918830d075daea08a91 --- Source/WebCore/platform/graphics/android/MediaTexture.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'Source/WebCore') 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 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) -- cgit v1.1