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 42f6683498c48317c6cd8fbf16ad23cb8aafb33b..de501005a0c859bdf42d11b0819a8878ca66b787 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 @@ class ImageTransportSurfaceFBO |
// GL texture that was bound has already been deleted by the caller. |
virtual void FreeColorBufferStorage() = 0; |
- // Retrieve the handle for the surface to send to the browser process to |
- // display. |
- virtual uint64 GetSurfaceHandle() const = 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; |
- |
- // 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; |
+ // 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; |
+ |
+ // Indicate that the backbuffer will be written to. |
+ virtual void WillWriteToBackbuffer() = 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; |
}; |
ImageTransportSurfaceFBO(GpuChannelManager* manager, |
@@ -78,7 +78,9 @@ class ImageTransportSurfaceFBO |
virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE; |
// Called when the context may continue to make forward progress after a swap. |
- void UnblockContextAfterPendingSwap(); |
+ void SendSwapBuffers(uint64 surface_handle, |
+ const gfx::Size pixel_size, |
+ float scale_factor); |
protected: |
// ImageTransportSurface implementation |
@@ -120,12 +122,8 @@ class ImageTransportSurfaceFBO |
// Whether or not we've successfully made the surface current once. |
bool made_current_; |
- // Whether a SwapBuffers is pending. |
- bool is_swap_buffers_pending_; |
- |
- // Whether we unscheduled command buffer because of pending SwapBuffers. |
- bool did_unschedule_; |
- |
+ // Whether a SwapBuffers IPC needs to be sent to the browser. |
+ bool is_swap_buffers_send_pending_; |
std::vector<ui::LatencyInfo> latency_info_; |
scoped_ptr<ImageTransportHelper> helper_; |