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

Unified Diff: ui/gfx/canvas.cc

Issue 2016833002: Use initialized canvas to create network icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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') | no next file » | 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 6c0aa0e8f684372ec47ef402cb65535874381b3a..41f324fb812edc40146df1dad81556a120261b6b 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -42,17 +42,6 @@ Canvas::Canvas(const Size& size, float image_scale, bool is_opaque)
canvas_->scale(scale_scalar, scale_scalar);
}
-Canvas::Canvas(const ImageSkiaRep& image_rep, bool is_opaque)
- : image_scale_(image_rep.scale()),
- canvas_(sk_sp<SkCanvas>(
- skia::CreatePlatformCanvas(image_rep.pixel_width(),
- image_rep.pixel_height(),
- is_opaque))) {
- SkScalar scale_scalar = SkFloatToScalar(image_scale_);
- canvas_->scale(scale_scalar, scale_scalar);
- DrawImageInt(ImageSkia(image_rep), 0, 0);
-}
-
Canvas::Canvas()
: image_scale_(1.f),
canvas_(sk_sp<SkCanvas>(skia::CreatePlatformCanvas(0, 0, false))) {}
« no previous file with comments | « ui/gfx/canvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698