diff options
author | 2017-01-03 09:42:58 -0500 | |
---|---|---|
committer | 2017-01-03 15:22:16 +0000 | |
commit | f8334781914363caf537f22f012fcd5c03c60dad (patch) | |
tree | cfa54aa4a80cd7841959300c245d633fbcd382a0 /src/gpu/GrDrawOpTest.h | |
parent | 5f500920e719b215d5e0e36a6679995ed3c9b4ad (diff) |
Remove ref counting from GrOp.
Instead use std::unique_ptr to manage GrOp lifetime.
Change-Id: Ic1dc1e0ffd7254c3994221f498677af5bbf66a71
Reviewed-on: https://skia-review.googlesource.com/6479
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrDrawOpTest.h')
-rw-r--r-- | src/gpu/GrDrawOpTest.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/GrDrawOpTest.h b/src/gpu/GrDrawOpTest.h index 0d88a40bf1..46abf18283 100644 --- a/src/gpu/GrDrawOpTest.h +++ b/src/gpu/GrDrawOpTest.h @@ -18,14 +18,15 @@ class GrContext; class SkRandom; /** This function returns a randomly configured GrDrawOp for testing purposes. */ -sk_sp<GrDrawOp> GrRandomDrawOp(SkRandom*, GrContext*); +std::unique_ptr<GrDrawOp> GrRandomDrawOp(SkRandom*, GrContext*); /** GrDrawOp subclasses should define test factory functions using this macro. */ -#define DRAW_OP_TEST_DEFINE(Op) sk_sp<GrDrawOp> Op##__Test(SkRandom* random, GrContext* context) +#define DRAW_OP_TEST_DEFINE(Op) \ + std::unique_ptr<GrDrawOp> Op##__Test(SkRandom* random, GrContext* context) /** This macro may be used if the test factory function must be made a friend of a class. */ #define DRAW_OP_TEST_FRIEND(Op) \ - friend sk_sp<GrDrawOp> Op##__Test(SkRandom* random, GrContext* context); + friend std::unique_ptr<GrDrawOp> Op##__Test(SkRandom* random, GrContext* context); #endif #endif |