Chromium Code Reviews| Index: ui/gfx/canvas.h |
| diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h |
| index 8183dfae02102461c56144b43426a9af161e19a8..30e2deddd65b5165e432a79ebb0b7349a723b456 100644 |
| --- a/ui/gfx/canvas.h |
| +++ b/ui/gfx/canvas.h |
| @@ -165,15 +165,15 @@ class GFX_EXPORT Canvas { |
| // Draws a dashed rectangle of the specified color. |
| void DrawDashedRect(const Rect& rect, SkColor color); |
| + // Unscales by the image scale factor (aka device scale factor), and returns |
| + // that factor. This is useful when callers want to draw directly in the |
| + // native scale. |
| + float UnscaleTheDeviceScaleFactor(); |
|
Peter Kasting
2015/10/29 23:11:10
This name is so verbose it reads poorly. How abou
sky
2015/10/29 23:37:54
+1 to Peter's first suggestion UndoDeviceScale.
danakj
2015/10/30 17:51:21
Done. I used UndoDeviceScaleFactor(), because we n
|
| + |
| // Saves a copy of the drawing state onto a stack, operating on this copy |
| // until a balanced call to Restore() is made. |
| void Save(); |
| - // Saves the drawing state, unscales by the image scale factor, and returns |
| - // that factor. This is useful when callers want to draw directly in the |
| - // native scale. |
| - float SaveAndUnscale(); |
| - |
| // As with Save(), except draws to a layer that is blended with the canvas |
| // at the specified alpha once Restore() is called. |
| // |layer_bounds| are the bounds of the layer relative to the current |