Changeset 91228 in webkit


Ignore:
Timestamp:
Jul 18, 2011 5:54:38 PM (13 years ago)
Author:
mdelaney@apple.com
Message:

Remove drawsUsingCopy now that all ports handle the copying
https://bugs.webkit.org/show_bug.cgi?id=64768

Introduced in https://bugs.webkit.org/show_bug.cgi?id=43507, ImageBuffer::drawsUsingCopy
was used to know whether or not an ImageBuffer should be explicitly copied before being
painted into a context (as was used in HTMLCanvasElement::paint). All platforms now
handle the logic of copying or not in their ImageBuffer::draw() implementations, so
drawsUsingCopy() is no longer needed. This patch removes it.

Reviewed by Dan Bernstein.

No new tests; does not affect behavior.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::paint):

  • platform/graphics/ImageBuffer.h:

(WebCore::ImageBuffer::isAccelerated):

  • platform/graphics/cairo/ImageBufferCairo.cpp:
  • platform/graphics/cg/ImageBufferCG.cpp:
  • platform/graphics/qt/ImageBufferQt.cpp:
  • platform/graphics/skia/ImageBufferSkia.cpp:
  • platform/graphics/wince/ImageBufferWinCE.cpp:
  • platform/graphics/wx/ImageBufferWx.cpp:
Location:
trunk/Source/WebCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91227 r91228  
     12011-07-18  Matthew Delaney  <mdelaney@apple.com>
     2
     3        Remove drawsUsingCopy now that all ports handle the copying
     4        https://bugs.webkit.org/show_bug.cgi?id=64768
     5       
     6        Introduced in https://bugs.webkit.org/show_bug.cgi?id=43507, ImageBuffer::drawsUsingCopy
     7        was used to know whether or not an ImageBuffer should be explicitly copied before being
     8        painted into a context (as was used in HTMLCanvasElement::paint). All platforms now
     9        handle the logic of copying or not in their ImageBuffer::draw() implementations, so
     10        drawsUsingCopy() is no longer needed. This patch removes it.
     11
     12        Reviewed by Dan Bernstein.
     13
     14        No new tests; does not affect behavior.
     15
     16        * html/HTMLCanvasElement.cpp:
     17        (WebCore::HTMLCanvasElement::paint):
     18        * platform/graphics/ImageBuffer.h:
     19        (WebCore::ImageBuffer::isAccelerated):
     20        * platform/graphics/cairo/ImageBufferCairo.cpp:
     21        * platform/graphics/cg/ImageBufferCG.cpp:
     22        * platform/graphics/qt/ImageBufferQt.cpp:
     23        * platform/graphics/skia/ImageBufferSkia.cpp:
     24        * platform/graphics/wince/ImageBufferWinCE.cpp:
     25        * platform/graphics/wx/ImageBufferWx.cpp:
     26
    1272011-07-18  Vsevolod Vlasov  <vsevik@chromium.org>
    228
  • trunk/Source/WebCore/html/HTMLCanvasElement.cpp

    r87473 r91228  
    282282            if (m_presentedImage)
    283283                context->drawImage(m_presentedImage.get(), ColorSpaceDeviceRGB, r, CompositeSourceOver, useLowQualityScale);
    284             else if (imageBuffer->drawsUsingCopy())
    285                 context->drawImage(copiedImage(), ColorSpaceDeviceRGB, r, CompositeSourceOver, useLowQualityScale);
    286284            else
    287285                context->drawImageBuffer(imageBuffer, ColorSpaceDeviceRGB, r, CompositeSourceOver, useLowQualityScale);
  • trunk/Source/WebCore/platform/graphics/ImageBuffer.h

    r90676 r91228  
    8484
    8585        bool isAccelerated() const { return m_accelerateRendering; }
    86         bool drawsUsingCopy() const; // If the image buffer has to render using a copied image, it will return true.
    8786        PassRefPtr<Image> copyImage() const; // Return a new image that is a copy of the buffer.
    8887
  • trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp

    r86174 r91228  
    8787}
    8888
    89 bool ImageBuffer::drawsUsingCopy() const
    90 {
    91     return false;
    92 }
    93 
    9489PassRefPtr<Image> ImageBuffer::copyImage() const
    9590{
  • trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp

    r86542 r91228  
    178178}
    179179
    180 bool ImageBuffer::drawsUsingCopy() const
    181 {
    182     return false;
    183 }
    184 
    185180PassRefPtr<Image> ImageBuffer::copyImage() const
    186181{
  • trunk/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp

    r90020 r91228  
    122122}
    123123
    124 bool ImageBuffer::drawsUsingCopy() const
    125 {
    126     return false;
    127 }
    128 
    129124PassRefPtr<Image> ImageBuffer::copyImage() const
    130125{
  • trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp

    r90872 r91228  
    9898}
    9999
    100 bool ImageBuffer::drawsUsingCopy() const
    101 {
    102     return false;
    103 }
    104 
    105100PassRefPtr<Image> ImageBuffer::copyImage() const
    106101{
  • trunk/Source/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp

    r85433 r91228  
    9797{
    9898    return m_context.get();
    99 }
    100 
    101 bool ImageBuffer::drawsUsingCopy() const
    102 {
    103     return true;
    10499}
    105100
  • trunk/Source/WebCore/platform/graphics/wx/ImageBufferWx.cpp

    r76371 r91228  
    8989}
    9090
    91 bool ImageBuffer::drawsUsingCopy() const
    92 {
    93     return true;
    94 }
    95 
    9691PassRefPtr<Image> ImageBuffer::copyImage() const
    9792{
Note: See TracChangeset for help on using the changeset viewer.