Changeset 107814 in webkit
- Timestamp:
- Feb 15, 2012 7:29:40 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 20 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r107807 r107814 1 2012-02-15 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 [Texmap] Support filters in TextureMapperImageBuffer 4 https://bugs.webkit.org/show_bug.cgi?id=76026 5 6 Unskipping hardware filter tests. They're still skipped in WebKit2. 7 8 Reviewed by Kenneth Rohde Christiansen. 9 10 * platform/qt-5.0-wk2/Skipped: 11 * platform/qt/Skipped: 12 * platform/qt/css3/filters/crash-hw-sw-switch-expected.png: 13 * platform/qt/css3/filters/effect-blur-hw-expected.png: Added. 14 * platform/qt/css3/filters/effect-blur-hw-expected.txt: Added. 15 * platform/qt/css3/filters/effect-combined-expected.png: Added. 16 * platform/qt/css3/filters/effect-combined-expected.txt: Added. 17 * platform/qt/css3/filters/effect-combined-hw-expected.png: Added. 18 * platform/qt/css3/filters/effect-combined-hw-expected.txt: Added. 19 * platform/qt/css3/filters/effect-drop-shadow-hw-expected.png: Added. 20 * platform/qt/css3/filters/effect-drop-shadow-hw-expected.txt: Added. 21 * platform/qt/css3/filters/effect-grayscale-hw-expected.png: Added. 22 * platform/qt/css3/filters/effect-grayscale-hw-expected.txt: Added. 23 * platform/qt/css3/filters/effect-hue-rotate-hw-expected.png: Added. 24 * platform/qt/css3/filters/effect-hue-rotate-hw-expected.txt: Added. 25 * platform/qt/css3/filters/effect-invert-hw-expected.png: Added. 26 * platform/qt/css3/filters/effect-invert-hw-expected.txt: Added. 27 * platform/qt/css3/filters/effect-opacity-hw-expected.png: Added. 28 * platform/qt/css3/filters/effect-opacity-hw-expected.txt: Added. 29 * platform/qt/css3/filters/effect-saturate-hw-expected.png: Added. 30 * platform/qt/css3/filters/effect-saturate-hw-expected.txt: Added. 31 * platform/qt/css3/filters/effect-sepia-hw-expected.png: Added. 32 * platform/qt/css3/filters/effect-sepia-hw-expected.txt: Added. 33 1 34 2012-02-15 Noel Gordon <noel.gordon@gmail.com> 2 35 -
trunk/LayoutTests/platform/qt-5.0-wk2/Skipped
r107090 r107814 384 384 css3/filters/should-not-have-compositing-layer.html 385 385 386 # Hardware filters don't work with GL yet 387 # https://bugs.webkit.org/show_bug.cgi?id=75778 388 css3/filters/crash-hw-sw-switch.html 389 css3/filters/effect-blur-hw.html 390 css3/filters/effect-combined-hw.html 391 css3/filters/effect-drop-shadow-hw.html 392 css3/filters/effect-grayscale-hw.html 393 css3/filters/effect-hue-rotate-hw.html 394 css3/filters/effect-invert-hw.html 395 css3/filters/effect-opacity-hw.html 396 css3/filters/effect-saturate-hw.html 397 css3/filters/effect-sepia-hw.html 398 386 399 # Unskipped on Qt5, but still fail on qt-wk2 platform 387 400 editing/input/emacs-ctrl-o.html -
trunk/LayoutTests/platform/qt/Skipped
r107772 r107814 267 267 css3/filters/filter-property.html 268 268 css3/filters/filter-repaint.html 269 css3/filters/crash-hw-sw-switch.html 270 css3/filters/effect-blur-hw.html 271 css3/filters/effect-combined.html 272 css3/filters/effect-combined-hw.html 269 270 # CSS shaders 273 271 css3/filters/effect-custom.html 274 css3/filters/effect-drop-shadow-hw.html 275 css3/filters/effect-grayscale-hw.html 276 css3/filters/effect-hue-rotate-hw.html 277 css3/filters/effect-invert-hw.html 278 css3/filters/effect-opacity-hw.html 279 css3/filters/effect-saturate-hw.html 280 css3/filters/effect-sepia-hw.html 272 css3/filters/custom-filter-shader-cache.html 273 css3/filters/effect-custom-parameters.html 274 css3/filters/effect-custom-combined-missing.html 281 275 282 276 # Support multipart responses is not implemented. -
trunk/Source/WebCore/ChangeLog
r107813 r107814 1 2012-02-15 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 [Texmap] Support filters in TextureMapperImageBuffer 4 https://bugs.webkit.org/show_bug.cgi?id=76026 5 6 Implement GraphicsLayer::setFilters for TextureMapper, and pass the filters all the way 7 to BitmapTextureImageBuffer. This does not introduce a new filters implementation, but 8 rather uses the non-AC implementation. A complete implementation will be needed in 9 TextureMapperGL, which can use some of the glue in this code. 10 11 Reviewed by Kenneth Rohde Christiansen. 12 13 Unskipped 10 tests in css3/filters. 14 15 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: 16 (WebCore): 17 (WebCore::GraphicsLayerTextureMapper::setFilters): 18 * platform/graphics/texmap/GraphicsLayerTextureMapper.h: 19 (GraphicsLayerTextureMapper): 20 * platform/graphics/texmap/TextureMapper.h: 21 (BitmapTexture): 22 (WebCore::BitmapTexture::applyFilters): 23 * platform/graphics/texmap/TextureMapperImageBuffer.cpp: 24 (WebCore): 25 (WebCore::BitmapTextureImageBuffer::applyFilters): 26 * platform/graphics/texmap/TextureMapperImageBuffer.h: 27 (BitmapTextureImageBuffer): 28 * platform/graphics/texmap/TextureMapperLayer.cpp: 29 (WebCore::TextureMapperLayer::shouldPaintToIntermediateSurface): 30 (WebCore): 31 (WebCore::applyFilters): 32 (WebCore::TextureMapperLayer::paintRecursive): 33 (WebCore::TextureMapperLayer::syncCompositingStateSelf): 34 * platform/graphics/texmap/TextureMapperLayer.h: 35 (State): 36 1 37 2012-02-15 Simon Hausmann <simon.hausmann@nokia.com> 2 38 -
trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
r107787 r107814 384 384 } 385 385 386 } 386 #if ENABLE(CSS_FILTERS) 387 bool GraphicsLayerTextureMapper::setFilters(const FilterOperations& filters) 388 { 389 notifyChange(TextureMapperLayer::FilterChange); 390 return GraphicsLayer::setFilters(filters); 391 } 392 #endif 393 394 } -
trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h
r107787 r107814 91 91 IntRect needsDisplayRect() const { return enclosingIntRect(m_needsDisplayRect); } 92 92 93 #if ENABLE(CSS_FILTERS) 94 virtual bool setFilters(const FilterOperations&); 95 #endif 96 93 97 private: 94 98 OwnPtr<TextureMapperLayer> m_layer; -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h
r107707 r107814 28 28 #endif 29 29 30 #include "FilterOperations.h" 30 31 #include "GraphicsContext.h" 31 32 #include "IntRect.h" … … 71 72 inline int numberOfBytes() const { return size().width() * size().height() * bpp() >> 3; } 72 73 inline bool isOpaque() const { return m_isOpaque; } 74 75 #if ENABLE(CSS_FILTERS) 76 virtual void applyFilters(const BitmapTexture& contentTexture, const FilterOperations&) { } 77 #endif 73 78 74 79 protected: -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
r106659 r107814 20 20 #include "config.h" 21 21 #include "TextureMapperImageBuffer.h" 22 23 #include "FilterEffectRenderer.h" 22 24 23 25 #if USE(TEXTURE_MAPPER) … … 102 104 } 103 105 106 #if ENABLE(CSS_FILTERS) 107 void BitmapTextureImageBuffer::applyFilters(const BitmapTexture& contentTexture, const FilterOperations& filters) 108 { 109 RefPtr<FilterEffectRenderer> renderer = FilterEffectRenderer::create(0); 110 renderer->setSourceImageRect(FloatRect(FloatPoint::zero(), contentTexture.size())); 111 112 // The document parameter is only needed for CSS shaders. 113 renderer->build(0 /*document */, filters); 114 renderer->prepare(); 115 GraphicsContext* context = renderer->inputContext(); 116 context->drawImageBuffer(static_cast<const BitmapTextureImageBuffer&>(contentTexture).m_image.get(), ColorSpaceDeviceRGB, IntPoint::zero()); 117 renderer->apply(); 118 m_image->context()->drawImageBuffer(renderer->output(), ColorSpaceDeviceRGB, renderer->outputRect()); 104 119 } 105 120 #endif 121 122 } 123 #endif -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h
r106659 r107814 44 44 virtual void updateContents(Image*, const IntRect&, const IntRect&, PixelFormat); 45 45 void updateContents(const void* data, const IntRect& targetRect); 46 #if ENABLE(CSS_FILTERS) 47 void applyFilters(const BitmapTexture&, const FilterOperations&); 48 #endif 49 46 50 private: 47 51 BitmapTextureImageBuffer() { } -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
r107787 r107814 211 211 bool TextureMapperLayer::shouldPaintToIntermediateSurface() const 212 212 { 213 #if ENABLE(CSS_FILTERS) 214 if (m_state.filters.size()) 215 return true; 216 #endif 213 217 bool hasOpacity = m_opacity < 0.99; 214 218 bool hasChildren = !m_children.isEmpty(); … … 261 265 } 262 266 267 #if ENABLE(CSS_FILTERS) 268 static PassRefPtr<BitmapTexture> applyFilters(const FilterOperations& filters, TextureMapper* textureMapper, BitmapTexture* source, IntRect& targetRect) 269 { 270 if (!filters.size()) 271 return source; 272 273 RefPtr<BitmapTexture> filterSurface(source); 274 int leftOutset, topOutset, bottomOutset, rightOutset; 275 if (filters.hasOutsets()) { 276 filters.getOutsets(topOutset, rightOutset, bottomOutset, leftOutset); 277 IntRect unfilteredTargetRect(targetRect); 278 targetRect.move(std::max(0, -leftOutset), std::max(0, -topOutset)); 279 targetRect.expand(leftOutset + rightOutset, topOutset + bottomOutset); 280 targetRect.unite(unfilteredTargetRect); 281 filterSurface = textureMapper->acquireTextureFromPool(targetRect.size()); 282 } 283 284 filterSurface->applyFilters(*source, filters); 285 return filterSurface; 286 } 287 #endif 288 263 289 void TextureMapperLayer::paintRecursive(const TextureMapperPaintOptions& options) 264 290 { … … 297 323 if (m_state.replicaLayer) 298 324 maskTexture = 0; 325 326 #if ENABLE(CSS_FILTERS) 327 surface = applyFilters(m_state.filters, options.textureMapper, surface.get(), surfaceRect); 328 #endif 299 329 300 330 options.textureMapper->bindSurface(options.surface.get()); … … 389 419 m_state.childrenTransform = graphicsLayer->childrenTransform(); 390 420 m_state.opacity = graphicsLayer->opacity(); 421 #if ENABLE(CSS_FILTERS) 422 m_state.filters = graphicsLayer->filters(); 423 #endif 424 391 425 m_state.needsDisplay = m_state.needsDisplay || graphicsLayer->needsDisplay(); 392 426 if (!m_state.needsDisplay) -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
r107787 r107814 21 21 #define TextureMapperLayer_h 22 22 23 #include "FilterOperations.h" 23 24 #include "FloatRect.h" 24 25 #include "GraphicsContext.h" … … 89 90 90 91 ReplicaLayerChange = (1L << 20), 91 AnimationChange = (1L << 21) 92 AnimationChange = (1L << 21), 93 FilterChange = (1L << 22) 92 94 }; 93 95 … … 183 185 TextureMapperLayer* maskLayer; 184 186 TextureMapperLayer* replicaLayer; 187 #if ENABLE(CSS_FILTERS) 188 FilterOperations filters; 189 #endif 190 185 191 bool preserves3D : 1; 186 192 bool masksToBounds : 1;
Note: See TracChangeset
for help on using the changeset viewer.