Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Unified Diff: content/common/gpu/image_transport_surface_fbo_mac.h

Issue 454243002: Make GPU back-pressure work with remote CALayers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix flashes Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/image_transport_surface_fbo_mac.h
diff --git a/content/common/gpu/image_transport_surface_fbo_mac.h b/content/common/gpu/image_transport_surface_fbo_mac.h
index 3587e21b0b3a86f84d7d6f26843a479609bf6915..42f6683498c48317c6cd8fbf16ad23cb8aafb33b 100644
--- a/content/common/gpu/image_transport_surface_fbo_mac.h
+++ b/content/common/gpu/image_transport_surface_fbo_mac.h
@@ -45,12 +45,19 @@ class ImageTransportSurfaceFBO
// display.
virtual uint64 GetSurfaceHandle() const = 0;
- // Called when a frame is about to be sent to the browser process.
+ // Called when a new frame has been rendered into the texture, and the
+ // browser is about to be sent the surface to display.
virtual void WillSwapBuffers() = 0;
+
+ // Called once for every WillSwapBuffers call when the buffer that was sent
+ // to the browser may be released by the GPU process (this may be because
+ // the browser is holding a reference, in which case this will come
+ // quickly, or it may be because the browser is done with the surface, in
+ // which case it will come much later).
+ virtual void CanFreeSwappedBuffer() = 0;
};
- ImageTransportSurfaceFBO(StorageProvider* storage_provider,
- GpuChannelManager* manager,
+ ImageTransportSurfaceFBO(GpuChannelManager* manager,
GpuCommandBufferStub* stub,
gfx::PluginWindowHandle handle);
@@ -70,6 +77,9 @@ class ImageTransportSurfaceFBO
virtual bool SetBackbufferAllocation(bool allocated) OVERRIDE;
virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE;
+ // Called when the context may continue to make forward progress after a swap.
+ void UnblockContextAfterPendingSwap();
+
protected:
// ImageTransportSurface implementation
virtual void OnBufferPresented(
« no previous file with comments | « content/common/gpu/image_transport_surface_calayer_mac.mm ('k') | content/common/gpu/image_transport_surface_fbo_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698