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

Unified Diff: ui/compositor/compositor_switches.cc

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: nit Created 3 years, 6 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: ui/compositor/compositor_switches.cc
diff --git a/ui/compositor/compositor_switches.cc b/ui/compositor/compositor_switches.cc
index 2a999a81a5094f05a9ba629feafdf8220f444ed4..8e7c57c1b8af70893e1dbf1125e026cb2618b1c9 100644
--- a/ui/compositor/compositor_switches.cc
+++ b/ui/compositor/compositor_switches.cc
@@ -28,6 +28,11 @@ const char kUIShowPaintRects[] = "ui-show-paint-rects";
const char kUISlowAnimations[] = "ui-slow-animations";
+// If enabled, all draw commnads recorded on canvas are done in pixel aligned
+// measurements. This also enables scaling of all elements in views and layers
+// to be done via corner points. See go/pixel-canvas
+const char kEnablePixelCanvasRecording[] = "enable-pixel-canvas-recording";
+
} // namespace switches
namespace ui {
@@ -38,4 +43,11 @@ bool IsUIZeroCopyEnabled() {
return command_line.HasSwitch(switches::kUIEnableZeroCopy);
}
+bool IsPixelCanvasRecordingEnabled() {
+ static const bool kIsPixelCanvasRecordingEnabled =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnablePixelCanvasRecording);
+ return kIsPixelCanvasRecordingEnabled;
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698