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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

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_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 528401214dca53a59305782fae8e9122f260aa13..1cbc3865086ed0db8e25cef9e8012b84e04127ec 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1405,12 +1405,14 @@ bool RenderProcessHostImpl::OnMessageReceived(const IPC::Message& msg) {
Send(reply);
}
+#if defined(OS_MACOSX)
// If this is a SwapBuffers, we need to ack it if we're not going to handle
// it so that the GPU process doesn't get stuck in unscheduled state.
IPC_BEGIN_MESSAGE_MAP(RenderProcessHostImpl, msg)
IPC_MESSAGE_HANDLER(ViewHostMsg_CompositorSurfaceBuffersSwapped,
OnCompositorSurfaceBuffersSwappedNoHost)
IPC_END_MESSAGE_MAP()
+#endif
return true;
}
return listener->OnMessageReceived(msg);
@@ -2141,6 +2143,7 @@ void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) {
MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size);
}
+#if defined(OS_MACOSX)
void RenderProcessHostImpl::OnCompositorSurfaceBuffersSwappedNoHost(
const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params) {
TRACE_EVENT0("renderer_host",
@@ -2148,12 +2151,19 @@ void RenderProcessHostImpl::OnCompositorSurfaceBuffersSwappedNoHost(
if (!ui::LatencyInfo::Verify(params.latency_info,
"ViewHostMsg_CompositorSurfaceBuffersSwapped"))
return;
+
+ if (params.use_native_widget) {
+ RenderWidgetHelper::OnNativeSurfaceBuffersSwappedOnUIThread(params);
+ return;
+ }
+
AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
ack_params.sync_point = 0;
RenderWidgetHostImpl::AcknowledgeBufferPresent(params.route_id,
params.gpu_process_host_id,
ack_params);
}
+#endif
void RenderProcessHostImpl::OnGpuSwitching() {
// We are updating all widgets including swapped out ones.
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/renderer_host/render_widget_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698