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

Unified Diff: content/browser/renderer_host/render_widget_helper.h

Issue 370513002: Mac ÜC: Make resize smooth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@enable_uc_for_reals
Patch Set: Add comments 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/renderer_host/render_widget_helper.h
diff --git a/content/browser/renderer_host/render_widget_helper.h b/content/browser/renderer_host/render_widget_helper.h
index e424c764df73ffb5dab6ee02962a5de72a0a2476..466b84643097a2c56a8df56e77e95bf7385a225f 100644
--- a/content/browser/renderer_host/render_widget_helper.h
+++ b/content/browser/renderer_host/render_widget_helper.h
@@ -30,7 +30,7 @@ namespace base {
class TimeDelta;
}
-struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
+struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params;
struct ViewHostMsg_CreateWindow_Params;
struct ViewMsg_SwapOut_Params;
@@ -137,6 +137,20 @@ class RenderWidgetHelper
// created by CreateNewWindow which initially blocked the requests.
void ResumeRequestsForView(int route_id);
+#if defined(OS_MACOSX)
+ // Associate an NSView with a render process and widget, so that browser
+ // compositor swaps can come through during resize.
+ static void SetRenderWidgetIDForWidget(gfx::AcceleratedWidget native_widget,
+ int render_process_id,
+ int render_widget_id);
+ static void ResetRenderWidgetIDForWidget(
+ gfx::AcceleratedWidget native_widget);
+
+ // Display a new frame to an NSView.
+ static void OnNativeSurfaceBuffersSwappedOnUIThread(
+ const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params);
+#endif
+
// IO THREAD ONLY -----------------------------------------------------------
// Called on the IO thread when a BackingStore message is received.
@@ -171,9 +185,10 @@ class RenderWidgetHelper
#endif
#if defined(OS_MACOSX)
- static void OnNativeSurfaceBuffersSwappedOnIOThread(
- GpuProcessHost* gpu_process_host,
- const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params);
+ // Retrieve the render process and widget that was associated with an NSView.
+ static bool GetRenderWidgetIDForWidget(gfx::AcceleratedWidget native_widget,
+ int* render_process_id,
+ int* render_widget_id);
#endif
private:
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/renderer_host/render_widget_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698