aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2016-11-04 16:26:16 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-07 15:22:49 +0000
commitcefc43112c8f6fe3702facb89447bdfcc2715345 (patch)
treec3e11ec30078b70ebe3af01d2e841dac572d1112
parent2db83612576d64935bd88747cf9855e79cad70d4 (diff)
gm: s/SkAutoTUnref/sk_sp/
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4434 Change-Id: Ib2bea321617a17012190b33f2c7c439a5b6b3025 Reviewed-on: https://skia-review.googlesource.com/4434 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
-rw-r--r--gm/aaclip.cpp2
-rw-r--r--gm/all_bitmap_configs.cpp4
-rw-r--r--gm/beziereffects.cpp15
-rw-r--r--gm/bigrrectaaeffect.cpp4
-rw-r--r--gm/constcolorprocessor.cpp4
-rw-r--r--gm/convexpolyeffect.cpp8
-rw-r--r--gm/drawable.cpp10
-rw-r--r--gm/dstreadshuffle.cpp6
-rw-r--r--gm/fontmgr.cpp20
-rw-r--r--gm/fontscalerdistortable.cpp2
-rw-r--r--gm/gradients_no_texture.cpp2
-rw-r--r--gm/image.cpp2
-rw-r--r--gm/image_pict.cpp10
-rw-r--r--gm/rrects.cpp4
-rw-r--r--gm/showmiplevels.cpp4
-rw-r--r--gm/texdata.cpp2
-rw-r--r--gm/texturedomaineffect.cpp14
-rw-r--r--gm/verttext.cpp2
-rw-r--r--gm/yuvtorgbeffect.cpp26
19 files changed, 72 insertions, 69 deletions
diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp
index f00a4cdcec..dd83b7c730 100644
--- a/gm/aaclip.cpp
+++ b/gm/aaclip.cpp
@@ -182,7 +182,7 @@ static void test_image(SkCanvas* canvas, const SkImageInfo& info) {
SkBitmap bm;
bm.allocPixels(info);
- SkAutoTUnref<SkCanvas> newc(make_canvas(bm));
+ sk_sp<SkCanvas> newc(make_canvas(bm));
if (info.isOpaque()) {
bm.eraseColor(SK_ColorGREEN);
} else {
diff --git a/gm/all_bitmap_configs.cpp b/gm/all_bitmap_configs.cpp
index 90df5bb3e4..e954fc33e5 100644
--- a/gm/all_bitmap_configs.cpp
+++ b/gm/all_bitmap_configs.cpp
@@ -124,10 +124,10 @@ static SkBitmap indexed_bitmap() {
pmColors[i] = premultiply_color(colors[i]);
}
SkBitmap bm;
- SkAutoTUnref<SkColorTable> ctable(new SkColorTable(pmColors, SK_ARRAY_COUNT(pmColors)));
+ sk_sp<SkColorTable> ctable(new SkColorTable(pmColors, SK_ARRAY_COUNT(pmColors)));
SkImageInfo info = SkImageInfo::Make(SCALE, SCALE, kIndex_8_SkColorType,
kPremul_SkAlphaType);
- bm.allocPixels(info, nullptr, ctable);
+ bm.allocPixels(info, nullptr, ctable.get());
SkAutoLockPixels autoLockPixels1(n32bitmap);
SkAutoLockPixels autoLockPixels2(bm);
for (int y = 0; y < SCALE; ++y) {
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index 6c0049b004..3447df4106 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -192,10 +192,10 @@ protected:
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkBlendMode::kSrc));
- SkAutoTUnref<GrDrawBatch> batch(
- new BezierCubicOrConicTestBatch(gp, bounds, color, klmEqs, klmSigns[c]));
+ sk_sp<GrDrawBatch> batch = sk_make_sp<BezierCubicOrConicTestBatch>(
+ gp, bounds, color, klmEqs, klmSigns[c]);
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
}
++col;
if (numCols == col) {
@@ -324,10 +324,10 @@ protected:
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkBlendMode::kSrc));
- SkAutoTUnref<GrDrawBatch> batch(
+ sk_sp<GrDrawBatch> batch(
new BezierCubicOrConicTestBatch(gp, bounds, color, klmEqs, 1.f));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
}
++col;
if (numCols == col) {
@@ -536,10 +536,9 @@ protected:
GrPathUtils::QuadUVMatrix DevToUV(pts);
- SkAutoTUnref<GrDrawBatch> batch(
- new BezierQuadTestBatch(gp, bounds, color, DevToUV));
+ sk_sp<GrDrawBatch> batch(new BezierQuadTestBatch(gp, bounds, color, DevToUV));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
}
++col;
if (numCols == col) {
diff --git a/gm/bigrrectaaeffect.cpp b/gm/bigrrectaaeffect.cpp
index be37d70568..47e5a73384 100644
--- a/gm/bigrrectaaeffect.cpp
+++ b/gm/bigrrectaaeffect.cpp
@@ -87,10 +87,10 @@ protected:
SkRect bounds = testBounds;
bounds.offset(SkIntToScalar(x), SkIntToScalar(y));
- SkAutoTUnref<GrDrawBatch> batch(
+ sk_sp<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(0xff000000, SkMatrix::I(), bounds,
nullptr, nullptr));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
}
canvas->restore();
x = x + fTestOffsetX;
diff --git a/gm/constcolorprocessor.cpp b/gm/constcolorprocessor.cpp
index 53aca18872..f6a9dae0a5 100644
--- a/gm/constcolorprocessor.cpp
+++ b/gm/constcolorprocessor.cpp
@@ -109,10 +109,10 @@ protected:
grPaint.addColorFragmentProcessor(std::move(fp));
- SkAutoTUnref<GrDrawBatch> batch(
+ sk_sp<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(grPaint.getColor(), viewMatrix,
renderRect, nullptr, nullptr));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
// Draw labels for the input to the processor and the processor to the right of
// the test rect. The input label appears above the processor label.
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index d62838dd1e..fdeef299dd 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -183,9 +183,9 @@ protected:
grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkBlendMode::kSrc));
grPaint.addCoverageFragmentProcessor(std::move(fp));
- SkAutoTUnref<GrDrawBatch> batch(new PolyBoundsBatch(p.getBounds(), 0xff000000));
+ sk_sp<GrDrawBatch> batch(new PolyBoundsBatch(p.getBounds(), 0xff000000));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
x += SkScalarCeilToScalar(path->getBounds().width() + kDX);
}
@@ -222,9 +222,9 @@ protected:
grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkBlendMode::kSrc));
grPaint.addCoverageFragmentProcessor(std::move(fp));
- SkAutoTUnref<GrDrawBatch> batch(new PolyBoundsBatch(rect, 0xff000000));
+ sk_sp<GrDrawBatch> batch(new PolyBoundsBatch(rect, 0xff000000));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
x += SkScalarCeilToScalar(rect.width() + kDX);
}
diff --git a/gm/drawable.cpp b/gm/drawable.cpp
index c7bc76185b..9428e32c4d 100644
--- a/gm/drawable.cpp
+++ b/gm/drawable.cpp
@@ -32,16 +32,16 @@ struct MyDrawable : public SkDrawable {
* Test calling drawables w/ translate and matrices
*/
DEF_SIMPLE_GM(drawable, canvas, 180, 275) {
- SkAutoTUnref<SkDrawable> drawable(new MyDrawable);
+ sk_sp<SkDrawable> drawable(new MyDrawable);
canvas->translate(10, 10);
- canvas->drawDrawable(drawable);
- canvas->drawDrawable(drawable, 0, 150);
+ canvas->drawDrawable(drawable.get());
+ canvas->drawDrawable(drawable.get(), 0, 150);
SkMatrix m = SkMatrix::MakeScale(1.5f, 0.8f);
m.postTranslate(70, 0);
- canvas->drawDrawable(drawable, &m);
+ canvas->drawDrawable(drawable.get(), &m);
m.postTranslate(0, 150);
- canvas->drawDrawable(drawable, &m);
+ canvas->drawDrawable(drawable.get(), &m);
}
diff --git a/gm/dstreadshuffle.cpp b/gm/dstreadshuffle.cpp
index 72a68b1d9d..2c3cbc87f9 100644
--- a/gm/dstreadshuffle.cpp
+++ b/gm/dstreadshuffle.cpp
@@ -180,9 +180,9 @@ private:
enum {
kNumShapes = 100,
};
- SkAutoTUnref<SkShader> fBG;
- SkPath fConcavePath;
- SkPath fConvexPath;
+ sk_sp<SkShader> fBG;
+ SkPath fConcavePath;
+ SkPath fConvexPath;
static constexpr int kWidth = 900;
static constexpr int kHeight = 400;
typedef GM INHERITED;
diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp
index 50b83836f2..216fdd8249 100644
--- a/gm/fontmgr.cpp
+++ b/gm/fontmgr.cpp
@@ -86,7 +86,7 @@ protected:
paint.setSubpixelText(true);
paint.setTextSize(17);
- SkFontMgr* fm = fFM;
+ SkFontMgr* fm = fFM.get();
int count = SkMin32(fm->countFamilies(), MAX_FAMILIES);
for (int i = 0; i < count; ++i) {
@@ -97,7 +97,7 @@ protected:
SkScalar x = 220;
- SkAutoTUnref<SkFontStyleSet> set(fm->createStyleSet(i));
+ sk_sp<SkFontStyleSet> set(fm->createStyleSet(i));
for (int j = 0; j < set->count(); ++j) {
SkString sname;
SkFontStyle fs;
@@ -118,13 +118,13 @@ protected:
}
private:
- SkAutoTUnref<SkFontMgr> fFM;
+ sk_sp<SkFontMgr> fFM;
SkString fName;
typedef GM INHERITED;
};
class FontMgrMatchGM : public skiagm::GM {
- SkAutoTUnref<SkFontMgr> fFM;
+ sk_sp<SkFontMgr> fFM;
public:
FontMgrMatchGM() : fFM(SkFontMgr::RefDefault()) {
@@ -192,7 +192,7 @@ protected:
"Helvetica Neue", "Arial"
};
- SkAutoTUnref<SkFontStyleSet> fset;
+ sk_sp<SkFontStyleSet> fset;
for (size_t i = 0; i < SK_ARRAY_COUNT(gNames); ++i) {
fset.reset(fFM->matchFamily(gNames[i]));
if (fset->count() > 0) {
@@ -204,9 +204,9 @@ protected:
}
canvas->translate(20, 40);
- this->exploreFamily(canvas, paint, fset);
+ this->exploreFamily(canvas, paint, fset.get());
canvas->translate(150, 0);
- this->iterateFamily(canvas, paint, fset);
+ this->iterateFamily(canvas, paint, fset.get());
}
private:
@@ -263,7 +263,7 @@ protected:
const SkColor boundsColors[2] = { SK_ColorRED, SK_ColorBLUE };
- SkFontMgr* fm = fFM;
+ SkFontMgr* fm = fFM.get();
int count = SkMin32(fm->countFamilies(), 32);
int index = 0;
@@ -272,7 +272,7 @@ protected:
canvas->translate(80, 120);
for (int i = 0; i < count; ++i) {
- SkAutoTUnref<SkFontStyleSet> set(fm->createStyleSet(i));
+ sk_sp<SkFontStyleSet> set(fm->createStyleSet(i));
for (int j = 0; j < set->count(); ++j) {
paint.setTypeface(sk_sp<SkTypeface>(set->createTypeface(j)));
if (paint.getTypeface()) {
@@ -292,7 +292,7 @@ protected:
}
private:
- SkAutoTUnref<SkFontMgr> fFM;
+ sk_sp<SkFontMgr> fFM;
SkString fName;
SkScalar fScaleX, fSkewX;
typedef GM INHERITED;
diff --git a/gm/fontscalerdistortable.cpp b/gm/fontscalerdistortable.cpp
index 712400cbe1..c557ec573d 100644
--- a/gm/fontscalerdistortable.cpp
+++ b/gm/fontscalerdistortable.cpp
@@ -33,7 +33,7 @@ protected:
SkPaint paint;
paint.setAntiAlias(true);
paint.setLCDRenderText(true);
- SkAutoTUnref<SkFontMgr> fontMgr(SkFontMgr::RefDefault());
+ sk_sp<SkFontMgr> fontMgr(SkFontMgr::RefDefault());
std::unique_ptr<SkStreamAsset> distortable(GetResourceAsStream("/fonts/Distortable.ttf"));
if (!distortable) {
diff --git a/gm/gradients_no_texture.cpp b/gm/gradients_no_texture.cpp
index 5d0d4c9202..e012178450 100644
--- a/gm/gradients_no_texture.cpp
+++ b/gm/gradients_no_texture.cpp
@@ -215,7 +215,7 @@ class GradientsManyColorsGM : public GM {
enum {
W = 800,
};
- SkAutoTUnref<SkShader> fShader;
+ sk_sp<SkShader> fShader;
typedef void (*Proc)(ColorPos*);
public:
diff --git a/gm/image.cpp b/gm/image.cpp
index d15919e2be..5454ac3966 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -319,7 +319,7 @@ protected:
}
private:
- SkAutoTUnref<SkImage> fImg;
+ sk_sp<SkImage> fImg;
typedef SkImageGenerator INHERITED;
};
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp
index 2e2c284351..8cbd287f3b 100644
--- a/gm/image_pict.cpp
+++ b/gm/image_pict.cpp
@@ -189,8 +189,8 @@ static SkImageGenerator* make_ctable_generator(GrContext*, SkPicture* pic) {
SkImageInfo info = SkImageInfo::Make(100, 100, kIndex_8_SkColorType, kPremul_SkAlphaType);
SkBitmap bm2;
- SkAutoTUnref<SkColorTable> ct(new SkColorTable(colors, count));
- bm2.allocPixels(info, nullptr, ct);
+ sk_sp<SkColorTable> ct(new SkColorTable(colors, count));
+ bm2.allocPixels(info, nullptr, ct.get());
for (int y = 0; y < info.height(); ++y) {
for (int x = 0; x < info.width(); ++x) {
*bm2.getAddr8(x, y) = find_closest(*bm.getAddr32(x, y), colors, count);
@@ -239,12 +239,12 @@ protected:
desc.fHeight = subset->height();
GrTexture* dst = fCtx->textureProvider()->createTexture(desc, SkBudgeted::kNo);
- fCtx->copySurface(dst, fTexture, *subset, SkIPoint::Make(0, 0));
+ fCtx->copySurface(dst, fTexture.get(), *subset, SkIPoint::Make(0, 0));
return dst;
}
private:
- SkAutoTUnref<GrContext> fCtx;
- SkAutoTUnref<GrTexture> fTexture;
+ sk_sp<GrContext> fCtx;
+ sk_sp<GrTexture> fTexture;
};
static SkImageGenerator* make_tex_generator(GrContext* ctx, SkPicture* pic) {
const SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100);
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index c252ec6303..29e81bd298 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -115,10 +115,10 @@ protected:
SkRect bounds = rrect.getBounds();
bounds.outset(2.f, 2.f);
- SkAutoTUnref<GrDrawBatch> batch(
+ sk_sp<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(0xff000000, SkMatrix::I(),
bounds, nullptr, nullptr));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
} else {
drew = false;
}
diff --git a/gm/showmiplevels.cpp b/gm/showmiplevels.cpp
index 05395bd118..2386e1d3c1 100644
--- a/gm/showmiplevels.cpp
+++ b/gm/showmiplevels.cpp
@@ -140,7 +140,7 @@ protected:
baseBM.peekPixels(&prevPM);
SkSourceGammaTreatment treatment = SkSourceGammaTreatment::kIgnore;
- SkAutoTUnref<SkMipMap> mm(SkMipMap::Build(baseBM, treatment, nullptr));
+ sk_sp<SkMipMap> mm(SkMipMap::Build(baseBM, treatment, nullptr));
int index = 0;
SkMipMap::Level level;
@@ -251,7 +251,7 @@ protected:
SkScalar y = 4;
SkSourceGammaTreatment treatment = SkSourceGammaTreatment::kIgnore;
- SkAutoTUnref<SkMipMap> mm(SkMipMap::Build(baseBM, treatment, nullptr));
+ sk_sp<SkMipMap> mm(SkMipMap::Build(baseBM, treatment, nullptr));
int index = 0;
SkMipMap::Level level;
diff --git a/gm/texdata.cpp b/gm/texdata.cpp
index 05441ac4f1..4a74468ac5 100644
--- a/gm/texdata.cpp
+++ b/gm/texdata.cpp
@@ -81,7 +81,7 @@ DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) {
if (!texture) {
return;
}
- SkAutoTUnref<GrTexture> au(texture);
+ sk_sp<GrTexture> au(texture);
// setup new clip
GrFixedClip clip(SkIRect::MakeWH(2*S, 2*S));
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index 06c6518f5d..cac193b205 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -82,9 +82,9 @@ protected:
return;
}
- SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp,
- GrTextureParams::ClampNoFilter(),
- SkSourceGammaTreatment::kRespect));
+ sk_sp<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp,
+ GrTextureParams::ClampNoFilter(),
+ SkSourceGammaTreatment::kRespect));
if (!texture) {
return;
}
@@ -116,8 +116,8 @@ protected:
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkBlendMode::kSrc));
sk_sp<GrFragmentProcessor> fp(
- GrTextureDomainEffect::Make(texture, nullptr, textureMatrices[tm],
- GrTextureDomain::MakeTexelDomain(texture,
+ GrTextureDomainEffect::Make(texture.get(), nullptr, textureMatrices[tm],
+ GrTextureDomain::MakeTexelDomain(texture.get(),
texelDomains[d]),
mode, GrTextureParams::kNone_FilterMode));
@@ -127,10 +127,10 @@ protected:
const SkMatrix viewMatrix = SkMatrix::MakeTrans(x, y);
grPaint.addColorFragmentProcessor(std::move(fp));
- SkAutoTUnref<GrDrawBatch> batch(
+ sk_sp<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, viewMatrix,
renderRect, nullptr, nullptr));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
x += renderRect.width() + kTestPad;
}
y += renderRect.height() + kTestPad;
diff --git a/gm/verttext.cpp b/gm/verttext.cpp
index 700fb25e41..9c9ddb0e11 100644
--- a/gm/verttext.cpp
+++ b/gm/verttext.cpp
@@ -46,7 +46,7 @@ public:
{
}
- //SkAutoTUnref<SkTypeface> fFace;
+ //sk_sp<SkTypeface> fFace;
protected:
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index 34f5e2b7c5..e3b78a6b66 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -80,7 +80,7 @@ protected:
return;
}
- SkAutoTUnref<GrTexture> texture[3];
+ sk_sp<GrTexture> texture[3];
texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0],
GrTextureParams::ClampBilerp(),
SkSourceGammaTreatment::kRespect));
@@ -115,17 +115,21 @@ protected:
for (int i = 0; i < 6; ++i) {
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkBlendMode::kSrc));
- sk_sp<GrFragmentProcessor> fp(GrYUVEffect::MakeYUVToRGB(
- texture[indices[i][0]], texture[indices[i][1]], texture[indices[i][2]], sizes,
- static_cast<SkYUVColorSpace>(space), false));
+ sk_sp<GrFragmentProcessor> fp(
+ GrYUVEffect::MakeYUVToRGB(texture[indices[i][0]].get(),
+ texture[indices[i][1]].get(),
+ texture[indices[i][2]].get(),
+ sizes,
+ static_cast<SkYUVColorSpace>(space),
+ false));
if (fp) {
SkMatrix viewMatrix;
viewMatrix.setTranslate(x, y);
grPaint.addColorFragmentProcessor(std::move(fp));
- SkAutoTUnref<GrDrawBatch> batch(
+ sk_sp<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, viewMatrix,
renderRect, nullptr, nullptr));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
}
x += renderRect.width() + kTestPad;
}
@@ -201,7 +205,7 @@ protected:
return;
}
- SkAutoTUnref<GrTexture> texture[3];
+ sk_sp<GrTexture> texture[3];
texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], GrTextureParams::ClampBilerp(),
SkSourceGammaTreatment::kRespect));
texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], GrTextureParams::ClampBilerp(),
@@ -229,15 +233,15 @@ protected:
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkBlendMode::kSrc));
sk_sp<GrFragmentProcessor> fp(
- GrYUVEffect::MakeYUVToRGB(texture[0], texture[1], texture[2], sizes,
- static_cast<SkYUVColorSpace>(space), true));
+ GrYUVEffect::MakeYUVToRGB(texture[0].get(), texture[1].get(), texture[2].get(),
+ sizes, static_cast<SkYUVColorSpace>(space), true));
if (fp) {
SkMatrix viewMatrix;
viewMatrix.setTranslate(x, y);
grPaint.addColorFragmentProcessor(fp);
- SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(
+ sk_sp<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(
GrColor_WHITE, viewMatrix, renderRect, nullptr, nullptr));
- renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
}
}
}