Changeset 106804 in webkit


Ignore:
Timestamp:
Feb 6, 2012 6:18:14 AM (12 years ago)
Author:
noam.rosenthal@nokia.com
Message:

[Qt] Implement ImageBuffer::copyImage(ImageBuffer::DontCopyBackingStore)
https://bugs.webkit.org/show_bug.cgi?id=77689

Reviewed by Kenneth Rohde Christiansen.

Use StillImageQt::createForRendering when using DontCopyBackingStore.
Enable DontCopyBackingStore in TextureMapperNode.
This removes deep copies resulting from the use of ImageBuffer.

Instrumentation shows that deep image copies resulted from ImageBuffer are eliminated.

  • platform/graphics/qt/ImageBufferQt.cpp:

(WebCore::ImageBuffer::copyImage):

  • platform/graphics/texmap/TextureMapperNode.cpp:

(WebCore::TextureMapperNode::renderContent):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106803 r106804  
     12012-02-06  No'am Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        [Qt] Implement ImageBuffer::copyImage(ImageBuffer::DontCopyBackingStore)
     4        https://bugs.webkit.org/show_bug.cgi?id=77689
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Use StillImageQt::createForRendering when using DontCopyBackingStore.
     9        Enable DontCopyBackingStore in TextureMapperNode.
     10        This removes deep copies resulting from the use of ImageBuffer.
     11
     12        Instrumentation shows that deep image copies resulted from ImageBuffer are eliminated.
     13
     14        * platform/graphics/qt/ImageBufferQt.cpp:
     15        (WebCore::ImageBuffer::copyImage):
     16        * platform/graphics/texmap/TextureMapperNode.cpp:
     17        (WebCore::TextureMapperNode::renderContent):
     18
    1192012-02-06  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
    220
  • trunk/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp

    r106500 r106804  
    124124PassRefPtr<Image> ImageBuffer::copyImage(BackingStoreCopy copyBehavior) const
    125125{
    126     ASSERT(copyBehavior == CopyBackingStore);
    127     return StillImage::create(m_data.m_pixmap);
     126    if (copyBehavior == CopyBackingStore)
     127        return StillImage::create(m_data.m_pixmap);
     128
     129    return StillImage::createForRendering(&m_data.m_pixmap);
    128130}
    129131
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp

    r106659 r106804  
    187187        context->drawImage(m_currentContent.image.get(), ColorSpaceDeviceRGB, m_state.contentsRect);
    188188
    189     // FIXME: Implement ImageBuffer::DontCopyBackingStore in Qt/GTK ports, and then change this.
    190     // See https://bugs.webkit.org/show_bug.cgi?id=77689
    191     RefPtr<Image> image = imageBuffer->copyImage(CopyBackingStore);
     189    RefPtr<Image> image;
     190
     191#if PLATFORM(QT)
     192    image = imageBuffer->copyImage(DontCopyBackingStore);
     193#else
     194    // FIXME: support DontCopyBackingStore in non-Qt ports that use TextureMapper.
     195    image = imageBuffer->copyImage(CopyBackingStore);
     196#endif
    192197
    193198    // Divide the image to tiles.
Note: See TracChangeset for help on using the changeset viewer.