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

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

Issue 517733002: Revert of Fix assorted issues with remote CoreAnimation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean_up_accel_layers
Patch Set: 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 de501005a0c859bdf42d11b0819a8878ca66b787..42f6683498c48317c6cd8fbf16ad23cb8aafb33b 100644
--- a/content/common/gpu/image_transport_surface_fbo_mac.h
+++ b/content/common/gpu/image_transport_surface_fbo_mac.h
@@ -41,20 +41,20 @@
// GL texture that was bound has already been deleted by the caller.
virtual void FreeColorBufferStorage() = 0;
- // Swap buffers and return the handle for the surface to send to the browser
- // process to display.
- virtual void SwapBuffers(const gfx::Size& size, float scale_factor) = 0;
+ // Retrieve the handle for the surface to send to the browser process to
+ // display.
+ virtual uint64 GetSurfaceHandle() const = 0;
- // Indicate that the backbuffer will be written to.
- virtual void WillWriteToBackbuffer() = 0;
+ // 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;
- // Indicate that the backbuffer has been discarded and should not be seen
- // again.
- virtual void DiscardBackbuffer() = 0;
-
- // Called once for every SwapBuffers call when the IPC for the present has
- // been processed by the browser.
- virtual void SwapBuffersAckedByBrowser() = 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(GpuChannelManager* manager,
@@ -78,9 +78,7 @@
virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE;
// Called when the context may continue to make forward progress after a swap.
- void SendSwapBuffers(uint64 surface_handle,
- const gfx::Size pixel_size,
- float scale_factor);
+ void UnblockContextAfterPendingSwap();
protected:
// ImageTransportSurface implementation
@@ -122,8 +120,12 @@
// Whether or not we've successfully made the surface current once.
bool made_current_;
- // Whether a SwapBuffers IPC needs to be sent to the browser.
- bool is_swap_buffers_send_pending_;
+ // Whether a SwapBuffers is pending.
+ bool is_swap_buffers_pending_;
+
+ // Whether we unscheduled command buffer because of pending SwapBuffers.
+ bool did_unschedule_;
+
std::vector<ui::LatencyInfo> latency_info_;
scoped_ptr<ImageTransportHelper> helper_;
« no previous file with comments | « content/common/gpu/image_transport_surface_calayer_mac.mm ('k') | content/common/gpu/image_transport_surface_fbo_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698