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

Unified Diff: gm/ninepatchstretch.cpp

Issue 163823002: Revert of add peekPixels to SkCanvas and SkSurface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « gm/morphology.cpp ('k') | gm/offsetimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/ninepatchstretch.cpp
diff --git a/gm/ninepatchstretch.cpp b/gm/ninepatchstretch.cpp
index 74cc87f30597f1126bcec5117c346f6d67886d8b..a14af00a4e99b7ccf93c71b2ca5d7503ee8f5c99 100644
--- a/gm/ninepatchstretch.cpp
+++ b/gm/ninepatchstretch.cpp
@@ -13,7 +13,10 @@
const int kSize = 2*kFixed + kStretchy;
bitmap->allocN32Pixels(kSize, kSize);
- SkCanvas canvas(*bitmap);
+ SkBaseDevice* dev = new SkBitmapDevice(*bitmap);
+
+ SkCanvas canvas(dev);
+ dev->unref();
canvas.clear(SK_ColorTRANSPARENT);
SkRect r = SkRect::MakeWH(SkIntToScalar(kSize), SkIntToScalar(kSize));
« no previous file with comments | « gm/morphology.cpp ('k') | gm/offsetimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698