diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-02 23:04:24 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-02 23:04:24 +0000 |
commit | e6809af7046787a3556ae997bddbbd6d9847a957 (patch) | |
tree | ec437ceb42c1c1a485af7258998efab29f9b1f16 /chrome/gpu | |
parent | a9bfb58da45eae71af445253eb0f21d4d497d39d (diff) | |
download | chromium_src-e6809af7046787a3556ae997bddbbd6d9847a957.zip chromium_src-e6809af7046787a3556ae997bddbbd6d9847a957.tar.gz chromium_src-e6809af7046787a3556ae997bddbbd6d9847a957.tar.bz2 |
Removed kChromiumRendererIdProperty window property.
This property was used by the GPU process to determine whether a particular renderer process had the right to render to a window. It turns out that this is no longer needed because now the browser tells the GPU process which child compositor window to render to and the GPU process trusts the browser process.
Also uncovered and fixed a bug in gpu_channel_host.cc where the renderer would hang if the GPU process failed to return a command buffer.
TEST=try
BUG=64834
Review URL: http://codereview.chromium.org/5607001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r-- | chrome/gpu/gpu_channel.cc | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/chrome/gpu/gpu_channel.cc b/chrome/gpu/gpu_channel.cc index 0805316..10641ed 100644 --- a/chrome/gpu/gpu_channel.cc +++ b/chrome/gpu/gpu_channel.cc @@ -119,25 +119,22 @@ void GpuChannel::OnCreateViewCommandBuffer( int32 render_view_id, const GPUCreateCommandBufferConfig& init_params, int32* route_id) { - *route_id = 0; + *route_id = MSG_ROUTING_NONE; #if defined(ENABLE_GPU) gfx::PluginWindowHandle handle = gfx::kNullPluginWindow; #if defined(OS_WIN) - gfx::NativeView view = gfx::NativeViewFromId(view_id); - - // Check that the calling renderer is allowed to render to this window. - // TODO(apatrick): consider killing the renderer process rather than failing. - int view_renderer_id = reinterpret_cast<int>( - GetProp(view, chrome::kChromiumRendererIdProperty)); - if (view_renderer_id != renderer_id_) - return; - - // Note, we don't actually render into the view HWND. Instead, inside - // the GpuCommandBufferStub, we will create a child window within the view - // HWND into which we will render. - handle = view; + // TODO(apatrick): We don't actually need the window handle on the Windows + // platform. At this point, it only indicates to the GpuCommandBufferStub + // whether onscreen or offscreen rendering is requested. The window handle + // that will be rendered to is the child compositor window and that window + // handle is provided by the browser process. Looking at what we are doing on + // this and other platforms, I think a redesign is in order here. Perhaps + // on all platforms the renderer just indicates whether it wants onscreen or + // offscreen rendering and the browser provides whichever platform specific + // "render target" the GpuCommandBufferStub targets. + handle = gfx::NativeViewFromId(view_id); #elif defined(OS_LINUX) ChildThread* gpu_thread = ChildThread::current(); // Ask the browser for the view's XID. @@ -194,7 +191,7 @@ void GpuChannel::OnCreateOffscreenCommandBuffer( router_.AddRoute(*route_id, stub.get()); stubs_.AddWithID(stub.release(), *route_id); #else - *route_id = 0; + *route_id = MSG_ROUTING_NONE; #endif } |