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

Unified Diff: gpu/command_buffer/service/mailbox_manager.cc

Issue 1716813002: Use GpuPreferences to avoid directly accessing switches in gpu related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/mailbox_manager.cc
diff --git a/gpu/command_buffer/service/mailbox_manager.cc b/gpu/command_buffer/service/mailbox_manager.cc
index e8432ed17c5873532abae09571ee7b61441f3839..2b667937669aef66f4ccebf8e12a9364e3b3ad4d 100644
--- a/gpu/command_buffer/service/mailbox_manager.cc
+++ b/gpu/command_buffer/service/mailbox_manager.cc
@@ -5,7 +5,7 @@
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "base/command_line.h"
-#include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
#include "gpu/command_buffer/service/mailbox_manager_impl.h"
#include "gpu/command_buffer/service/mailbox_manager_sync.h"
@@ -14,11 +14,9 @@ namespace gles2 {
// static
scoped_refptr<MailboxManager> MailboxManager::Create() {
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableThreadedTextureMailboxes)) {
- return scoped_refptr<MailboxManager>(new MailboxManagerSync);
- }
- return scoped_refptr<MailboxManager>(new MailboxManagerImpl);
+ if (GpuPreferences::GetInstance()->enable_threaded_texture_mailboxes)
+ return scoped_refptr<MailboxManager>(new MailboxManagerSync);
+ return scoped_refptr<MailboxManager>(new MailboxManagerImpl);
}
} // namespage gles2

Powered by Google App Engine
This is Rietveld 408576698