diff options
author | Robert Phillips <robertphillips@google.com> | 2018-06-07 11:05:56 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-08 11:55:11 +0000 |
commit | 88a32efa75cbc0fc6f84bc7a0522a94166a2ab13 (patch) | |
tree | 48ccbee45d39a1a62b1d54616b78fea564456eb1 /src/gpu/ccpr/GrCCDrawPathsOp.h | |
parent | 7a45dd1daca8de90f984591cf938dd089a7795a3 (diff) |
Add a factory to any GrOp-derived class that lacked one
All GrOp-derived classes are going to have allocate their memory in a GrMemoryPool.
Change-Id: Ifa410b05eecd9b68c39dcc15dd4298d617204c13
Reviewed-on: https://skia-review.googlesource.com/132828
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/ccpr/GrCCDrawPathsOp.h')
-rw-r--r-- | src/gpu/ccpr/GrCCDrawPathsOp.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.h b/src/gpu/ccpr/GrCCDrawPathsOp.h index 9189e5a757..f43ccd0e57 100644 --- a/src/gpu/ccpr/GrCCDrawPathsOp.h +++ b/src/gpu/ccpr/GrCCDrawPathsOp.h @@ -26,8 +26,13 @@ public: DEFINE_OP_CLASS_ID SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrCCDrawPathsOp); - GrCCDrawPathsOp(GrPaint&&, const SkIRect& clipIBounds, const SkMatrix&, const SkPath&, - const SkRect& devBounds); + static GrCCDrawPathsOp* Make(GrContext*, + GrPaint&&, + const SkIRect& clipIBounds, + const SkMatrix&, + const SkPath&, + const SkRect& devBounds); + ~GrCCDrawPathsOp() override; const char* name() const override { return "GrCCDrawOp"; } @@ -48,6 +53,9 @@ public: void onExecute(GrOpFlushState*) override; private: + GrCCDrawPathsOp(GrPaint&&, const SkIRect& clipIBounds, const SkMatrix&, const SkPath&, + const SkRect& devBounds); + struct AtlasBatch { const GrCCAtlas* fAtlas; int fEndInstanceIdx; |