Elim cr-checkbox
[chromium-blink-merge.git] / gpu / command_buffer / service / mailbox_manager.cc
blobe8432ed17c5873532abae09571ee7b61441f3839
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "gpu/command_buffer/service/mailbox_manager.h"
7 #include "base/command_line.h"
8 #include "gpu/command_buffer/service/gpu_switches.h"
9 #include "gpu/command_buffer/service/mailbox_manager_impl.h"
10 #include "gpu/command_buffer/service/mailbox_manager_sync.h"
12 namespace gpu {
13 namespace gles2 {
15 // static
16 scoped_refptr<MailboxManager> MailboxManager::Create() {
17 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
18 switches::kEnableThreadedTextureMailboxes)) {
19 return scoped_refptr<MailboxManager>(new MailboxManagerSync);
21 return scoped_refptr<MailboxManager>(new MailboxManagerImpl);
24 } // namespage gles2
25 } // namespace gpu