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

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

Issue 505053002: Fix assorted issues with remote CoreAnimation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean_up_accel_layers
Patch Set: Clean up timer logic 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.mm
diff --git a/content/common/gpu/image_transport_surface_fbo_mac.mm b/content/common/gpu/image_transport_surface_fbo_mac.mm
index fc7e5ec4bf370933a39cd3ebca0a647539d8b82e..aab15aebbfda88b650e13866221a1936de6eb4aa 100644
--- a/content/common/gpu/image_transport_surface_fbo_mac.mm
+++ b/content/common/gpu/image_transport_surface_fbo_mac.mm
@@ -101,6 +101,8 @@ bool ImageTransportSurfaceFBO::SetBackbufferAllocation(bool allocation) {
return true;
backbuffer_suggested_allocation_ = allocation;
AdjustBufferAllocation();
+ if (!allocation)
+ storage_provider_->DiscardBackbuffer();
return true;
}
@@ -130,17 +132,15 @@ bool ImageTransportSurfaceFBO::SwapBuffers() {
return true;
glFlush();
+ DCHECK(!is_swap_buffers_pending_);
+ is_swap_buffers_pending_ = true;
+
GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params;
- params.surface_handle = storage_provider_->GetSurfaceHandle();
+ params.surface_handle = storage_provider_->SwapBuffersAndGetSurfaceHandle();
params.size = GetSize();
params.scale_factor = scale_factor_;
params.latency_info.swap(latency_info_);
helper_->SendAcceleratedSurfaceBuffersSwapped(params);
-
- DCHECK(!is_swap_buffers_pending_);
- is_swap_buffers_pending_ = true;
-
- storage_provider_->WillSwapBuffers();
return true;
}
« no previous file with comments | « content/common/gpu/image_transport_surface_fbo_mac.h ('k') | content/common/gpu/image_transport_surface_iosurface_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698