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
diff --git a/gm/imagetoyuvplanes.cpp b/gm/imagetoyuvplanes.cpp
index 87bff8e..ddead1b 100644
--- a/gm/imagetoyuvplanes.cpp
+++ b/gm/imagetoyuvplanes.cpp
@@ -12,7 +12,7 @@
#include "SkGradientShader.h"
#include "SkImage.h"
-static SkImage* create_image(GrContext* context, int width, int height) {
+static sk_sp<SkImage> create_image(GrContext* context, int width, int height) {
SkAutoTUnref<SkSurface> surface;
SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
if (context) {
@@ -33,7 +33,7 @@
SkShader::kMirror_TileMode));
surface->getCanvas()->drawPaint(paint);
- return surface->newImageSnapshot();
+ return surface->makeImageSnapshot();
}
DEF_SIMPLE_GM(image_to_yuv_planes, canvas, 120, 525) {
@@ -41,12 +41,12 @@
static const int kImageSize = 32;
GrContext *context = canvas->getGrContext();
- SkAutoTUnref<SkImage> rgbImage(create_image(context, kImageSize, kImageSize));
+ sk_sp<SkImage> rgbImage(create_image(context, kImageSize, kImageSize));
if (!rgbImage) {
return;
}
- canvas->drawImage(rgbImage, kPad, kPad);
+ canvas->drawImage(rgbImage.get(), kPad, kPad);
// Test cases where all three planes are the same size, where just u and v are the same size,
// and where all differ.
static const SkISize kSizes[][3] = {