Chromium Code Reviews| Index: ui/compositor/compositor_switches.cc |
| diff --git a/ui/compositor/compositor_switches.cc b/ui/compositor/compositor_switches.cc |
| index 991aba5e0ef1b54462bd01258d1991601f1d7db1..2b6d88240406a5cdcaf6101642bee027ba05fda0 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 kIsPixelCanvasRecordingEnabled = |
|
danakj
2017/07/26 16:06:04
oh, kFooBar is for compile-time constants, which t
malaykeshav
2017/07/26 18:34:45
Done
|
| + base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnablePixelCanvasRecording); |
| + return kIsPixelCanvasRecordingEnabled; |
| +} |
| + |
| } // namespace ui |