| Summary: | [iOS WebKit2] Mark back buffers purgeable when they're not being painted frequently | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||
| Component: | WebKit2 | Assignee: | Tim Horton <thorton> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | buildbot, rniwa, sam, simon.fraser | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Tim Horton
2014-04-03 23:23:12 PDT
Created attachment 228581 [details]
patch
Comment on attachment 228581 [details] patch Attachment 228581 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/4771076601020416 New failing tests: platform/mac/fast/scrolling/scroll-iframe-latched-mainframe.html platform/mac/fast/scrolling/scroll-select-latched-mainframe.html media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_1.html platform/mac/fast/scrolling/scroll-div-latched-mainframe.html Created attachment 228583 [details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Comment on attachment 228581 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=228581&action=review > Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h:126 > + std::chrono::steady_clock::time_point m_lastDisplayTime; std::so::verbose > Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm:373 > + if (markVolatile) > + surface->setIsVolatile(true); > + else if (surface->setIsVolatile(false) == IOSurface::SurfaceState::Empty) > + return false; if (markVolatile) { surface... return true; } ... Or do the "return false" test first. Also the two booleans (markVolatile and the argument to setIsVolatile) make this code very confusing. How about: bool result = surface->setIsVolatile(markVolatile); if (!markVolatile && !result) return false; It would be clearer if you used an enum markVolatile/markNonVolatile. > Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm:402 > + if (!applyVolatilityToSurface(m_frontSurface.get(), false)) > + setNeedsDisplay(); > + applyVolatilityToSurface(m_backSurface.get(), false); > + break; > + case Volatility::BackBufferVolatile: > + if (m_backSurface && m_backSurface->isInUse()) > + return false; > + if (!applyVolatilityToSurface(m_frontSurface.get(), false)) > + setNeedsDisplay(); > + applyVolatilityToSurface(m_backSurface.get(), true); > + break; > + case Volatility::AllBuffersVolatile: > + if (m_frontSurface && m_frontSurface->isInUse()) > + return false; > + if (m_backSurface && m_backSurface->isInUse()) > + return false; > + applyVolatilityToSurface(m_frontSurface.get(), true); > + applyVolatilityToSurface(m_backSurface.get(), true); false, false, false, true, true! > Source/WebKit2/Shared/mac/RemoteLayerBackingStoreCollection.h:59 > +private: > + HashSet<RemoteLayerBackingStore*> m_liveBackingStore; > + > + void markInactiveBackingStorePurgeable(); > + > + RemoteLayerTreeContext* m_context; > + > + WebCore::Timer<RemoteLayerBackingStoreCollection> m_purgeabilityTimer; Would prefer the member variables be grouped together. > Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h:82 > + std::unique_ptr<RemoteLayerBackingStoreCollection> m_backingStoreCollection; Why not just have it by value? |