Changeset 106095 in webkit
- Timestamp:
- Jan 26, 2012 11:23:22 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106091 r106095 1 2012-01-26 Matthew Delaney <mdelaney@apple.com> 2 3 ImageBuffer::draw should deep copy if drawing to an accelerated context 4 https://bugs.webkit.org/show_bug.cgi?id=77185 5 6 Reviewed by Simon Fraser. 7 8 No new tests since any test for this issue would be flaky at best. 9 10 * platform/graphics/cg/ImageBufferCG.cpp: Deep copy when drawing ourself into 11 an accelerated context for both draw and drawPattern. 12 (WebCore::ImageBuffer::draw): 13 (WebCore::ImageBuffer::drawPattern): 14 1 15 2012-01-26 Kevin Ollivier <kevino@theolliviers.com> 2 16 -
trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
r98171 r106095 242 242 243 243 RetainPtr<CGImageRef> image; 244 if (destContext == m_context )244 if (destContext == m_context || destContext->isAcceleratedContext()) 245 245 image.adoptCF(copyNativeImage(CopyBackingStore)); // Drawing into our own buffer, need to deep copy. 246 246 else … … 250 250 } 251 251 252 void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)252 void ImageBuffer::drawPattern(GraphicsContext* destContext, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect) 253 253 { 254 254 if (!m_context->isAcceleratedContext()) { 255 if ( context == m_context) {255 if (destContext == m_context || destContext->isAcceleratedContext()) { 256 256 RefPtr<Image> copy = copyImage(CopyBackingStore); // Drawing into our own buffer, need to deep copy. 257 copy->drawPattern( context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);257 copy->drawPattern(destContext, srcRect, patternTransform, phase, styleColorSpace, op, destRect); 258 258 } else { 259 259 RefPtr<Image> imageForRendering = copyImage(DontCopyBackingStore); 260 imageForRendering->drawPattern( context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);260 imageForRendering->drawPattern(destContext, srcRect, patternTransform, phase, styleColorSpace, op, destRect); 261 261 } 262 262 } else { 263 263 RefPtr<Image> copy = copyImage(CopyBackingStore); 264 copy->drawPattern( context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);264 copy->drawPattern(destContext, srcRect, patternTransform, phase, styleColorSpace, op, destRect); 265 265 } 266 266 }
Note: See TracChangeset
for help on using the changeset viewer.