Changeset 76359 in webkit


Ignore:
Timestamp:
Jan 21, 2011 10:31:45 AM (13 years ago)
Author:
Adam Roben
Message:

Replace some "sync compositing state" terminology with "flush pending GraphicsLayer changes"

This seems to be the direction in which our code is moving. I chose "GraphicsLayer" as
opposed to just "layer" because there are cases where we flush changes to CACFLayers that
don't have a corresponding GraphicsLayer.

Fixes <http://webkit.org/b/52894> "Sync compositing state" terminology in
WKCACFLayerRenderer and friends is confusing

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/graphics/win/WKCACFLayerRenderer.cpp:

(WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
(WebCore::WKCACFLayerRenderer::render):
Updated for renames.

(WebCore::WKCACFLayerRenderer::flushPendingGraphicsLayerChangesSoon): Renamed from
syncCompositingStateSoon, and updated for other renames.

  • platform/graphics/win/WKCACFLayerRenderer.h: Renamed m_syncLayerChanges to
  • m_shouldFlushPendingGraphicsLayerChanges.

(WebCore::WKCACFLayerRendererClient::flushPendingGraphicsLayerChanges): Renamed from
syncCompositingState.

Source/WebKit/win:

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::scheduleCompositingLayerSync): Updated for WebView changes.

  • WebView.cpp:

(WebView::paint): Updated for rename.
(WebView::flushPendingGraphicsLayerChangesSoon): Renamed from scheduleCompositingLayerSync.
(WebView::notifySyncRequired): Updated for rename.
(WebView::flushPendingGraphicsLayerChanges): Renamed from syncCompositingState.

  • WebView.h: Did the renames.
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r76358 r76359  
     12011-01-21  Adam Roben  <aroben@apple.com>
     2
     3        Replace some "sync compositing state" terminology with "flush pending GraphicsLayer changes"
     4
     5        This seems to be the direction in which our code is moving. I chose "GraphicsLayer" as
     6        opposed to just "layer" because there are cases where we flush changes to CACFLayers that
     7        don't have a corresponding GraphicsLayer.
     8
     9        Fixes <http://webkit.org/b/52894> "Sync compositing state" terminology in
     10        WKCACFLayerRenderer and friends is confusing
     11
     12        Reviewed by Simon Fraser.
     13
     14        * platform/graphics/win/WKCACFLayerRenderer.cpp:
     15        (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
     16        (WebCore::WKCACFLayerRenderer::render):
     17        Updated for renames.
     18
     19        (WebCore::WKCACFLayerRenderer::flushPendingGraphicsLayerChangesSoon): Renamed from
     20        syncCompositingStateSoon, and updated for other renames.
     21
     22        * platform/graphics/win/WKCACFLayerRenderer.h: Renamed m_syncLayerChanges to
     23        * m_shouldFlushPendingGraphicsLayerChanges.
     24        (WebCore::WKCACFLayerRendererClient::flushPendingGraphicsLayerChanges): Renamed from
     25        syncCompositingState.
     26
    1272011-01-21  Adam Roben  <aroben@apple.com>
    228
  • trunk/Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp

    r76258 r76359  
    188188    , m_renderTimer(this, &WKCACFLayerRenderer::renderTimerFired)
    189189    , m_mustResetLostDeviceBeforeRendering(false)
    190     , m_syncLayerChanges(false)
     190    , m_shouldFlushPendingGraphicsLayerChanges(false)
    191191{
    192192    // Point the CACFContext to this
     
    431431    }
    432432
    433     // Sync the layer if needed
    434     if (m_syncLayerChanges) {
    435         m_client->syncCompositingState();
    436         m_syncLayerChanges = false;
     433    if (m_shouldFlushPendingGraphicsLayerChanges) {
     434        m_client->flushPendingGraphicsLayerChanges();
     435        m_shouldFlushPendingGraphicsLayerChanges = false;
    437436    }
    438437
     
    525524}
    526525
    527 void WKCACFLayerRenderer::syncCompositingStateSoon()
    528 {
    529     m_syncLayerChanges = true;
     526void WKCACFLayerRenderer::flushPendingGraphicsLayerChangesSoon()
     527{
     528    m_shouldFlushPendingGraphicsLayerChanges = true;
    530529    renderSoon();
    531530}
  • trunk/Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.h

    r76256 r76359  
    5454    virtual ~WKCACFLayerRendererClient() { }
    5555    virtual bool shouldRender() const = 0;
    56     virtual void syncCompositingState() { }
     56    virtual void flushPendingGraphicsLayerChanges() { }
    5757};
    5858
     
    7676    void paint();
    7777    void resize();
    78     void syncCompositingStateSoon();
     78    void flushPendingGraphicsLayerChangesSoon();
    7979
    8080protected:
     
    111111    Timer<WKCACFLayerRenderer> m_renderTimer;
    112112    bool m_mustResetLostDeviceBeforeRendering;
    113     bool m_syncLayerChanges;
     113    bool m_shouldFlushPendingGraphicsLayerChanges;
    114114    HashSet<RefPtr<PlatformCALayer> > m_pendingAnimatedLayers;
    115115
  • trunk/Source/WebKit/win/ChangeLog

    r76291 r76359  
     12011-01-21  Adam Roben  <aroben@apple.com>
     2
     3        Replace some "sync compositing state" terminology with "flush pending GraphicsLayer changes"
     4
     5        This seems to be the direction in which our code is moving. I chose "GraphicsLayer" as
     6        opposed to just "layer" because there are cases where we flush changes to CACFLayers that
     7        don't have a corresponding GraphicsLayer.
     8
     9        Fixes <http://webkit.org/b/52894> "Sync compositing state" terminology in
     10        WKCACFLayerRenderer and friends is confusing
     11
     12        Reviewed by Simon Fraser.
     13
     14        * WebCoreSupport/WebChromeClient.cpp:
     15        (WebChromeClient::scheduleCompositingLayerSync): Updated for WebView changes.
     16
     17        * WebView.cpp:
     18        (WebView::paint): Updated for rename.
     19        (WebView::flushPendingGraphicsLayerChangesSoon): Renamed from scheduleCompositingLayerSync.
     20        (WebView::notifySyncRequired): Updated for rename.
     21        (WebView::flushPendingGraphicsLayerChanges): Renamed from syncCompositingState.
     22
     23        * WebView.h: Did the renames.
     24
    1252011-01-20  Sam Weinig  <sam@webkit.org>
    226
  • trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp

    r75987 r76359  
    827827void WebChromeClient::scheduleCompositingLayerSync()
    828828{
    829     m_webView->scheduleCompositingLayerSync();
     829    m_webView->flushPendingGraphicsLayerChangesSoon();
    830830}
    831831
  • trunk/Source/WebKit/win/WebView.cpp

    r76256 r76359  
    991991#if USE(ACCELERATED_COMPOSITING)
    992992    if (isAcceleratedCompositing()) {
    993         syncCompositingState();
    994         // Syncing might have taken us out of compositing mode.
     993        flushPendingGraphicsLayerChanges();
     994        // Flushing might have taken us out of compositing mode.
    995995        if (isAcceleratedCompositing()) {
    996996            // FIXME: We need to paint into dc (if provided). <http://webkit.org/b/52578>
     
    62736273}
    62746274
    6275 void WebView::scheduleCompositingLayerSync()
     6275void WebView::flushPendingGraphicsLayerChangesSoon()
    62766276{
    62776277    if (!m_layerRenderer)
    62786278        return;
    6279     m_layerRenderer->syncCompositingStateSoon();
     6279    m_layerRenderer->flushPendingGraphicsLayerChangesSoon();
    62806280}
    62816281
     
    64816481void WebView::notifySyncRequired(const GraphicsLayer*)
    64826482{
    6483     scheduleCompositingLayerSync();
     6483    flushPendingGraphicsLayerChangesSoon();
    64846484}
    64856485
     
    65186518}
    65196519
    6520 void WebView::syncCompositingState()
     6520void WebView::flushPendingGraphicsLayerChanges()
    65216521{
    65226522    Frame* coreFrame = core(m_mainFrame);
  • trunk/Source/WebKit/win/WebView.h

    r76256 r76359  
    906906
    907907#if USE(ACCELERATED_COMPOSITING)
    908     void scheduleCompositingLayerSync();
     908    void flushPendingGraphicsLayerChangesSoon();
    909909    void setRootChildLayer(WebCore::GraphicsLayer*);
    910910#endif
     
    950950    // WKCACFLayerRendererClient
    951951    virtual bool shouldRender() const;
    952     virtual void syncCompositingState();
     952    virtual void flushPendingGraphicsLayerChanges();
    953953#endif
    954954
Note: See TracChangeset for help on using the changeset viewer.