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

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

Issue 1366473002: Move WakeUpGpu logic to GpuChannelManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 5 years, 3 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 e959e329afc3b363f227330e7c889aabcaac2bd0..9fed072ae4a6f9a37b8024b4f21de78ce16660ae 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -66,45 +66,6 @@ void StopGpuProcessOnIO(int host_id) {
host->StopGpuProcess();
}
-class ScopedSendOnIOThread {
- public:
- ScopedSendOnIOThread(int host_id, IPC::Message* msg)
- : host_id_(host_id),
- msg_(msg),
- cancelled_(false) {
- }
-
- ~ScopedSendOnIOThread() {
- if (!cancelled_) {
- BrowserThread::PostTask(BrowserThread::IO,
- FROM_HERE,
- base::Bind(&SendOnIOThreadTask,
- host_id_,
- msg_.release()));
- }
- }
-
- void Cancel() { cancelled_ = true; }
-
- private:
- int host_id_;
- scoped_ptr<IPC::Message> msg_;
- bool cancelled_;
-};
-
-RenderWidgetHostViewBase* GetRenderWidgetHostViewFromSurfaceID(
- int surface_id) {
- int render_process_id = 0;
- int render_widget_id = 0;
- if (!GpuSurfaceTracker::Get()->GetRenderWidgetIDForSurface(
- surface_id, &render_process_id, &render_widget_id))
- return NULL;
-
- RenderWidgetHost* host =
- RenderWidgetHost::FromID(render_process_id, render_widget_id);
- return host ? static_cast<RenderWidgetHostViewBase*>(host->GetView()) : NULL;
-}
-
} // namespace
void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg) {
@@ -231,8 +192,6 @@ bool GpuProcessHostUIShim::OnControlMessageReceived(
IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message)
IPC_MESSAGE_HANDLER(GpuHostMsg_OnLogMessage,
OnLogMessage)
- IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceInitialized,
- OnAcceleratedSurfaceInitialized)
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
OnAcceleratedSurfaceBuffersSwapped)
@@ -267,15 +226,6 @@ void GpuProcessHostUIShim::OnGraphicsInfoCollected(
GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info);
}
-void GpuProcessHostUIShim::OnAcceleratedSurfaceInitialized(int32 surface_id,
- int32 route_id) {
- RenderWidgetHostViewBase* view =
- GetRenderWidgetHostViewFromSurfaceID(surface_id);
- if (!view)
- return;
- view->AcceleratedSurfaceInitialized(route_id);
-}
-
#if defined(OS_MACOSX)
void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) {
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698