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

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 101223005: Plumbing explicit share groups through context creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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
« no previous file with comments | « no previous file | content/browser/gpu/gpu_ipc_browsertests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/browser/compositor/gpu_process_transport_factory.h" 5 #include "content/browser/compositor/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 if (!gpu_channel_host) 437 if (!gpu_channel_host)
438 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); 438 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>();
439 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); 439 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon");
440 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( 440 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
441 new WebGraphicsContext3DCommandBufferImpl( 441 new WebGraphicsContext3DCommandBufferImpl(
442 surface_id, 442 surface_id,
443 url, 443 url,
444 gpu_channel_host.get(), 444 gpu_channel_host.get(),
445 attrs, 445 attrs,
446 false, 446 false,
447 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits())); 447 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
448 NULL));
448 return context.Pass(); 449 return context.Pass();
449 } 450 }
450 451
451 void GpuProcessTransportFactory::OnLostMainThreadSharedContextInsideCallback() { 452 void GpuProcessTransportFactory::OnLostMainThreadSharedContextInsideCallback() {
452 base::MessageLoop::current()->PostTask( 453 base::MessageLoop::current()->PostTask(
453 FROM_HERE, 454 FROM_HERE,
454 base::Bind(&GpuProcessTransportFactory::OnLostMainThreadSharedContext, 455 base::Bind(&GpuProcessTransportFactory::OnLostMainThreadSharedContext,
455 callback_factory_.GetWeakPtr())); 456 callback_factory_.GetWeakPtr()));
456 } 457 }
457 458
(...skipping 17 matching lines...) Expand all
475 observer_list_, 476 observer_list_,
476 OnLostResources()); 477 OnLostResources());
477 478
478 // Kill things that use the shared context before killing the shared context. 479 // Kill things that use the shared context before killing the shared context.
479 lost_gl_helper.reset(); 480 lost_gl_helper.reset();
480 lost_offscreen_compositor_contexts = NULL; 481 lost_offscreen_compositor_contexts = NULL;
481 lost_shared_main_thread_contexts = NULL; 482 lost_shared_main_thread_contexts = NULL;
482 } 483 }
483 484
484 } // namespace content 485 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_ipc_browsertests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698