aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SamplePathFuzz.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2016-11-12 08:06:55 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-13 18:31:13 +0000
commit5df4934b3e40cdc378e225d1dda39f015cae9bae (patch)
treef0871dcbca35730333ad3b14115e6a14987fac7b /samplecode/SamplePathFuzz.cpp
parentf982cb37e3092e7a69c13a12ec09806ceff5af45 (diff)
Revert[2] "Change SkCanvas to *not* inherit from SkRefCnt"
Changes over original: - conditionalize ownership in SkPictureRecorder - conditionalize ownership in SkCanvasStateUtils This reverts commit b613c266df48cf45296ecc23d1bd7098c84bb7ba. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4742 Change-Id: Ib25514d6f546c69b6650b5c957403b04f7380dc2 Reviewed-on: https://skia-review.googlesource.com/4742 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'samplecode/SamplePathFuzz.cpp')
-rw-r--r--samplecode/SamplePathFuzz.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/samplecode/SamplePathFuzz.cpp b/samplecode/SamplePathFuzz.cpp
index 05eb76fe21..b66b881547 100644
--- a/samplecode/SamplePathFuzz.cpp
+++ b/samplecode/SamplePathFuzz.cpp
@@ -629,8 +629,8 @@ static void path_fuzz_stroker(SkBitmap* bitmap, int seed) {
const SkPath& path = fuzzPath.getPath();
const SkPaint& paint = fuzzPath.getPaint();
const SkImageInfo& info = bitmap->info();
- SkCanvas* canvas(
- SkCanvas::NewRasterDirect(info, bitmap->getPixels(), bitmap->rowBytes()));
+ std::unique_ptr<SkCanvas> canvas(
+ SkCanvas::MakeRasterDirect(info, bitmap->getPixels(), bitmap->rowBytes()));
int w = info.width() / 4;
int h = info.height() / 4;
int x = localSeed / 4 % 4;