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"
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
);