⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 176733 in webkit


Ignore:
Timestamp:
Dec 3, 2014, 11:59:27 AM (12 years ago)
Author:
andersca@apple.com
Message:

Use an @autoreleasepool instead of NSAutoreleasePool.

Rubber-stamped by Tim Horton.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r176728 r176733  
     12014-12-03  Anders Carlsson  <andersca@apple.com>
     2
     3        Use an @autoreleasepool instead of NSAutoreleasePool.
     4
     5        Rubber-stamped by Tim Horton.
     6
     7        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     8        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
     9
    1102014-12-03  Dan Bernstein  <mitz@apple.com>
    211
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r175494 r176733  
    296296    ASSERT(!m_layerTreeStateIsFrozen);
    297297
    298     // This gets called outside of the normal event loop so wrap in an autorelease pool
    299     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    300 
    301     m_webPage.layoutIfNeeded();
    302 
    303     updateIntrinsicContentSizeIfNeeded();
    304 
    305     if (m_pendingRootLayer) {
    306         setRootCompositingLayer(m_pendingRootLayer.get());
    307         m_pendingRootLayer = nullptr;
    308     }
    309 
    310     FloatRect visibleRect = [m_hostingLayer frame];
    311     visibleRect.intersect(m_scrolledExposedRect);
    312 
    313     // Because our view-relative overlay root layer is not attached to the main GraphicsLayer tree, we need to flush it manually.
    314     if (m_viewOverlayRootLayer)
    315         m_viewOverlayRootLayer->flushCompositingState(visibleRect);
    316 
    317     bool returnValue = m_webPage.mainFrameView()->flushCompositingStateIncludingSubframes();
    318 #if ENABLE(ASYNC_SCROLLING)
    319     if (ScrollingCoordinator* scrollingCoordinator = m_webPage.corePage()->scrollingCoordinator())
    320         scrollingCoordinator->commitTreeStateIfNeeded();
    321 #endif
    322 
    323     // If we have an active transient zoom, we want the zoom to win over any changes
    324     // that WebCore makes to the relevant layers, so re-apply our changes after flushing.
    325     if (m_transientZoomScale != 1)
    326         applyTransientZoomToLayers(m_transientZoomScale, m_transientZoomOrigin);
    327 
    328     [pool drain];
    329     return returnValue;
     298    @autoreleasepool {
     299        m_webPage.layoutIfNeeded();
     300
     301        updateIntrinsicContentSizeIfNeeded();
     302
     303        if (m_pendingRootLayer) {
     304            setRootCompositingLayer(m_pendingRootLayer.get());
     305            m_pendingRootLayer = nullptr;
     306        }
     307
     308        FloatRect visibleRect = [m_hostingLayer frame];
     309        visibleRect.intersect(m_scrolledExposedRect);
     310
     311        // Because our view-relative overlay root layer is not attached to the main GraphicsLayer tree, we need to flush it manually.
     312        if (m_viewOverlayRootLayer)
     313            m_viewOverlayRootLayer->flushCompositingState(visibleRect);
     314
     315        bool returnValue = m_webPage.mainFrameView()->flushCompositingStateIncludingSubframes();
     316    #if ENABLE(ASYNC_SCROLLING)
     317        if (ScrollingCoordinator* scrollingCoordinator = m_webPage.corePage()->scrollingCoordinator())
     318            scrollingCoordinator->commitTreeStateIfNeeded();
     319    #endif
     320
     321        // If we have an active transient zoom, we want the zoom to win over any changes
     322        // that WebCore makes to the relevant layers, so re-apply our changes after flushing.
     323        if (m_transientZoomScale != 1)
     324            applyTransientZoomToLayers(m_transientZoomScale, m_transientZoomOrigin);
     325
     326        return returnValue;
     327    }
    330328}
    331329
Note: See TracChangeset for help on using the changeset viewer.