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

Unified Diff: ui/gfx/canvas.h

Issue 1425163002: gfx: Rename canvas SaveAndUnscale to UnscaleTheDeviceScaleFactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ninepatchscale
Patch Set: scopedunscale: . Created 5 years, 2 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 | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | ui/gfx/canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas.h
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index 8183dfae02102461c56144b43426a9af161e19a8..fd6e3c71687d6bdad9435a74f3778c79a9e38ded 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 UndoDeviceScaleFactor();
+
// 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
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698