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

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

Issue 8921017: Fix windows gpu bots (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_win.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index c8078147bf2db6fae268370cb58a5c5243b2a6d1..91d001f0b5f19a130f7a18d93ca6d82fa6f18b86 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -182,6 +182,21 @@ LRESULT CALLBACK PluginWrapperWindowProc(HWND window, unsigned int message,
return ::DefWindowProc(window, message, wparam, lparam);
}
+void SendToGpuProcessHost(int gpu_host_id, IPC::Message* message) {
+ GpuProcessHost* gpu_process_host = GpuProcessHost::FromID(gpu_host_id);
+ if (!gpu_process_host) {
+ delete message;
+ return;
+ }
+
+ gpu_process_host->Send(message);
+}
+
+void PostTaskOnIOThread(const tracked_objects::Location& from_here,
+ base::Closure task) {
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, task);
darin (slow to review) 2011/12/12 23:54:32 perhaps you meant to forward |from_here|?
piman 2011/12/13 00:35:41 Probably... I was just reverting part of the CL, s
+}
+
bool DecodeZoomGesture(HWND hwnd, const GESTUREINFO& gi,
content::PageZoom* zoom,
POINT* zoom_center) {
@@ -2035,12 +2050,15 @@ void RenderWidgetHostViewWin::AcceleratedSurfaceBuffersSwapped(
accelerated_surface_->Initialize();
}
+ base::Closure acknowledge_task = base::Bind(
+ SendToGpuProcessHost,
+ gpu_host_id,
+ new AcceleratedSurfaceMsg_BuffersSwappedACK(params.route_id));
darin (slow to review) 2011/12/12 23:54:32 it seems like you should be using the new Passed()
piman 2011/12/13 00:35:41 Done.
+
accelerated_surface_->AsyncPresentAndAcknowledge(
params.size,
params.surface_id,
- base::Bind(&RenderWidgetHost::AcknowledgeSwapBuffers,
- gpu_host_id,
- params.route_id));
+ base::Bind(PostTaskOnIOThread, FROM_HERE, acknowledge_task));
darin (slow to review) 2011/12/12 23:54:32 hmm, seems like it might be nice to add PostTaskOn
piman 2011/12/13 00:35:41 I removed that function. We could argue whether or
piman 2011/12/13 01:04:50 Turns out, it's actually needed for overload resol
} else {
RenderWidgetHost::AcknowledgeSwapBuffers(params.route_id, gpu_host_id);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698