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

Unified Diff: gpu/command_buffer/service/logger.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/logger.cc
diff --git a/gpu/command_buffer/service/logger.cc b/gpu/command_buffer/service/logger.cc
index d8311f10dc36727b19024a33eaab8bd344df064a..6a7b75640689a8f2b584dc86fb909971997e4678 100644
--- a/gpu/command_buffer/service/logger.cc
+++ b/gpu/command_buffer/service/logger.cc
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "gpu/command_buffer/common/debug_marker_manager.h"
-#include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/command_buffer/service/gpu_preferences.h"
namespace gpu {
namespace gles2 {
@@ -27,8 +27,7 @@ Logger::~Logger() {}
void Logger::LogMessage(
const char* filename, int line, const std::string& msg) {
if (log_message_count_ < kMaxLogMessages ||
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableGLErrorLimit)) {
+ GpuPreferences::GetInstance()->disable_gl_error_limit) {
std::string prefixed_msg(std::string("[") + GetLogPrefix() + "]" + msg);
++log_message_count_;
// LOG this unless logging is turned off as any chromium code that

Powered by Google App Engine
This is Rietveld 408576698