From dbc927aa59d0025f8aecec77d92a3d5166ecc644 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 17 Oct 2013 16:52:00 +0200 Subject: [PATCH 11/20] [Texmap] CSS filter not working on software composited layers https://bugs.webkit.org/show_bug.cgi?id=122159 Reviewed by Noam Rosenthal. Tell the rendering layer we do not support CSS filters when we do not. This will make RenderLayer fall back to using its own software implementation. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::setFilters): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::applyFilters): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156710 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/platform/qt-4.8/TestExpectations | 3 --- Source/WebCore/ChangeLog | 15 +++++++++++++++ .../graphics/texmap/GraphicsLayerTextureMapper.cpp | 4 ++++ .../platform/graphics/texmap/TextureMapperImageBuffer.cpp | 11 ----------- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index e70115f..f0ebd4c 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2013-10-01 Allan Sandfeld Jensen + + [Texmap] CSS filter not working on software composited layers + https://bugs.webkit.org/show_bug.cgi?id=122159 + + Reviewed by Noam Rosenthal. + + Tell the rendering layer we do not support CSS filters when we do not. This + will make RenderLayer fall back to using its own software implementation. + + * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: + (WebCore::GraphicsLayerTextureMapper::setFilters): + * platform/graphics/texmap/TextureMapperImageBuffer.cpp: + (WebCore::BitmapTextureImageBuffer::applyFilters): + 2013-09-17 Michael BrĂ¼ning Correct range used for Emoji checks. diff --git a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp index 364ddd2..bc71371 100644 --- a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp +++ b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp @@ -573,6 +573,10 @@ void GraphicsLayerTextureMapper::setDebugBorder(const Color& color, float width) #if ENABLE(CSS_FILTERS) bool GraphicsLayerTextureMapper::setFilters(const FilterOperations& filters) { + TextureMapper* textureMapper = m_layer->textureMapper(); + // TextureMapperImageBuffer does not support CSS filters. + if (!textureMapper || textureMapper->accelerationMode() == TextureMapper::SoftwareMode) + return false; notifyChange(TextureMapperLayer::FilterChange); return GraphicsLayer::setFilters(filters); } diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp index e01ed3d..112c795 100644 --- a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp +++ b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp @@ -167,17 +167,6 @@ void TextureMapperImageBuffer::drawSolidColor(const FloatRect& rect, const Trans #if ENABLE(CSS_FILTERS) PassRefPtr BitmapTextureImageBuffer::applyFilters(TextureMapper*, const BitmapTexture& contentTexture, const FilterOperations& filters) { - RefPtr renderer = FilterEffectRenderer::create(); - renderer->setSourceImageRect(FloatRect(FloatPoint::zero(), contentTexture.size())); - - // The document parameter is only needed for CSS shaders. - if (renderer->build(0 /*document */, filters)) { - renderer->allocateBackingStoreIfNeeded(); - GraphicsContext* context = renderer->inputContext(); - context->drawImageBuffer(static_cast(contentTexture).m_image.get(), ColorSpaceDeviceRGB, IntPoint::zero()); - renderer->apply(); - m_image->context()->drawImageBuffer(renderer->output(), ColorSpaceDeviceRGB, renderer->outputRect()); - } return this; } #endif -- 1.8.5.3