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

Side by Side Diff: content/common/gpu/gpu_channel.cc

Issue 7554015: Implemented support for GL constext share groups in the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 8
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 10
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 void GpuChannel::CreateViewCommandBuffer( 183 void GpuChannel::CreateViewCommandBuffer(
184 gfx::PluginWindowHandle window, 184 gfx::PluginWindowHandle window,
185 int32 render_view_id, 185 int32 render_view_id,
186 const GPUCreateCommandBufferConfig& init_params, 186 const GPUCreateCommandBufferConfig& init_params,
187 int32* route_id) { 187 int32* route_id) {
188 *route_id = MSG_ROUTING_NONE; 188 *route_id = MSG_ROUTING_NONE;
189 content::GetContentClient()->SetActiveURL(init_params.active_url); 189 content::GetContentClient()->SetActiveURL(init_params.active_url);
190 190
191 #if defined(ENABLE_GPU) 191 #if defined(ENABLE_GPU)
192 GpuCommandBufferStub* share_group = stubs_.Lookup(init_params.share_group_id);
193
192 *route_id = GenerateRouteID(); 194 *route_id = GenerateRouteID();
193 scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub( 195 scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub(
194 this, window, gfx::Size(), disallowed_extensions_, 196 this,
197 share_group,
198 window,
199 gfx::Size(),
200 disallowed_extensions_,
195 init_params.allowed_extensions, 201 init_params.allowed_extensions,
196 init_params.attribs, *route_id, renderer_id_, render_view_id, 202 init_params.attribs,
197 watchdog_, software_)); 203 *route_id,
204 renderer_id_,
205 render_view_id,
206 watchdog_,
207 software_));
198 router_.AddRoute(*route_id, stub.get()); 208 router_.AddRoute(*route_id, stub.get());
199 stubs_.AddWithID(stub.release(), *route_id); 209 stubs_.AddWithID(stub.release(), *route_id);
200 #endif // ENABLE_GPU 210 #endif // ENABLE_GPU
201 } 211 }
202 212
203 void GpuChannel::ViewResized(int32 command_buffer_route_id) { 213 void GpuChannel::ViewResized(int32 command_buffer_route_id) {
204 GpuCommandBufferStub* stub = stubs_.Lookup(command_buffer_route_id); 214 GpuCommandBufferStub* stub = stubs_.Lookup(command_buffer_route_id);
205 if (stub == NULL) 215 if (stub == NULL)
206 return; 216 return;
207 217
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 296 }
287 297
288 void GpuChannel::OnCreateOffscreenCommandBuffer( 298 void GpuChannel::OnCreateOffscreenCommandBuffer(
289 const gfx::Size& size, 299 const gfx::Size& size,
290 const GPUCreateCommandBufferConfig& init_params, 300 const GPUCreateCommandBufferConfig& init_params,
291 IPC::Message* reply_message) { 301 IPC::Message* reply_message) {
292 int32 route_id = MSG_ROUTING_NONE; 302 int32 route_id = MSG_ROUTING_NONE;
293 303
294 content::GetContentClient()->SetActiveURL(init_params.active_url); 304 content::GetContentClient()->SetActiveURL(init_params.active_url);
295 #if defined(ENABLE_GPU) 305 #if defined(ENABLE_GPU)
306 GpuCommandBufferStub* share_group = stubs_.Lookup(init_params.share_group_id);
307
296 route_id = GenerateRouteID(); 308 route_id = GenerateRouteID();
297 309
298 scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub( 310 scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub(
299 this, 311 this,
312 share_group,
300 gfx::kNullPluginWindow, 313 gfx::kNullPluginWindow,
301 size, 314 size,
302 disallowed_extensions_, 315 disallowed_extensions_,
303 init_params.allowed_extensions, 316 init_params.allowed_extensions,
304 init_params.attribs, 317 init_params.attribs,
305 route_id, 318 route_id,
306 0, 0, watchdog_, 319 0, 0, watchdog_,
307 software_)); 320 software_));
308 router_.AddRoute(route_id, stub.get()); 321 router_.AddRoute(route_id, stub.get());
309 stubs_.AddWithID(stub.release(), route_id); 322 stubs_.AddWithID(stub.release(), route_id);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 428
416 #if defined(OS_POSIX) 429 #if defined(OS_POSIX)
417 int GpuChannel::GetRendererFileDescriptor() { 430 int GpuChannel::GetRendererFileDescriptor() {
418 int fd = -1; 431 int fd = -1;
419 if (channel_.get()) { 432 if (channel_.get()) {
420 fd = channel_->GetClientFileDescriptor(); 433 fd = channel_->GetClientFileDescriptor();
421 } 434 }
422 return fd; 435 return fd;
423 } 436 }
424 #endif // defined(OS_POSIX) 437 #endif // defined(OS_POSIX)
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.h » ('j') | content/renderer/gpu/renderer_gl_context.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698