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

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 90090)
+++ content/browser/renderer_host/gpu_message_filter.cc (working copy)
@@ -10,11 +10,14 @@
#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) {
}
// WeakPtrs to a GpuMessageFilter need to be Invalidated from
@@ -153,12 +156,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.
« no previous file with comments | « content/browser/renderer_host/gpu_message_filter.h ('k') | content/browser/renderer_host/mock_render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698