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

Unified Diff: cc/base/switches.cc

Issue 69343005: Added preliminary support for tile rasterization with Ganesh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cc_perftests compile error. Created 7 years, 1 month 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 | « no previous file | cc/cc.gyp » ('j') | cc/layers/picture_layer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/switches.cc
diff --git a/cc/base/switches.cc b/cc/base/switches.cc
index 752abc607729186d3090c70a75c2e1c80610b949..370d411a9ffe149f3f942a7911e2f27e76edf95f 100644
--- a/cc/base/switches.cc
+++ b/cc/base/switches.cc
@@ -171,6 +171,7 @@ bool IsLCDTextEnabled() {
}
namespace {
+
bool CheckImplSidePaintingStatus() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
@@ -185,6 +186,12 @@ bool CheckImplSidePaintingStatus() {
return false;
#endif
}
+
+bool CheckGPURasterizationStatus() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ return command_line.HasSwitch(cc::switches::kEnableGPURasterization);
+}
+
} // namespace
bool IsImplSidePaintingEnabled() {
@@ -193,8 +200,8 @@ bool IsImplSidePaintingEnabled() {
}
bool IsGPURasterizationEnabled() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- return command_line.HasSwitch(cc::switches::kEnableGPURasterization);
+ static bool enabled = CheckGPURasterizationStatus();
+ return enabled;
}
bool IsMapImageEnabled() {
« no previous file with comments | « no previous file | cc/cc.gyp » ('j') | cc/layers/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698