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

Side by Side Diff: gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « gpu/command_buffer/common/unittest_main.cc ('k') | gpu/command_buffer/service/context_group.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "gpu/command_buffer/service/async_pixel_transfer_manager.h" 5 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "gpu/command_buffer/service/async_pixel_transfer_manager_idle.h" 9 #include "gpu/command_buffer/service/async_pixel_transfer_manager_idle.h"
10 #include "gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h" 10 #include "gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h"
11 #include "gpu/command_buffer/service/async_pixel_transfer_manager_stub.h" 11 #include "gpu/command_buffer/service/async_pixel_transfer_manager_stub.h"
12 #include "gpu/command_buffer/service/gpu_switches.h" 12 #include "gpu/command_buffer/service/gpu_switches.h"
13 #include "ui/gl/gl_implementation.h" 13 #include "ui/gl/gl_implementation.h"
14 14
15 namespace gpu { 15 namespace gpu {
16 16
17 AsyncPixelTransferManager* AsyncPixelTransferManager::Create( 17 AsyncPixelTransferManager* AsyncPixelTransferManager::Create(
18 gfx::GLContext* context) { 18 gfx::GLContext* context) {
19 TRACE_EVENT0("gpu", "AsyncPixelTransferManager::Create"); 19 TRACE_EVENT0("gpu", "AsyncPixelTransferManager::Create");
20 if (CommandLine::ForCurrentProcess()->HasSwitch( 20 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
21 switches::kEnableShareGroupAsyncTextureUpload)) { 21 switches::kEnableShareGroupAsyncTextureUpload)) {
22 DCHECK(context); 22 DCHECK(context);
23 return static_cast<AsyncPixelTransferManager*> ( 23 return static_cast<AsyncPixelTransferManager*> (
24 new AsyncPixelTransferManagerShareGroup(context)); 24 new AsyncPixelTransferManagerShareGroup(context));
25 } 25 }
26 26
27 switch (gfx::GetGLImplementation()) { 27 switch (gfx::GetGLImplementation()) {
28 case gfx::kGLImplementationOSMesaGL: 28 case gfx::kGLImplementationOSMesaGL:
29 case gfx::kGLImplementationDesktopGL: 29 case gfx::kGLImplementationDesktopGL:
30 case gfx::kGLImplementationEGLGLES2: 30 case gfx::kGLImplementationEGLGLES2:
31 return new AsyncPixelTransferManagerIdle; 31 return new AsyncPixelTransferManagerIdle;
32 case gfx::kGLImplementationMockGL: 32 case gfx::kGLImplementationMockGL:
33 return new AsyncPixelTransferManagerStub; 33 return new AsyncPixelTransferManagerStub;
34 default: 34 default:
35 NOTREACHED(); 35 NOTREACHED();
36 return NULL; 36 return NULL;
37 } 37 }
38 } 38 }
39 39
40 } // namespace gpu 40 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/unittest_main.cc ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698