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

Unified Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 396483003: Separate ResizeHelper from RenderWidgetHelper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Linux build again Created 6 years, 5 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/browser/gpu/gpu_process_host_ui_shim.cc
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index 95a2908d3667b0d6f66feaa91a64574d6e427c4b..3e4b5ceacdf3ca64c600e93d323164663b2493cc 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -11,11 +11,13 @@
#include "base/id_map.h"
#include "base/lazy_instance.h"
#include "base/strings/string_number_conversions.h"
+#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
+#include "content/browser/renderer_host/render_widget_helper.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/public/browser/browser_thread.h"
@@ -254,6 +256,16 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
if (!ui::LatencyInfo::Verify(params.latency_info,
"GpuHostMsg_AcceleratedSurfaceBuffersSwapped"))
return;
+
+#if defined(OS_MACOSX)
+ // On Mac with delegated rendering, accelerated surfaces are swapped by
+ // calling a method on their NSView.
+ if (IsDelegatedRendererEnabled()) {
+ RenderWidgetHelper::OnNativeSurfaceBuffersSwappedOnUIThread(params);
+ return;
+ }
+#endif
+
AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
ack_params.mailbox = params.mailbox;
ack_params.sync_point = 0;

Powered by Google App Engine
This is Rietveld 408576698