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

Unified Diff: ui/compositor/compositor_switches.cc

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Sync with ToT Created 3 years, 4 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 | « ui/compositor/compositor_switches.h ('k') | ui/compositor/compositor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor_switches.cc
diff --git a/ui/compositor/compositor_switches.cc b/ui/compositor/compositor_switches.cc
index 991aba5e0ef1b54462bd01258d1991601f1d7db1..4833b4f8139a23fd5e72e49f0997b8f8e62a7f46 100644
--- a/ui/compositor/compositor_switches.cc
+++ b/ui/compositor/compositor_switches.cc
@@ -32,6 +32,11 @@ const char kUIShowPaintRects[] = "ui-show-paint-rects";
const char kUISlowAnimations[] = "ui-slow-animations";
+// If enabled, all draw commands 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 https://goo.gl/Dqig5s
+const char kEnablePixelCanvasRecording[] = "enable-pixel-canvas-recording";
+
} // namespace switches
namespace ui {
@@ -42,4 +47,11 @@ bool IsUIZeroCopyEnabled() {
return command_line.HasSwitch(switches::kUIEnableZeroCopy);
}
+bool IsPixelCanvasRecordingEnabled() {
+ static const bool is_pixel_canvas_recording_enabled =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnablePixelCanvasRecording);
+ return is_pixel_canvas_recording_enabled;
+}
+
} // namespace ui
« no previous file with comments | « ui/compositor/compositor_switches.h ('k') | ui/compositor/compositor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698