summaryrefslogtreecommitdiffstats
path: root/cc/surfaces
diff options
context:
space:
mode:
authorccameron <ccameron@chromium.org>2016-01-11 17:15:40 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-12 01:16:32 +0000
commitbe2457f54bb9018e4e6262716e830c1dc4f07e72 (patch)
tree4ca2746ec091f6d4db603be9bb2f3bf24094f748 /cc/surfaces
parent6d3040cfd0ffca645a01ba2979fa9c657f71cbdc (diff)
downloadchromium_src-be2457f54bb9018e4e6262716e830c1dc4f07e72.zip
chromium_src-be2457f54bb9018e4e6262716e830c1dc4f07e72.tar.gz
chromium_src-be2457f54bb9018e4e6262716e830c1dc4f07e72.tar.bz2
cc: Allow returning overlay resources upon swap completion
On Mac, the only way to reliably know that overlay resources are no longer in use is by the function IOSurfaceIsInUse (which is checked by the functions ResourceProvider::InUseByConsumer and ResourceProvider::CanLockForWrite). IOSurfaceIsInUse will start returning true as soon as a CALayer has its contents set to an IOSurface, which happens during swap in the GPU process (in particular, when a Mach port for the IOSurface is created for sending to the WindowServer process), and so the earliest time that resources may be returned to the renderer process is swap completion. Repurpose a now-extinct flag to indicate that overlay resources are to be returned immediately upon swap acknowledgement, and add tests to ensure this behavior. BUG=558701 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1523063005 Cr-Commit-Position: refs/heads/master@{#368751}
Diffstat (limited to 'cc/surfaces')
-rw-r--r--cc/surfaces/display.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 64a2906..c0a8bde 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -297,6 +297,8 @@ void Display::DidSwapBuffers() {
void Display::DidSwapBuffersComplete() {
if (scheduler_)
scheduler_->DidSwapBuffersComplete();
+ if (renderer_)
+ renderer_->SwapBuffersComplete();
}
void Display::CommitVSyncParameters(base::TimeTicks timebase,