Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / common / gpu / image_transport_surface_iosurface_mac.cc
index cbae4a2..6ef1fc6 100644 (file)
@@ -105,21 +105,26 @@ void IOSurfaceStorageProvider::FreeColorBufferStorage() {
   io_surface_id_ = 0;
 }
 
-uint64 IOSurfaceStorageProvider::GetSurfaceHandle() const {
-  return SurfaceHandleFromIOSurfaceID(io_surface_id_);
-}
-
-void IOSurfaceStorageProvider::WillSwapBuffers() {
+void IOSurfaceStorageProvider::SwapBuffers(
+    const gfx::Size& size, float scale_factor) {
   // The browser compositor will throttle itself, so we are free to unblock the
   // context immediately. Make sure that the browser is doing its throttling
   // appropriately by ensuring that the previous swap was acknowledged before
   // we get another swap.
   DCHECK(pending_swapped_surfaces_.empty());
   pending_swapped_surfaces_.push_back(io_surface_);
-  transport_surface_->UnblockContextAfterPendingSwap();
+
+  transport_surface_->SendSwapBuffers(
+      SurfaceHandleFromIOSurfaceID(io_surface_id_), size, scale_factor);
+}
+
+void IOSurfaceStorageProvider::WillWriteToBackbuffer() {
+}
+
+void IOSurfaceStorageProvider::DiscardBackbuffer() {
 }
 
-void IOSurfaceStorageProvider::CanFreeSwappedBuffer() {
+void IOSurfaceStorageProvider::SwapBuffersAckedByBrowser() {
   DCHECK(!pending_swapped_surfaces_.empty());
   pending_swapped_surfaces_.pop_front();
 }