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

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
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager.h ('k') | gpu/command_buffer/service/memory_program_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..629b26945fa4c5deec7be3da197f8749dd319fcd 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"
@@ -13,12 +13,11 @@ namespace gpu {
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);
+scoped_refptr<MailboxManager> MailboxManager::Create(
+ const GpuPreferences& gpu_preferences) {
+ if (gpu_preferences.enable_threaded_texture_mailboxes)
+ return scoped_refptr<MailboxManager>(new MailboxManagerSync);
+ return scoped_refptr<MailboxManager>(new MailboxManagerImpl);
}
} // namespage gles2
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager.h ('k') | gpu/command_buffer/service/memory_program_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698