Changeset 162442 in webkit
- Timestamp:
- Jan 21, 2014 8:36:50 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r162438 r162442 1 2014-01-21 Mihai Tica <mitica@adobe.com> 2 3 If you set a tiled cross-faded-image or a tiled gradient as 4 a background layer, -webkit-background-blend-mode doesn't work. 5 https://bugs.webkit.org/show_bug.cgi?id=126888 6 7 Reviewed by Dirk Schulze. 8 9 * css3/compositing/background-blend-mode-tiled-layers-expected.html: Added. 10 * css3/compositing/background-blend-mode-tiled-layers.html: Added. 11 * platform/efl/TestExpectations: Skip test for efl, blendModes are not implemented. 12 * platform/mac/TestExpectations: Mark added test as ImageOnlyFailure due to slight differences between the actual result and the blending formula. 13 1 14 2014-01-21 Peter Molnar <pmolnar.u-szeged@partner.samsung.com> 2 15 -
trunk/LayoutTests/platform/efl/TestExpectations
r162381 r162442 500 500 webkit.org/b/99200 css3/compositing/blend-mode-should-not-have-compositing-layer.html [ Skip ] 501 501 webkit.org/b/118894 css3/compositing/background-blend-mode-data-uri-svg-image.html [ Skip ] 502 webkit.org/b/126888 css3/compositing/background-blend-mode-tiled-layers.html [ Skip ] 502 503 503 504 # No concept of secure text input -
trunk/LayoutTests/platform/mac/TestExpectations
r162425 r162442 618 618 # Blend mode result is slightly different than the applied formula. 619 619 css3/compositing/background-blend-mode-data-uri-svg-image.html [ ImageOnlyFailure Pass ] 620 css3/compositing/background-blend-mode-tiled-layers.html [ ImageOnlyFailure Pass ] 621 css3/compositing/background-blend-mode-crossfade-image.html [ ImageOnlyFailure Pass ] 620 622 621 623 # https://bugs.webkit.org/show_bug.cgi?id=110871 … … 661 663 css3/filters/composited-during-transition-layertree.html 662 664 webkit.org/b/95622 css3/filters/composited-during-animation-layertree.html [ Pass Failure ] 663 664 # Blending result is slightly different than the formula.665 webkit.org/b/126887 css3/compositing/background-blend-mode-crossfade-image.html [ ImageOnlyFailure Pass ]666 665 667 666 # --- Custom Filters --- -
trunk/Source/WebCore/ChangeLog
r162440 r162442 1 2014-01-21 Mihai Tica <mitica@adobe.com> 2 3 If you set a tiled cross-faded-image or a tiled gradient as 4 a background layer, -webkit-background-blend-mode doesn't work. 5 The problem consists in the blendMode parameter not being set 6 for these specific drawing paths. 7 8 https://bugs.webkit.org/show_bug.cgi?id=126888 9 Reviewed by Dirk Schulze. 10 11 Test: css3/compositing/background-blend-mode-tiled-layers.html 12 13 * platform/graphics/CrossfadeGeneratedImage.cpp: 14 (WebCore::CrossfadeGeneratedImage::drawPattern): Add the blendMode parameter and pass it to ImageBuffer::drawPattern. 15 * platform/graphics/GradientImage.cpp: 16 (WebCore::GradientImage::drawPattern): Add the blendMode parameter and pass it to ImageBuffer::drawPattern. 17 * platform/graphics/ImageBuffer.h: Add a BlendMode parameter to the drawPattern method. 18 * platform/graphics/cairo/ImageBufferCairo.cpp: 19 (WebCore::ImageBuffer::drawPattern): Add the default BlendMode parameter to the method declaration. 20 * platform/graphics/cg/ImageBufferCG.cpp: 21 (WebCore::ImageBuffer::drawPattern): Add and use the blendMode parameter for all the code paths. 22 * platform/graphics/wince/ImageBufferWinCE.cpp: 23 (WebCore::BufferedImage::drawPattern): Add the default BlendMode parameter to the method declaration. 24 1 25 2014-01-21 Gurpreet Kaur <k.gurpreet@samsung.com> 2 26 -
trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
r162348 r162442 97 97 } 98 98 99 void CrossfadeGeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode )99 void CrossfadeGeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode blendMode) 100 100 { 101 101 std::unique_ptr<ImageBuffer> imageBuffer = ImageBuffer::create(size(), 1, ColorSpaceDeviceRGB, context->isAcceleratedContext() ? Accelerated : Unaccelerated); … … 108 108 109 109 // Tile the image buffer into the context. 110 imageBuffer->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, compositeOp, dstRect );110 imageBuffer->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, compositeOp, dstRect, blendMode); 111 111 } 112 112 -
trunk/Source/WebCore/platform/graphics/GradientImage.cpp
r157909 r162442 46 46 47 47 void GradientImage::drawPattern(GraphicsContext* destContext, const FloatRect& srcRect, const AffineTransform& patternTransform, 48 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& destRect, BlendMode )48 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& destRect, BlendMode blendMode) 49 49 { 50 50 // Allow the generator to provide visually-equivalent tiling parameters for better performance. … … 82 82 83 83 // Tile the image buffer into the context. 84 m_cachedImageBuffer->drawPattern(destContext, adjustedSrcRect, adjustedPatternCTM, phase, styleColorSpace, compositeOp, destRect );84 m_cachedImageBuffer->drawPattern(destContext, adjustedSrcRect, adjustedPatternCTM, phase, styleColorSpace, compositeOp, destRect, blendMode); 85 85 } 86 86 -
trunk/Source/WebCore/platform/graphics/ImageBuffer.h
r160121 r162442 144 144 145 145 void draw(GraphicsContext*, ColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false); 146 void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect );146 void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal); 147 147 148 148 inline void genericConvertToLuminanceMask(); -
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
r154936 r162442 154 154 155 155 void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform, 156 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)156 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect, BlendMode) 157 157 { 158 158 RefPtr<Image> image = copyImage(DontCopyBackingStore); -
trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
r161779 r162442 308 308 } 309 309 310 void ImageBuffer::drawPattern(GraphicsContext* destContext, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect )310 void ImageBuffer::drawPattern(GraphicsContext* destContext, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect, BlendMode blendMode) 311 311 { 312 312 FloatRect adjustedSrcRect = srcRect; … … 316 316 if (destContext == m_context || destContext->isAcceleratedContext()) { 317 317 RefPtr<Image> copy = copyImage(CopyBackingStore); // Drawing into our own buffer, need to deep copy. 318 copy->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, styleColorSpace, op, destRect );318 copy->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, styleColorSpace, op, destRect, blendMode); 319 319 } else { 320 320 RefPtr<Image> imageForRendering = copyImage(DontCopyBackingStore); 321 imageForRendering->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, styleColorSpace, op, destRect );321 imageForRendering->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, styleColorSpace, op, destRect, blendMode); 322 322 } 323 323 } else { 324 324 RefPtr<Image> copy = copyImage(CopyBackingStore); 325 copy->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, styleColorSpace, op, destRect );325 copy->drawPattern(destContext, adjustedSrcRect, patternTransform, phase, styleColorSpace, op, destRect, blendMode); 326 326 } 327 327 } -
trunk/Source/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp
r157909 r162442 57 57 58 58 void BufferedImage::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRectIn, const AffineTransform& patternTransform, 59 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)59 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect, BlendMode) 60 60 { 61 61 m_data->m_bitmap->drawPattern(ctxt, tileRectIn, patternTransform, phase, styleColorSpace, op, destRect, size());
Note: See TracChangeset
for help on using the changeset viewer.