Changeset 64360 in webkit


Ignore:
Timestamp:
Jul 30, 2010 10:37:26 AM (14 years ago)
Author:
Adam Roben
Message:

Remove knowledge of WKCACFContextFlusher from WKCACFLayer

Fixes <http://webkit.org/b/43248> WKCACFLayer shouldn't know about
WKCACFContextFlusher

Reviewed by Sam Weinig.

  • platform/graphics/win/WKCACFLayer.cpp:

(WebCore::WKCACFLayer::setNeedsCommit): Don't bother calling to
WKCACFContextFlusher. Our root layer will do this for us.

  • platform/graphics/win/WKCACFLayerRenderer.cpp:

(WebCore::WKCACFRootLayer::setNeedsRender): Changed to call the new
layerTreeDidChange function.
(WebCore::WKCACFLayerRenderer::layerTreeDidChange): Added. Tells
WKCACFContextFlusher that the context has changed, and schedules a
render.

  • platform/graphics/win/WKCACFLayerRenderer.h: Added

layerTreeDidChange.

Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r64358 r64360  
     12010-07-30  Adam Roben  <aroben@apple.com>
     2
     3        Remove knowledge of WKCACFContextFlusher from WKCACFLayer
     4
     5        Fixes <http://webkit.org/b/43248> WKCACFLayer shouldn't know about
     6        WKCACFContextFlusher
     7
     8        Reviewed by Sam Weinig.
     9
     10        * platform/graphics/win/WKCACFLayer.cpp:
     11        (WebCore::WKCACFLayer::setNeedsCommit): Don't bother calling to
     12        WKCACFContextFlusher. Our root layer will do this for us.
     13
     14        * platform/graphics/win/WKCACFLayerRenderer.cpp:
     15        (WebCore::WKCACFRootLayer::setNeedsRender): Changed to call the new
     16        layerTreeDidChange function.
     17        (WebCore::WKCACFLayerRenderer::layerTreeDidChange): Added. Tells
     18        WKCACFContextFlusher that the context has changed, and schedules a
     19        render.
     20
     21        * platform/graphics/win/WKCACFLayerRenderer.h: Added
     22        layerTreeDidChange.
     23
    1242010-07-29  Jeremy Orlow  <jorlow@chromium.org>
    225
  • trunk/WebCore/platform/graphics/win/WKCACFLayer.cpp

    r64295 r64360  
    3030#include "WKCACFLayer.h"
    3131
    32 #include "WKCACFContextFlusher.h"
    3332#include "WKCACFLayerRenderer.h"
    3433#include <wtf/text/CString.h>
     
    177176    WKCACFLayer* root = rootLayer();
    178177
    179     CACFContextRef context = CACFLayerGetContext(root->layer());
    180 
    181     // The context might now be set yet. This happens if a property gets set
    182     // before placing the layer in the tree. In this case we don't need to
    183     // worry about remembering the context because we will when the layer is
    184     // added to the tree.
    185     if (context)
    186         WKCACFContextFlusher::shared().addContext(context);
    187 
    188178    // Call setNeedsRender on the root layer, which will cause a render to
    189179    // happen in WKCACFLayerRenderer
  • trunk/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp

    r59982 r64360  
    9999    }
    100100
    101     virtual void setNeedsRender() { m_renderer->renderSoon(); }
     101    virtual void setNeedsRender() { m_renderer->layerTreeDidChange(); }
    102102
    103103    // Overload this to avoid calling setNeedsDisplay on the layer, which would override the contents
     
    334334}
    335335   
     336void WKCACFLayerRenderer::layerTreeDidChange()
     337{
     338    WKCACFContextFlusher::shared().addContext(m_context.get());
     339    renderSoon();
     340}
     341
    336342void WKCACFLayerRenderer::setNeedsDisplay()
    337343{
  • trunk/WebCore/platform/graphics/win/WKCACFLayerRenderer.h

    r59910 r64360  
    7171    void setRootContentsAndDisplay(CGImageRef);
    7272    void setRootChildLayer(WKCACFLayer* layer);
     73    void layerTreeDidChange();
    7374    void setNeedsDisplay();
    7475    void setHostWindow(HWND window) { m_hostWindow = window; }
Note: See TracChangeset for help on using the changeset viewer.