Changeset 116365 in webkit
- Timestamp:
- May 7, 2012 4:07:54 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116364 r116365 1 2012-05-06 Martin Robinson <mrobinson@igalia.com> 2 3 [Cairo] Implement ImageBuffer::copyImage for BackingStoreCopy == DontCopyBackingStore 4 https://bugs.webkit.org/show_bug.cgi?id=85728 5 6 Reviewed by Alejandro G. Castro. 7 8 No new tests. This should not change functionality, only increase performance. 9 10 * platform/graphics/cairo/ImageBufferCairo.cpp: 11 (WebCore::ImageBuffer::copyImage): Add an implementation that knows how to avoid copying the backing store. 12 (WebCore::ImageBuffer::draw): Use the copyImage constructor now that it knows how to 13 avoid copying the backing store. 14 (WebCore::ImageBuffer::drawPattern): Ditto. 15 * platform/graphics/texmap/TextureMapperLayer.cpp: 16 (WebCore::TextureMapperLayer::updateBackingStore): Use DontCopyBackingStore for Cairo 17 as well. 18 1 19 2012-05-07 Noel Gordon <noel.gordon@gmail.com> 2 20 -
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
r114992 r116365 85 85 PassRefPtr<Image> ImageBuffer::copyImage(BackingStoreCopy copyBehavior) const 86 86 { 87 ASSERT(copyBehavior == CopyBackingStore); 87 if (copyBehavior == CopyBackingStore) 88 return BitmapImage::create(copyCairoImageSurface(m_data.m_surface).leakRef()); 89 88 90 // BitmapImage will release the passed in surface on destruction 89 return BitmapImage::create(c opyCairoImageSurface(m_data.m_surface).leakRef());91 return BitmapImage::create(cairo_surface_reference(m_data.m_surface)); 90 92 } 91 93 … … 98 100 CompositeOperator op , bool useLowQualityScale) 99 101 { 100 // BitmapImage will release the passed in surface on destruction 101 RefPtr<Image> image = BitmapImage::create(cairo_surface_reference(m_data.m_surface)); 102 RefPtr<Image> image = copyImage(DontCopyBackingStore); 102 103 context->drawImage(image.get(), styleColorSpace, destRect, srcRect, op, DoNotRespectImageOrientation, useLowQualityScale); 103 104 } … … 106 107 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect) 107 108 { 108 // BitmapImage will release the passed in surface on destruction 109 RefPtr<Image> image = BitmapImage::create(cairo_surface_reference(m_data.m_surface)); 109 RefPtr<Image> image = copyImage(DontCopyBackingStore); 110 110 image->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect); 111 111 } -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
r116247 r116365 123 123 layer->paintGraphicsLayerContents(*context, dirtyRect); 124 124 125 RefPtr<Image> image; 126 127 #if PLATFORM(QT) 128 image = imageBuffer->copyImage(DontCopyBackingStore); 129 #else 130 // FIXME: support DontCopyBackingStore in non-Qt ports that use TextureMapper. 131 image = imageBuffer->copyImage(CopyBackingStore); 132 #endif 133 125 RefPtr<Image> image = imageBuffer->copyImage(DontCopyBackingStore); 134 126 static_cast<TextureMapperTiledBackingStore*>(m_backingStore.get())->updateContents(textureMapper, image.get(), m_size, dirtyRect); 135 127 m_state.needsDisplay = false;
Note: See TracChangeset
for help on using the changeset viewer.