Remote Layer Tree: Double-buffering and minimization of repaints
https://bugs.webkit.org/show_bug.cgi?id=123043
Reviewed by Simon Fraser.
No new tests, not yet testable.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::ensureBackingStore):
Don't worry about isOpaque with RemoteLayerBackingStore; this is a
optimization that is causing trouble; we can re-add it later.
(PlatformCALayerRemote::setBounds):
Make sure that we will repaint if our bounds change.
* WebProcess/WebPage/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::bitmap):
Keep a front and back buffer; return the front buffer when being asked for the bitmap.
Keep a Region of repaint areas.
* WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::RemoteLayerBackingStore):
(RemoteLayerBackingStore::encode):
(RemoteLayerBackingStore::decode):
Serialize only the front buffer, since the UI process only needs that.
(RemoteLayerBackingStore::setNeedsDisplay):
Store repaint rects instead of always setting the whole layer to be dirty.
(RemoteLayerBackingStore::display):
Paint into the back buffer (copying valid parts over from the front buffer),
then swap it to the front buffer. Use drawLayerContents so we get repaint counters, etc.
* WebCore.exp.in:
Export one version of drawLayerContents and Region::contains.
* WebCore.xcodeproj/project.pbxproj:
Expose WebLayer.h as a private header.
* platform/graphics/mac/WebLayer.h:
Clean up this header, and add a new drawLayerContents that can operate without a CALayer.
* platform/graphics/mac/WebLayer.mm:
(WebCore::drawLayerContents):
Split drawLayerContents into one method that acquires properties CALayer,
and one that just does the painting.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157658
268f45cc-cd09-0410-ab3c-
d52691b4dbfc