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

Side by Side Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 10031036: Revert 131177 - aura: Change shared context to be offscreen for arm (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/common/gpu/gpu_command_buffer_stub.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/image_transport_factory.h" 5 #include "content/browser/renderer_host/image_transport_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 void CreateSharedContext(ui::Compositor* compositor) { 400 void CreateSharedContext(ui::Compositor* compositor) {
401 PerCompositorData* data = per_compositor_data_[compositor]; 401 PerCompositorData* data = per_compositor_data_[compositor];
402 DCHECK(data); 402 DCHECK(data);
403 403
404 data->swap_client.reset(new CompositorSwapClient(compositor, this)); 404 data->swap_client.reset(new CompositorSwapClient(compositor, this));
405 405
406 GpuChannelHostFactory* factory = BrowserGpuChannelHostFactory::instance(); 406 GpuChannelHostFactory* factory = BrowserGpuChannelHostFactory::instance();
407 WebKit::WebGraphicsContext3D::Attributes attrs; 407 WebKit::WebGraphicsContext3D::Attributes attrs;
408 attrs.shareResources = true; 408 attrs.shareResources = true;
409 data->shared_context.reset(new WebGraphicsContext3DCommandBufferImpl( 409 data->shared_context.reset(new WebGraphicsContext3DCommandBufferImpl(
410 0, 410 data->surface_id,
411 GURL(), 411 GURL(),
412 factory, 412 factory,
413 data->swap_client->AsWeakPtr())); 413 data->swap_client->AsWeakPtr()));
414 if (!data->shared_context->Initialize( 414 if (!data->shared_context->Initialize(
415 attrs, 415 attrs,
416 false, 416 false,
417 content::CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INIT IALIZE)) { 417 content::CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INIT IALIZE)) {
418 // If we can't recreate contexts, we won't be able to show the UI. Better 418 // If we can't recreate contexts, we won't be able to show the UI. Better
419 // crash at this point. 419 // crash at this point.
420 LOG(FATAL) << "Failed to initialize compositor shared context."; 420 LOG(FATAL) << "Failed to initialize compositor shared context.";
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 void ImageTransportFactory::Terminate() { 464 void ImageTransportFactory::Terminate() {
465 ui::ContextFactory::SetInstance(NULL); 465 ui::ContextFactory::SetInstance(NULL);
466 delete g_factory; 466 delete g_factory;
467 g_factory = NULL; 467 g_factory = NULL;
468 } 468 }
469 469
470 // static 470 // static
471 ImageTransportFactory* ImageTransportFactory::GetInstance() { 471 ImageTransportFactory* ImageTransportFactory::GetInstance() {
472 return g_factory; 472 return g_factory;
473 } 473 }
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698