aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessorUnitTest.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-08-11 09:40:37 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-11 14:13:26 +0000
commitaff329b8e9b239bca1d93b13a914fbef45ccf7fe (patch)
tree06ba42a557c6695f145bcf4956c981fc87af55ff /src/gpu/GrProcessorUnitTest.h
parente2cbd0451832ec71d1b498e0f64d02b7d096b2b7 (diff)
Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008 Reviewed-on: https://skia-review.googlesource.com/32760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrProcessorUnitTest.h')
-rw-r--r--src/gpu/GrProcessorUnitTest.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrProcessorUnitTest.h b/src/gpu/GrProcessorUnitTest.h
index 73a2cf3279..739b2f0c26 100644
--- a/src/gpu/GrProcessorUnitTest.h
+++ b/src/gpu/GrProcessorUnitTest.h
@@ -35,7 +35,7 @@ enum {
/** This allows parent FPs to implement a test create with known leaf children in order to avoid
creating an unbounded FP tree which may overflow various shader limits. */
-sk_sp<GrFragmentProcessor> MakeChildFP(GrProcessorTestData*);
+std::unique_ptr<GrFragmentProcessor> MakeChildFP(GrProcessorTestData*);
}
@@ -117,7 +117,7 @@ private:
static SkTArray<GrProcessorTestFactory<ProcessorSmartPtr>*, true>* GetFactories();
};
-using GrFragmentProcessorTestFactory = GrProcessorTestFactory<sk_sp<GrFragmentProcessor>>;
+using GrFragmentProcessorTestFactory = GrProcessorTestFactory<std::unique_ptr<GrFragmentProcessor>>;
using GrGeometryProcessorTestFactory = GrProcessorTestFactory<sk_sp<GrGeometryProcessor>>;
class GrXPFactoryTestFactory : private SkNoncopyable {
@@ -151,7 +151,7 @@ private:
#define GR_DECLARE_FRAGMENT_PROCESSOR_TEST \
static GrFragmentProcessorTestFactory gTestFactory SK_UNUSED; \
- static sk_sp<GrFragmentProcessor> TestCreate(GrProcessorTestData*);
+ static std::unique_ptr<GrFragmentProcessor> TestCreate(GrProcessorTestData*);
#define GR_DECLARE_XP_FACTORY_TEST \
static GrXPFactoryTestFactory gTestFactory SK_UNUSED; \
@@ -175,7 +175,7 @@ private:
// The unit test relies on static initializers. Just declare the TestCreate function so that
// its definitions will compile.
#define GR_DECLARE_FRAGMENT_PROCESSOR_TEST \
- static sk_sp<GrFragmentProcessor> TestCreate(GrProcessorTestData*);
+ static std::unique_ptr<GrFragmentProcessor> TestCreate(GrProcessorTestData*);
#define GR_DEFINE_FRAGMENT_PROCESSOR_TEST(X)
// The unit test relies on static initializers. Just declare the TestCreate function so that