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

Unified Diff: ui/gfx/canvas.cc

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 | « ui/gfx/canvas.h ('k') | ui/gfx/nine_image_painter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas.cc
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index 2465cfae1bc9d775eb0fabe5d4f09097422e39a2..b81f995d0cb5baf93dfeb9d5d2834cd4ec4c8bed 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -175,17 +175,16 @@ void Canvas::DrawDashedRect(const Rect& rect, SkColor color) {
paint);
}
-void Canvas::Save() {
- canvas_->save();
-}
-
-float Canvas::SaveAndUnscale() {
- Save();
+float Canvas::UndoDeviceScaleFactor() {
SkScalar scale_factor = 1.0f / image_scale_;
canvas_->scale(scale_factor, scale_factor);
return image_scale_;
}
+void Canvas::Save() {
+ canvas_->save();
+}
+
void Canvas::SaveLayerAlpha(uint8 alpha) {
canvas_->saveLayerAlpha(NULL, alpha);
}
« no previous file with comments | « ui/gfx/canvas.h ('k') | ui/gfx/nine_image_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698