aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/bleed.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-17 10:51:11 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-17 10:51:11 -0700
commit9ce9d6772df650ceb0511f275e1a83dffa78ff72 (patch)
tree1c0d54a75945863947490ec45cccf7c30eaa2ca4 /gm/bleed.cpp
parent42d95a0afb26560586232961445ba36de387ca37 (diff)
update callsites for Make image factories
not forced yet, as we still have the build-guard. waiting on chrome CL BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003 TBR= Review URL: https://codereview.chromium.org/1810813003
Diffstat (limited to 'gm/bleed.cpp')
-rw-r--r--gm/bleed.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/gm/bleed.cpp b/gm/bleed.cpp
index 5a04162938..c3d026a6e8 100644
--- a/gm/bleed.cpp
+++ b/gm/bleed.cpp
@@ -27,10 +27,10 @@ struct TestPixels {
kBitmap,
kImage
};
- Type fType;
- SkBitmap fBitmap;
- SkAutoTUnref<SkImage> fImage;
- SkIRect fRect; // The region of the bitmap/image that should be rendered.
+ Type fType;
+ SkBitmap fBitmap;
+ sk_sp<SkImage> fImage;
+ SkIRect fRect; // The region of the bitmap/image that should be rendered.
};
/** Creates a bitmap with two one-pixel rings around a checkerboard. The checkerboard is 2x2
@@ -130,7 +130,7 @@ static bool make_ringed_alpha_bitmap(GrContext* ctx, TestPixels* result, int wid
/** Helper to reuse above functions to produce images rather than bmps */
static void bmp_to_image(TestPixels* result) {
SkASSERT(TestPixels::kBitmap == result->fType);
- result->fImage.reset(SkImage::NewFromBitmap(result->fBitmap));
+ result->fImage = SkImage::MakeFromBitmap(result->fBitmap);
SkASSERT(result->fImage);
result->fType = TestPixels::kImage;
result->fBitmap.reset();
@@ -345,7 +345,7 @@ protected:
if (TestPixels::kBitmap == pixels.fType) {
canvas->drawBitmapRect(pixels.fBitmap, src, dst, paint, constraint);
} else {
- canvas->drawImageRect(pixels.fImage, src, dst, paint, constraint);
+ canvas->drawImageRect(pixels.fImage.get(), src, dst, paint, constraint);
}
}