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

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

Issue 7136001: GPU compositing surface handle is no longer sent to renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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/gpu_message_filter.cc
===================================================================
--- content/browser/renderer_host/gpu_message_filter.cc (revision 89036)
+++ content/browser/renderer_host/gpu_message_filter.cc (working copy)
@@ -10,11 +10,15 @@
#include "base/callback.h"
#include "content/browser/gpu/gpu_process_host.h"
+#include "content/browser/renderer_host/render_widget_helper.h"
#include "content/common/gpu/gpu_messages.h"
-GpuMessageFilter::GpuMessageFilter(int render_process_id)
+GpuMessageFilter::GpuMessageFilter(int render_process_id,
+ RenderWidgetHelper* render_widget_helper)
: gpu_host_id_(0),
- render_process_id_(render_process_id) {
+ render_process_id_(render_process_id),
+ render_widget_helper_(render_widget_helper),
+ ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
}
// WeakPtrs to a GpuMessageFilter need to be Invalidated from
@@ -153,12 +157,15 @@
}
void GpuMessageFilter::OnCreateViewCommandBuffer(
- gfx::PluginWindowHandle compositing_surface,
int32 render_view_id,
const GPUCreateCommandBufferConfig& init_params,
IPC::Message* reply) {
GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_);
- if (!host) {
+
+ gfx::PluginWindowHandle compositing_surface =
+ render_widget_helper_->LookupCompositingSurface(render_view_id);
+
+ if (!host || compositing_surface == gfx::kNullPluginWindow) {
// TODO(apatrick): Eventually, this IPC message will be routed to a
// GpuProcessStub with a particular routing ID. The error will be set if
// the GpuProcessStub with that routing ID is not in the MessageRouter.

Powered by Google App Engine
This is Rietveld 408576698