reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 2 | * Copyright 2010 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 8 | #ifndef GrRenderTargetOpList_DEFINED |
| 9 | #define GrRenderTargetOpList_DEFINED |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 10 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "include/core/SkMatrix.h" |
| 12 | #include "include/core/SkStrokeRec.h" |
| 13 | #include "include/core/SkTypes.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 14 | #include "include/private/SkTArray.h" |
Ben Wagner | 729a23f | 2019-05-17 16:29:34 -0400 | [diff] [blame] | 15 | #include "src/core/SkArenaAlloc.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 16 | #include "src/core/SkClipStack.h" |
| 17 | #include "src/core/SkStringUtils.h" |
| 18 | #include "src/core/SkTLazy.h" |
| 19 | #include "src/gpu/GrAppliedClip.h" |
Greg Daniel | f91aeb2 | 2019-06-18 09:58:02 -0400 | [diff] [blame] | 20 | #include "src/gpu/GrOpList.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 21 | #include "src/gpu/GrPathRendering.h" |
| 22 | #include "src/gpu/GrPrimitiveProcessor.h" |
| 23 | #include "src/gpu/ops/GrDrawOp.h" |
| 24 | #include "src/gpu/ops/GrOp.h" |
Scroggo | 97c88c2 | 2011-05-11 14:05:25 +0000 | [diff] [blame] | 25 | |
joshualitt | 086cee1 | 2016-01-12 06:45:24 -0800 | [diff] [blame] | 26 | class GrAuditTrail; |
Brian Salomon | 7dae46a | 2016-12-14 16:21:37 -0500 | [diff] [blame] | 27 | class GrClearOp; |
bsalomon | 4b91f76 | 2015-05-19 09:29:46 -0700 | [diff] [blame] | 28 | class GrCaps; |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 29 | class GrRenderTargetProxy; |
sugoi@google.com | 12b4e27 | 2012-12-06 20:13:11 +0000 | [diff] [blame] | 30 | |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 31 | class GrRenderTargetOpList final : public GrOpList { |
Brian Salomon | 54d212e | 2017-03-21 14:22:38 -0400 | [diff] [blame] | 32 | private: |
Robert Phillips | bb581ce | 2017-05-29 15:05:15 -0400 | [diff] [blame] | 33 | using DstProxy = GrXferProcessor::DstProxy; |
Brian Salomon | 54d212e | 2017-03-21 14:22:38 -0400 | [diff] [blame] | 34 | |
bsalomon@google.com | f660187 | 2012-08-28 21:11:35 +0000 | [diff] [blame] | 35 | public: |
Robert Phillips | 12c4629 | 2019-04-23 07:36:17 -0400 | [diff] [blame] | 36 | GrRenderTargetOpList(sk_sp<GrOpMemoryPool>, sk_sp<GrRenderTargetProxy>, GrAuditTrail*); |
bsalomon | a73239a | 2015-04-28 13:35:17 -0700 | [diff] [blame] | 37 | |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 38 | ~GrRenderTargetOpList() override; |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 39 | |
Robert Phillips | ee68365 | 2017-04-26 11:53:10 -0400 | [diff] [blame] | 40 | void makeClosed(const GrCaps& caps) override { |
Robert Phillips | f5442bb | 2017-04-17 14:18:34 -0400 | [diff] [blame] | 41 | if (this->isClosed()) { |
| 42 | return; |
| 43 | } |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 44 | |
Robert Phillips | ee68365 | 2017-04-26 11:53:10 -0400 | [diff] [blame] | 45 | this->forwardCombine(caps); |
Robert Phillips | f5442bb | 2017-04-17 14:18:34 -0400 | [diff] [blame] | 46 | |
Robert Phillips | ee68365 | 2017-04-26 11:53:10 -0400 | [diff] [blame] | 47 | INHERITED::makeClosed(caps); |
robertphillips | a106c62 | 2015-10-16 09:07:06 -0700 | [diff] [blame] | 48 | } |
bsalomon | aecc018 | 2016-03-07 11:50:44 -0800 | [diff] [blame] | 49 | |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 50 | bool isEmpty() const { return fOpChains.empty(); } |
Robert Phillips | f5442bb | 2017-04-17 14:18:34 -0400 | [diff] [blame] | 51 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 52 | /** |
bsalomon | a73239a | 2015-04-28 13:35:17 -0700 | [diff] [blame] | 53 | * Empties the draw buffer of any queued up draws. |
| 54 | */ |
Chris Dalton | a84cacf | 2017-10-04 10:30:29 -0600 | [diff] [blame] | 55 | void endFlush() override; |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 56 | |
bsalomon | a73239a | 2015-04-28 13:35:17 -0700 | [diff] [blame] | 57 | /** |
bsalomon | dc43898 | 2016-08-31 11:53:49 -0700 | [diff] [blame] | 58 | * Together these two functions flush all queued up draws to GrCommandBuffer. The return value |
Brian Salomon | 1e41f4a | 2016-12-07 15:05:04 -0500 | [diff] [blame] | 59 | * of executeOps() indicates whether any commands were actually issued to the GPU. |
bsalomon | a73239a | 2015-04-28 13:35:17 -0700 | [diff] [blame] | 60 | */ |
Brian Osman | 407b342 | 2017-08-22 15:01:32 -0400 | [diff] [blame] | 61 | void onPrepare(GrOpFlushState* flushState) override; |
| 62 | bool onExecute(GrOpFlushState* flushState) override; |
bsalomon | a73239a | 2015-04-28 13:35:17 -0700 | [diff] [blame] | 63 | |
Brian Salomon | 348a037 | 2018-10-31 10:42:18 -0400 | [diff] [blame] | 64 | void addOp(std::unique_ptr<GrOp> op, const GrCaps& caps) { |
Chris Dalton | 7eb5c0f | 2019-05-23 15:15:47 -0600 | [diff] [blame] | 65 | auto addDependency = [ &caps, this ] (GrSurfaceProxy* p, GrMipMapped) { |
Robert Phillips | b493eeb | 2017-09-13 13:10:52 -0400 | [diff] [blame] | 66 | this->addDependency(p, caps); |
| 67 | }; |
| 68 | |
| 69 | op->visitProxies(addDependency); |
| 70 | |
Chris Dalton | 945ee65 | 2019-01-23 09:10:36 -0700 | [diff] [blame] | 71 | this->recordOp(std::move(op), GrProcessorSet::EmptySetAnalysis(), nullptr, nullptr, caps); |
Brian Salomon | 54d212e | 2017-03-21 14:22:38 -0400 | [diff] [blame] | 72 | } |
Robert Phillips | b493eeb | 2017-09-13 13:10:52 -0400 | [diff] [blame] | 73 | |
Greg Daniel | cb32415 | 2019-02-25 11:36:53 -0500 | [diff] [blame] | 74 | void addWaitOp(std::unique_ptr<GrOp> op, const GrCaps& caps) { |
| 75 | fHasWaitOp= true; |
| 76 | this->addOp(std::move(op), caps); |
| 77 | } |
| 78 | |
Chris Dalton | 945ee65 | 2019-01-23 09:10:36 -0700 | [diff] [blame] | 79 | void addDrawOp(std::unique_ptr<GrDrawOp> op, const GrProcessorSet::Analysis& processorAnalysis, |
| 80 | GrAppliedClip&& clip, const DstProxy& dstProxy, const GrCaps& caps) { |
Chris Dalton | 7eb5c0f | 2019-05-23 15:15:47 -0600 | [diff] [blame] | 81 | auto addDependency = [ &caps, this ] (GrSurfaceProxy* p, GrMipMapped) { |
Robert Phillips | b493eeb | 2017-09-13 13:10:52 -0400 | [diff] [blame] | 82 | this->addDependency(p, caps); |
| 83 | }; |
| 84 | |
| 85 | op->visitProxies(addDependency); |
| 86 | clip.visitProxies(addDependency); |
Robert Phillips | 2739ab0 | 2018-07-27 07:35:55 -0400 | [diff] [blame] | 87 | if (dstProxy.proxy()) { |
Chris Dalton | 7eb5c0f | 2019-05-23 15:15:47 -0600 | [diff] [blame] | 88 | addDependency(dstProxy.proxy(), GrMipMapped::kNo); |
Robert Phillips | 2739ab0 | 2018-07-27 07:35:55 -0400 | [diff] [blame] | 89 | } |
Robert Phillips | b493eeb | 2017-09-13 13:10:52 -0400 | [diff] [blame] | 90 | |
Chris Dalton | 945ee65 | 2019-01-23 09:10:36 -0700 | [diff] [blame] | 91 | this->recordOp(std::move(op), processorAnalysis, clip.doesClip() ? &clip : nullptr, |
| 92 | &dstProxy, caps); |
Brian Salomon | 69868af | 2016-12-22 15:42:51 -0500 | [diff] [blame] | 93 | } |
robertphillips | 9199a9f | 2016-07-13 07:48:43 -0700 | [diff] [blame] | 94 | |
Robert Phillips | 380b90c | 2017-08-30 07:41:07 -0400 | [diff] [blame] | 95 | void discard(); |
| 96 | |
commit-bot@chromium.org | 28361fa | 2014-03-28 16:08:05 +0000 | [diff] [blame] | 97 | /** |
bsalomon@google.com | e4617bf | 2013-04-03 14:56:40 +0000 | [diff] [blame] | 98 | * Copies a pixel rectangle from one surface to another. This call may finalize |
| 99 | * reserved vertex/index data (as though a draw call was made). The src pixels |
| 100 | * copied are specified by srcRect. They are copied to a rect of the same |
| 101 | * size in dst with top left at dstPoint. If the src rect is clipped by the |
| 102 | * src bounds then pixel values in the dst rect corresponding to area clipped |
bsalomon | 6df8640 | 2015-06-01 10:41:49 -0700 | [diff] [blame] | 103 | * by the src rect are not overwritten. This method is not guaranteed to succeed |
bsalomon@google.com | e4617bf | 2013-04-03 14:56:40 +0000 | [diff] [blame] | 104 | * depending on the type of surface, configs, etc, and the backend-specific |
bsalomon | 6df8640 | 2015-06-01 10:41:49 -0700 | [diff] [blame] | 105 | * limitations. |
bsalomon@google.com | e4617bf | 2013-04-03 14:56:40 +0000 | [diff] [blame] | 106 | */ |
Robert Phillips | be9aff2 | 2019-02-15 11:33:22 -0500 | [diff] [blame] | 107 | bool copySurface(GrRecordingContext*, |
Robert Phillips | a16f6cb | 2017-06-01 11:06:13 -0400 | [diff] [blame] | 108 | GrSurfaceProxy* dst, |
Robert Phillips | bf25d43 | 2017-04-07 10:08:53 -0400 | [diff] [blame] | 109 | GrSurfaceProxy* src, |
bsalomon | f90a02b | 2014-11-26 12:28:00 -0800 | [diff] [blame] | 110 | const SkIRect& srcRect, |
Robert Phillips | 2de8cfa | 2017-06-28 10:33:41 -0400 | [diff] [blame] | 111 | const SkIPoint& dstPoint) override; |
robertphillips@google.com | ff17584 | 2012-05-14 19:31:39 +0000 | [diff] [blame] | 112 | |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 113 | GrRenderTargetOpList* asRenderTargetOpList() override { return this; } |
| 114 | |
Robert Phillips | 2748391 | 2018-04-20 12:43:18 -0400 | [diff] [blame] | 115 | SkDEBUGCODE(void dump(bool printDependencies) const override;) |
Robert Phillips | c84c030 | 2017-05-08 15:35:11 -0400 | [diff] [blame] | 116 | SkDEBUGCODE(int numClips() const override { return fNumClips; }) |
Chris Dalton | 706a6ff | 2017-11-29 22:01:06 -0700 | [diff] [blame] | 117 | SkDEBUGCODE(void visitProxies_debugOnly(const GrOp::VisitProxyFunc&) const;) |
Robert Phillips | c84c030 | 2017-05-08 15:35:11 -0400 | [diff] [blame] | 118 | |
Brian Salomon | 1354048 | 2018-07-09 10:31:47 -0400 | [diff] [blame] | 119 | private: |
Brian Salomon | c3833b4 | 2018-07-09 18:23:58 +0000 | [diff] [blame] | 120 | friend class GrRenderTargetContextPriv; // for stencil clip state. TODO: this is invasive |
| 121 | |
Michael Ludwig | c39d0c8 | 2019-01-15 10:03:43 -0500 | [diff] [blame] | 122 | // The RTC and RTOpList have to work together to handle buffer clears. In most cases, buffer |
| 123 | // clearing can be done natively, in which case the op list's load ops are sufficient. In other |
| 124 | // cases, draw ops must be used, which makes the RTC the best place for those decisions. This, |
| 125 | // however, requires that the RTC be able to coordinate with the op list to achieve similar ends |
| 126 | friend class GrRenderTargetContext; |
| 127 | |
Robert Phillips | 9313aa7 | 2019-04-09 18:41:27 -0400 | [diff] [blame] | 128 | bool onIsUsed(GrSurfaceProxy*) const override; |
| 129 | |
Michael Ludwig | 6e17f1d | 2019-05-15 14:00:20 +0000 | [diff] [blame] | 130 | // Must only be called if native stencil buffer clearing is enabled |
Chris Dalton | 6b98280 | 2019-06-27 13:53:46 -0600 | [diff] [blame^] | 131 | void setStencilLoadOp(GrLoadOp op) { fStencilLoadOp = op; } |
Michael Ludwig | c39d0c8 | 2019-01-15 10:03:43 -0500 | [diff] [blame] | 132 | // Must only be called if native color buffer clearing is enabled. |
| 133 | void setColorLoadOp(GrLoadOp op, const SkPMColor4f& color); |
| 134 | // Sets the clear color to transparent black |
| 135 | void setColorLoadOp(GrLoadOp op) { |
| 136 | static const SkPMColor4f kDefaultClearColor = {0.f, 0.f, 0.f, 0.f}; |
| 137 | this->setColorLoadOp(op, kDefaultClearColor); |
| 138 | } |
| 139 | |
Chris Dalton | 6b98280 | 2019-06-27 13:53:46 -0600 | [diff] [blame^] | 140 | enum class CanDiscardPreviousOps : bool { |
| 141 | kYes = true, |
| 142 | kNo = false |
| 143 | }; |
| 144 | |
Michael Ludwig | c39d0c8 | 2019-01-15 10:03:43 -0500 | [diff] [blame] | 145 | // Perform book-keeping for a fullscreen clear, regardless of how the clear is implemented later |
| 146 | // (i.e. setColorLoadOp(), adding a ClearOp, or adding a GrFillRectOp that covers the device). |
| 147 | // Returns true if the clear can be converted into a load op (barring device caps). |
Chris Dalton | 6b98280 | 2019-06-27 13:53:46 -0600 | [diff] [blame^] | 148 | bool resetForFullscreenClear(CanDiscardPreviousOps); |
Michael Ludwig | c39d0c8 | 2019-01-15 10:03:43 -0500 | [diff] [blame] | 149 | |
Robert Phillips | c994a93 | 2018-06-19 13:09:54 -0400 | [diff] [blame] | 150 | void deleteOps(); |
| 151 | |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 152 | class OpChain { |
| 153 | public: |
| 154 | OpChain(const OpChain&) = delete; |
| 155 | OpChain& operator=(const OpChain&) = delete; |
Chris Dalton | 945ee65 | 2019-01-23 09:10:36 -0700 | [diff] [blame] | 156 | OpChain(std::unique_ptr<GrOp>, GrProcessorSet::Analysis, GrAppliedClip*, const DstProxy*); |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 157 | |
| 158 | ~OpChain() { |
| 159 | // The ops are stored in a GrMemoryPool and must be explicitly deleted via the pool. |
| 160 | SkASSERT(fList.empty()); |
Brian Salomon | 54d212e | 2017-03-21 14:22:38 -0400 | [diff] [blame] | 161 | } |
Chris Dalton | 8816b93 | 2017-11-29 16:48:25 -0700 | [diff] [blame] | 162 | |
Chris Dalton | 1706cbf | 2019-05-21 19:35:29 -0600 | [diff] [blame] | 163 | void visitProxies(const GrOp::VisitProxyFunc&) const; |
Robert Phillips | c994a93 | 2018-06-19 13:09:54 -0400 | [diff] [blame] | 164 | |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 165 | GrOp* head() const { return fList.head(); } |
Robert Phillips | 7c525e6 | 2018-06-12 10:11:12 -0400 | [diff] [blame] | 166 | |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 167 | GrAppliedClip* appliedClip() const { return fAppliedClip; } |
| 168 | const DstProxy& dstProxy() const { return fDstProxy; } |
| 169 | const SkRect& bounds() const { return fBounds; } |
Chris Dalton | 8816b93 | 2017-11-29 16:48:25 -0700 | [diff] [blame] | 170 | |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 171 | // Deletes all the ops in the chain via the pool. |
| 172 | void deleteOps(GrOpMemoryPool* pool); |
| 173 | |
| 174 | // Attempts to move the ops from the passed chain to this chain at the head. Also attempts |
| 175 | // to merge ops between the chains. Upon success the passed chain is empty. |
| 176 | // Fails when the chains aren't of the same op type, have different clips or dst proxies. |
| 177 | bool prependChain(OpChain*, const GrCaps&, GrOpMemoryPool*, GrAuditTrail*); |
| 178 | |
| 179 | // Attempts to add 'op' to this chain either by merging or adding to the tail. Returns |
| 180 | // 'op' to the caller upon failure, otherwise null. Fails when the op and chain aren't of |
| 181 | // the same op type, have different clips or dst proxies. |
Chris Dalton | 945ee65 | 2019-01-23 09:10:36 -0700 | [diff] [blame] | 182 | std::unique_ptr<GrOp> appendOp(std::unique_ptr<GrOp> op, GrProcessorSet::Analysis, |
| 183 | const DstProxy*, const GrAppliedClip*, const GrCaps&, |
| 184 | GrOpMemoryPool*, GrAuditTrail*); |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 185 | |
| 186 | private: |
| 187 | class List { |
| 188 | public: |
| 189 | List() = default; |
| 190 | List(std::unique_ptr<GrOp>); |
| 191 | List(List&&); |
| 192 | List& operator=(List&& that); |
| 193 | |
| 194 | bool empty() const { return !SkToBool(fHead); } |
| 195 | GrOp* head() const { return fHead.get(); } |
| 196 | GrOp* tail() const { return fTail; } |
| 197 | |
| 198 | std::unique_ptr<GrOp> popHead(); |
| 199 | std::unique_ptr<GrOp> removeOp(GrOp* op); |
| 200 | void pushHead(std::unique_ptr<GrOp> op); |
| 201 | void pushTail(std::unique_ptr<GrOp>); |
| 202 | |
| 203 | void validate() const; |
| 204 | |
| 205 | private: |
| 206 | std::unique_ptr<GrOp> fHead; |
| 207 | GrOp* fTail = nullptr; |
| 208 | }; |
| 209 | |
| 210 | void validate() const; |
| 211 | |
Chris Dalton | 945ee65 | 2019-01-23 09:10:36 -0700 | [diff] [blame] | 212 | bool tryConcat(List*, GrProcessorSet::Analysis, const DstProxy&, const GrAppliedClip*, |
| 213 | const SkRect& bounds, const GrCaps&, GrOpMemoryPool*, GrAuditTrail*); |
Chris Dalton | 6f6ae6a | 2019-01-18 12:10:36 -0700 | [diff] [blame] | 214 | static List DoConcat(List, List, const GrCaps&, GrOpMemoryPool*, GrAuditTrail*); |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 215 | |
| 216 | List fList; |
Chris Dalton | 945ee65 | 2019-01-23 09:10:36 -0700 | [diff] [blame] | 217 | GrProcessorSet::Analysis fProcessorAnalysis; |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 218 | DstProxy fDstProxy; |
| 219 | GrAppliedClip* fAppliedClip; |
| 220 | SkRect fBounds; |
Brian Salomon | 54d212e | 2017-03-21 14:22:38 -0400 | [diff] [blame] | 221 | }; |
| 222 | |
Greg Daniel | aa3dfbe | 2018-01-29 10:34:25 -0500 | [diff] [blame] | 223 | void purgeOpsWithUninstantiatedProxies() override; |
| 224 | |
Robert Phillips | d375dbf | 2017-09-14 12:45:25 -0400 | [diff] [blame] | 225 | void gatherProxyIntervals(GrResourceAllocator*) const override; |
| 226 | |
Chris Dalton | 945ee65 | 2019-01-23 09:10:36 -0700 | [diff] [blame] | 227 | void recordOp(std::unique_ptr<GrOp>, GrProcessorSet::Analysis, GrAppliedClip*, const DstProxy*, |
| 228 | const GrCaps& caps); |
Brian Salomon | 2790c52 | 2016-12-09 16:32:23 -0500 | [diff] [blame] | 229 | |
Robert Phillips | ee68365 | 2017-04-26 11:53:10 -0400 | [diff] [blame] | 230 | void forwardCombine(const GrCaps&); |
bsalomon | ad792c1 | 2015-09-10 11:10:50 -0700 | [diff] [blame] | 231 | |
Michael Ludwig | 6e17f1d | 2019-05-15 14:00:20 +0000 | [diff] [blame] | 232 | uint32_t fLastClipStackGenID; |
| 233 | SkIRect fLastDevClipBounds; |
| 234 | int fLastClipNumAnalyticFPs; |
csmartdalton | 7cdda99 | 2016-11-01 07:03:03 -0700 | [diff] [blame] | 235 | |
Greg Daniel | cb32415 | 2019-02-25 11:36:53 -0500 | [diff] [blame] | 236 | // We must track if we have a wait op so that we don't delete the op when we have a full clear. |
| 237 | bool fHasWaitOp = false;; |
| 238 | |
Robert Phillips | 6cdc22c | 2017-05-11 16:29:14 -0400 | [diff] [blame] | 239 | // For ops/opList we have mean: 5 stdDev: 28 |
Brian Salomon | 588cec7 | 2018-11-14 13:56:37 -0500 | [diff] [blame] | 240 | SkSTArray<25, OpChain, true> fOpChains; |
Brian Salomon | 54d212e | 2017-03-21 14:22:38 -0400 | [diff] [blame] | 241 | |
Robert Phillips | f6d7eb1 | 2017-04-26 14:55:34 -0400 | [diff] [blame] | 242 | // MDB TODO: 4096 for the first allocation of the clip space will be huge overkill. |
| 243 | // Gather statistics to determine the correct size. |
Michael Ludwig | 6e17f1d | 2019-05-15 14:00:20 +0000 | [diff] [blame] | 244 | SkArenaAlloc fClipAllocator{4096}; |
| 245 | SkDEBUGCODE(int fNumClips;) |
Brian Salomon | 54d212e | 2017-03-21 14:22:38 -0400 | [diff] [blame] | 246 | |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 247 | typedef GrOpList INHERITED; |
joshualitt | 6db519c | 2014-10-29 08:48:18 -0700 | [diff] [blame] | 248 | }; |
| 249 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 250 | #endif |