aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-04-27 10:47:51 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-27 10:47:51 -0700
commit6c7e325236b7fbb9c9b14ebb4715f88a59718695 (patch)
tree892db20f12b2f02968a3d67b54719aca3a84a8df /gm
parentb4bb7d825566042ed64697be49457dbac060e6c4 (diff)
Bring sk_sp to GrDrawContext
Diffstat (limited to 'gm')
-rw-r--r--gm/beziereffects.cpp6
-rw-r--r--gm/bigrrectaaeffect.cpp2
-rw-r--r--gm/constcolorprocessor.cpp2
-rw-r--r--gm/convexpolyeffect.cpp2
-rw-r--r--gm/rrects.cpp4
-rw-r--r--gm/texdata.cpp2
-rw-r--r--gm/texturedomaineffect.cpp2
-rw-r--r--gm/yuvtorgbeffect.cpp2
8 files changed, 11 insertions, 11 deletions
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index 61d3795225..015450895b 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -109,7 +109,7 @@ protected:
return;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt));
+ sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
if (!drawContext) {
return;
}
@@ -248,7 +248,7 @@ protected:
return;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt));
+ sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
if (!drawContext) {
return;
}
@@ -465,7 +465,7 @@ protected:
return;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt));
+ sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
if (!drawContext) {
return;
}
diff --git a/gm/bigrrectaaeffect.cpp b/gm/bigrrectaaeffect.cpp
index f4a1252368..b852961826 100644
--- a/gm/bigrrectaaeffect.cpp
+++ b/gm/bigrrectaaeffect.cpp
@@ -56,7 +56,7 @@ protected:
return;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt));
+ sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
if (!drawContext) {
return;
}
diff --git a/gm/constcolorprocessor.cpp b/gm/constcolorprocessor.cpp
index 37295c78cc..cfc03398f6 100644
--- a/gm/constcolorprocessor.cpp
+++ b/gm/constcolorprocessor.cpp
@@ -57,7 +57,7 @@ protected:
return;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt));
+ sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
if (!drawContext) {
return;
}
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 28a4d5e97b..0c4c94b3aa 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -163,7 +163,7 @@ protected:
return;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt));
+ sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
if (!drawContext) {
return;
}
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index d8b5e388eb..57c11ada56 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -66,14 +66,14 @@ protected:
#if SK_SUPPORT_GPU
GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
context = rt ? rt->getContext() : nullptr;
- SkAutoTUnref<GrDrawContext> drawContext;
+ sk_sp<GrDrawContext> drawContext;
if (kEffect_Type == fType) {
if (!context) {
skiagm::GM::DrawGpuOnlyMessage(canvas);
return;
}
- drawContext.reset(context->drawContext(rt));
+ drawContext = context->drawContext(sk_ref_sp(rt));
if (!drawContext) {
return;
}
diff --git a/gm/texdata.cpp b/gm/texdata.cpp
index 8e29b2389f..20cad0c739 100644
--- a/gm/texdata.cpp
+++ b/gm/texdata.cpp
@@ -21,7 +21,7 @@ static const int S = 200;
DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) {
GrRenderTarget* target = canvas->internal_private_accessTopLayerRenderTarget();
GrContext* ctx = canvas->getGrContext();
- SkAutoTUnref<GrDrawContext> drawContext(ctx ? ctx->drawContext(target) : nullptr);
+ sk_sp<GrDrawContext> drawContext(ctx ? ctx->drawContext(sk_ref_sp(target)) : nullptr);
if (drawContext && target) {
SkAutoTArray<SkPMColor> gTextureData((2 * S) * (2 * S));
static const int stride = 2 * S;
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index 89d3b44b7f..e4a02c15d9 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -80,7 +80,7 @@ protected:
return;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt));
+ sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
if (!drawContext) {
return;
}
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index 996e473e44..09c61765fb 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -79,7 +79,7 @@ protected:
return;
}
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt));
+ sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
if (!drawContext) {
return;
}