Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 Google LLC |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrRenderTask_DEFINED |
| 9 | #define GrRenderTask_DEFINED |
| 10 | |
| 11 | #include "include/core/SkRefCnt.h" |
Brian Salomon | 07bc9a2 | 2020-12-02 13:37:16 -0500 | [diff] [blame] | 12 | #include "include/private/SkTArray.h" |
Adlai Holler | 7803608 | 2021-01-07 11:41:33 -0500 | [diff] [blame] | 13 | #include "src/core/SkTInternalLList.h" |
Greg Daniel | 16f5c65 | 2019-10-29 11:26:01 -0400 | [diff] [blame] | 14 | #include "src/gpu/GrSurfaceProxyView.h" |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 15 | #include "src/gpu/GrTextureProxy.h" |
Chris Dalton | 0875512 | 2019-08-05 16:13:47 -0600 | [diff] [blame] | 16 | #include "src/gpu/GrTextureResolveManager.h" |
Herb Derby | 082232b | 2020-06-10 15:08:18 -0400 | [diff] [blame] | 17 | #include "src/gpu/ops/GrOp.h" |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 18 | |
Adlai Holler | 08f5311 | 2021-01-20 17:44:15 -0500 | [diff] [blame] | 19 | class GrMockRenderTask; |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 20 | class GrOpFlushState; |
Greg Daniel | f41b2bd | 2019-08-22 16:19:24 -0400 | [diff] [blame] | 21 | class GrOpsTask; |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 22 | class GrResourceAllocator; |
Chris Dalton | e2a903e | 2019-09-18 13:41:50 -0600 | [diff] [blame] | 23 | class GrTextureResolveRenderTask; |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 24 | |
| 25 | // This class abstracts a task that targets a single GrSurfaceProxy, participates in the |
| 26 | // GrDrawingManager's DAG, and implements the onExecute method to modify its target proxy's |
Greg Daniel | f41b2bd | 2019-08-22 16:19:24 -0400 | [diff] [blame] | 27 | // contents. (e.g., an opsTask that executes a command buffer, a task to regenerate mipmaps, etc.) |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 28 | class GrRenderTask : public SkRefCnt { |
| 29 | public: |
Greg Daniel | 16f5c65 | 2019-10-29 11:26:01 -0400 | [diff] [blame] | 30 | GrRenderTask(); |
Adlai Holler | 33d569e | 2020-06-16 14:30:08 -0400 | [diff] [blame] | 31 | SkDEBUGCODE(~GrRenderTask() override); |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 32 | |
Chris Dalton | aa3cbb8 | 2019-08-21 00:01:21 -0600 | [diff] [blame] | 33 | void makeClosed(const GrCaps&); |
| 34 | |
Robert Phillips | 29f3854 | 2019-10-16 09:20:25 -0400 | [diff] [blame] | 35 | void prePrepare(GrRecordingContext* context) { this->onPrePrepare(context); } |
Robert Phillips | 7327c9d | 2019-10-08 16:32:56 -0400 | [diff] [blame] | 36 | |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 37 | // These two methods are only invoked at flush time |
Adlai Holler | 9e2c50e | 2021-02-09 14:41:52 -0500 | [diff] [blame] | 38 | void prepare(GrOpFlushState* flushState); |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 39 | bool execute(GrOpFlushState* flushState) { return this->onExecute(flushState); } |
| 40 | |
Robert Phillips | 07f675d | 2020-11-16 13:44:01 -0500 | [diff] [blame] | 41 | virtual bool requiresExplicitCleanup() const { return false; } |
| 42 | |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 43 | // Called when this class will survive a flush and needs to truncate its ops and start over. |
| 44 | // TODO: ultimately it should be invalid for an op list to survive a flush. |
| 45 | // https://bugs.chromium.org/p/skia/issues/detail?id=7111 |
Adlai Holler | d71b7b0 | 2020-06-08 15:55:00 -0400 | [diff] [blame] | 46 | virtual void endFlush(GrDrawingManager*) {} |
| 47 | |
| 48 | // This method "disowns" all the GrSurfaceProxies this RenderTask modifies. In |
| 49 | // practice this just means telling the drawingManager to forget the relevant |
| 50 | // mappings from surface proxy to last modifying rendertask. |
| 51 | virtual void disown(GrDrawingManager*); |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 52 | |
| 53 | bool isClosed() const { return this->isSetFlag(kClosed_Flag); } |
| 54 | |
Brian Salomon | d63638b | 2021-03-05 14:00:07 -0500 | [diff] [blame] | 55 | /** |
Adlai Holler | e9ea414 | 2021-04-27 14:31:56 -0400 | [diff] [blame^] | 56 | * Make this task skippable. This must be used purely for optimization purposes |
Brian Salomon | d63638b | 2021-03-05 14:00:07 -0500 | [diff] [blame] | 57 | * at this point as not all tasks will actually skip their work. It would be better if we could |
| 58 | * detect tasks that can be skipped automatically. We'd need to support minimal flushes (i.e., |
| 59 | * only flush that which is required for SkSurfaces/SkImages) and the ability to detect |
| 60 | * "orphaned tasks" and clean them out from the DAG so they don't indefinitely accumulate. |
| 61 | * Finally, we'd probably have to track whether a proxy's backing store was imported or ever |
| 62 | * exported to the client in case the client is doing direct reads outside of Skia and thus |
| 63 | * may require tasks targeting the proxy to execute even if our DAG contains no reads. |
| 64 | */ |
Adlai Holler | e9ea414 | 2021-04-27 14:31:56 -0400 | [diff] [blame^] | 65 | void makeSkippable(); |
| 66 | |
| 67 | bool isSkippable() const { return this->isSetFlag(kSkippable_Flag); } |
Brian Salomon | d63638b | 2021-03-05 14:00:07 -0500 | [diff] [blame] | 68 | |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 69 | /* |
| 70 | * Notify this GrRenderTask that it relies on the contents of 'dependedOn' |
| 71 | */ |
Brian Salomon | 7e67dca | 2020-07-21 09:27:25 -0400 | [diff] [blame] | 72 | void addDependency(GrDrawingManager*, GrSurfaceProxy* dependedOn, GrMipmapped, |
Adlai Holler | d71b7b0 | 2020-06-08 15:55:00 -0400 | [diff] [blame] | 73 | GrTextureResolveManager, const GrCaps& caps); |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 74 | |
| 75 | /* |
Greg Daniel | c30f1a9 | 2019-09-06 15:28:58 -0400 | [diff] [blame] | 76 | * Notify this GrRenderTask that it relies on the contents of all GrRenderTasks which otherTask |
| 77 | * depends on. |
| 78 | */ |
| 79 | void addDependenciesFromOtherTask(GrRenderTask* otherTask); |
| 80 | |
Adlai Holler | 08f5311 | 2021-01-20 17:44:15 -0500 | [diff] [blame] | 81 | SkSpan<GrRenderTask*> dependencies() { return SkSpan<GrRenderTask*>(fDependencies); } |
| 82 | |
Greg Daniel | c30f1a9 | 2019-09-06 15:28:58 -0400 | [diff] [blame] | 83 | /* |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 84 | * Does this renderTask depend on 'dependedOn'? |
| 85 | */ |
| 86 | bool dependsOn(const GrRenderTask* dependedOn) const; |
| 87 | |
Robert Phillips | 07f675d | 2020-11-16 13:44:01 -0500 | [diff] [blame] | 88 | virtual void gatherIDs(SkSTArray<8, uint32_t, true>* idArray) const { |
| 89 | idArray->push_back(fUniqueID); |
| 90 | } |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 91 | uint32_t uniqueID() const { return fUniqueID; } |
Robert Phillips | 07f675d | 2020-11-16 13:44:01 -0500 | [diff] [blame] | 92 | virtual int numTargets() const { return fTargets.count(); } |
Brian Salomon | 982127b | 2021-01-21 10:43:35 -0500 | [diff] [blame] | 93 | GrSurfaceProxy* target(int i) const { return fTargets[i].get(); } |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 94 | |
| 95 | /* |
Greg Daniel | f41b2bd | 2019-08-22 16:19:24 -0400 | [diff] [blame] | 96 | * Safely cast this GrRenderTask to a GrOpsTask (if possible). |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 97 | */ |
Greg Daniel | f41b2bd | 2019-08-22 16:19:24 -0400 | [diff] [blame] | 98 | virtual GrOpsTask* asOpsTask() { return nullptr; } |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 99 | |
John Stiles | 1e0136e | 2020-08-12 18:44:00 -0400 | [diff] [blame] | 100 | #if GR_TEST_UTILS |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 101 | /* |
| 102 | * Dump out the GrRenderTask dependency DAG |
| 103 | */ |
Robert Phillips | 047d5bb | 2021-01-08 13:39:19 -0500 | [diff] [blame] | 104 | virtual void dump(const SkString& label, |
| 105 | SkString indent, |
| 106 | bool printDependencies, |
| 107 | bool close) const; |
Robert Phillips | 44e2c5f | 2020-04-14 13:00:04 -0400 | [diff] [blame] | 108 | virtual const char* name() const = 0; |
John Stiles | 1e0136e | 2020-08-12 18:44:00 -0400 | [diff] [blame] | 109 | #endif |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 110 | |
John Stiles | 1e0136e | 2020-08-12 18:44:00 -0400 | [diff] [blame] | 111 | #ifdef SK_DEBUG |
Chris Dalton | c4b4735 | 2019-08-23 10:10:36 -0600 | [diff] [blame] | 112 | virtual int numClips() const { return 0; } |
| 113 | |
Michael Ludwig | fcdd061 | 2019-11-25 08:34:31 -0500 | [diff] [blame] | 114 | virtual void visitProxies_debugOnly(const GrOp::VisitProxyFunc&) const = 0; |
Chris Dalton | c4b4735 | 2019-08-23 10:10:36 -0600 | [diff] [blame] | 115 | |
Michael Ludwig | fcdd061 | 2019-11-25 08:34:31 -0500 | [diff] [blame] | 116 | void visitTargetAndSrcProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const { |
Chris Dalton | c4b4735 | 2019-08-23 10:10:36 -0600 | [diff] [blame] | 117 | this->visitProxies_debugOnly(fn); |
Brian Salomon | 982127b | 2021-01-21 10:43:35 -0500 | [diff] [blame] | 118 | for (const sk_sp<GrSurfaceProxy>& target : fTargets) { |
| 119 | fn(target.get(), GrMipmapped::kNo); |
Chris Dalton | e2a903e | 2019-09-18 13:41:50 -0600 | [diff] [blame] | 120 | } |
Chris Dalton | c4b4735 | 2019-08-23 10:10:36 -0600 | [diff] [blame] | 121 | } |
| 122 | #endif |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 123 | |
Robert Phillips | 07f675d | 2020-11-16 13:44:01 -0500 | [diff] [blame] | 124 | bool isUsed(GrSurfaceProxy* proxy) const { |
Brian Salomon | 982127b | 2021-01-21 10:43:35 -0500 | [diff] [blame] | 125 | for (const sk_sp<GrSurfaceProxy>& target : fTargets) { |
| 126 | if (target.get() == proxy) { |
Robert Phillips | 07f675d | 2020-11-16 13:44:01 -0500 | [diff] [blame] | 127 | return true; |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | return this->onIsUsed(proxy); |
| 132 | } |
| 133 | |
Robert Phillips | 9ef7e20 | 2020-11-17 13:11:09 -0500 | [diff] [blame] | 134 | // Feed proxy usage intervals to the GrResourceAllocator class |
| 135 | virtual void gatherProxyIntervals(GrResourceAllocator*) const = 0; |
| 136 | |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 137 | // In addition to just the GrSurface being allocated, has the stencil buffer been allocated (if |
| 138 | // it is required)? |
| 139 | bool isInstantiated() const; |
| 140 | |
Adlai Holler | 08f5311 | 2021-01-20 17:44:15 -0500 | [diff] [blame] | 141 | // Used by GrRenderTaskCluster. |
Adlai Holler | 7803608 | 2021-01-07 11:41:33 -0500 | [diff] [blame] | 142 | SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrRenderTask); |
| 143 | |
Robert Phillips | 9ef7e20 | 2020-11-17 13:11:09 -0500 | [diff] [blame] | 144 | protected: |
Adlai Holler | 9e2c50e | 2021-02-09 14:41:52 -0500 | [diff] [blame] | 145 | SkDEBUGCODE(bool deferredProxiesAreInstantiated() const;) |
| 146 | |
Adlai Holler | 33d569e | 2020-06-16 14:30:08 -0400 | [diff] [blame] | 147 | // Add a target surface proxy to the list of targets for this task. |
| 148 | // This also informs the drawing manager to update the lastRenderTask association. |
Brian Salomon | 982127b | 2021-01-21 10:43:35 -0500 | [diff] [blame] | 149 | void addTarget(GrDrawingManager*, sk_sp<GrSurfaceProxy>); |
| 150 | |
| 151 | // Helper that adds the proxy owned by a view. |
| 152 | void addTarget(GrDrawingManager* dm, const GrSurfaceProxyView& view) { |
| 153 | this->addTarget(dm, view.refProxy()); |
| 154 | } |
Adlai Holler | 33d569e | 2020-06-16 14:30:08 -0400 | [diff] [blame] | 155 | |
Chris Dalton | aa3cbb8 | 2019-08-21 00:01:21 -0600 | [diff] [blame] | 156 | enum class ExpectedOutcome : bool { |
| 157 | kTargetUnchanged, |
| 158 | kTargetDirty, |
| 159 | }; |
| 160 | |
Chris Dalton | 16a33c6 | 2019-09-24 22:19:17 -0600 | [diff] [blame] | 161 | // Performs any work to finalize this renderTask prior to execution. If returning |
| 162 | // ExpectedOutcome::kTargetDiry, the caller is also responsible to fill out the area it will |
| 163 | // modify in targetUpdateBounds. |
| 164 | // |
| 165 | // targetUpdateBounds must not extend beyond the proxy bounds. |
| 166 | virtual ExpectedOutcome onMakeClosed(const GrCaps&, SkIRect* targetUpdateBounds) = 0; |
Chris Dalton | aa3cbb8 | 2019-08-21 00:01:21 -0600 | [diff] [blame] | 167 | |
Brian Salomon | 982127b | 2021-01-21 10:43:35 -0500 | [diff] [blame] | 168 | SkSTArray<1, sk_sp<GrSurfaceProxy>> fTargets; |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 169 | |
Adlai Holler | 9e2c50e | 2021-02-09 14:41:52 -0500 | [diff] [blame] | 170 | // List of texture proxies whose contents are being prepared on a worker thread |
| 171 | // TODO: this list exists so we can fire off the proper upload when an renderTask begins |
| 172 | // executing. Can this be replaced? |
| 173 | SkTArray<GrTextureProxy*, true> fDeferredProxies; |
| 174 | |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 175 | enum Flags { |
Adlai Holler | d71b7b0 | 2020-06-08 15:55:00 -0400 | [diff] [blame] | 176 | kClosed_Flag = 0x01, //!< This task can't accept any more dependencies. |
| 177 | kDisowned_Flag = 0x02, //!< This task is disowned by its creating GrDrawingManager. |
Adlai Holler | e9ea414 | 2021-04-27 14:31:56 -0400 | [diff] [blame^] | 178 | kSkippable_Flag = 0x04, //!< This task is skippable. |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 179 | |
Adlai Holler | e9ea414 | 2021-04-27 14:31:56 -0400 | [diff] [blame^] | 180 | kWasOutput_Flag = 0x08, //!< Flag for topological sorting |
| 181 | kTempMark_Flag = 0x10, //!< Flag for topological sorting |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 182 | }; |
| 183 | |
| 184 | void setFlag(uint32_t flag) { |
| 185 | fFlags |= flag; |
| 186 | } |
| 187 | |
| 188 | void resetFlag(uint32_t flag) { |
| 189 | fFlags &= ~flag; |
| 190 | } |
| 191 | |
| 192 | bool isSetFlag(uint32_t flag) const { |
| 193 | return SkToBool(fFlags & flag); |
| 194 | } |
| 195 | |
Robert Phillips | 4dbff75 | 2020-11-18 12:16:31 -0500 | [diff] [blame] | 196 | void setIndex(uint32_t index) { |
| 197 | SkASSERT(!this->isSetFlag(kWasOutput_Flag)); |
Adlai Holler | e9ea414 | 2021-04-27 14:31:56 -0400 | [diff] [blame^] | 198 | SkASSERT(index < (1 << 27)); |
| 199 | fFlags |= index << 5; |
Robert Phillips | 4dbff75 | 2020-11-18 12:16:31 -0500 | [diff] [blame] | 200 | } |
| 201 | |
| 202 | uint32_t getIndex() const { |
| 203 | SkASSERT(this->isSetFlag(kWasOutput_Flag)); |
Adlai Holler | e9ea414 | 2021-04-27 14:31:56 -0400 | [diff] [blame^] | 204 | return fFlags >> 5; |
Robert Phillips | 4dbff75 | 2020-11-18 12:16:31 -0500 | [diff] [blame] | 205 | } |
| 206 | |
Robert Phillips | 9ef7e20 | 2020-11-17 13:11:09 -0500 | [diff] [blame] | 207 | private: |
| 208 | // for TopoSortTraits, fTextureResolveTask, closeThoseWhoDependOnMe, addDependency |
| 209 | friend class GrDrawingManager; |
Adlai Holler | 08f5311 | 2021-01-20 17:44:15 -0500 | [diff] [blame] | 210 | friend class GrMockRenderTask; |
Robert Phillips | 9ef7e20 | 2020-11-17 13:11:09 -0500 | [diff] [blame] | 211 | |
| 212 | // Derived classes can override to indicate usage of proxies _other than target proxies_. |
| 213 | // GrRenderTask itself will handle checking the target proxies. |
| 214 | virtual bool onIsUsed(GrSurfaceProxy*) const = 0; |
| 215 | |
| 216 | void addDependency(GrRenderTask* dependedOn); |
| 217 | void addDependent(GrRenderTask* dependent); |
Adlai Holler | 7803608 | 2021-01-07 11:41:33 -0500 | [diff] [blame] | 218 | SkDEBUGCODE(bool isDependent(const GrRenderTask* dependent) const;) |
Robert Phillips | 9ef7e20 | 2020-11-17 13:11:09 -0500 | [diff] [blame] | 219 | SkDEBUGCODE(void validate() const;) |
| 220 | void closeThoseWhoDependOnMe(const GrCaps&); |
| 221 | |
| 222 | static uint32_t CreateUniqueID(); |
| 223 | |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 224 | struct TopoSortTraits { |
Robert Phillips | 4dbff75 | 2020-11-18 12:16:31 -0500 | [diff] [blame] | 225 | static uint32_t GetIndex(GrRenderTask* renderTask) { |
| 226 | return renderTask->getIndex(); |
| 227 | } |
| 228 | static void Output(GrRenderTask* renderTask, uint32_t index) { |
| 229 | renderTask->setIndex(index); |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 230 | renderTask->setFlag(kWasOutput_Flag); |
| 231 | } |
| 232 | static bool WasOutput(const GrRenderTask* renderTask) { |
| 233 | return renderTask->isSetFlag(kWasOutput_Flag); |
| 234 | } |
| 235 | static void SetTempMark(GrRenderTask* renderTask) { |
| 236 | renderTask->setFlag(kTempMark_Flag); |
| 237 | } |
| 238 | static void ResetTempMark(GrRenderTask* renderTask) { |
| 239 | renderTask->resetFlag(kTempMark_Flag); |
| 240 | } |
| 241 | static bool IsTempMarked(const GrRenderTask* renderTask) { |
| 242 | return renderTask->isSetFlag(kTempMark_Flag); |
| 243 | } |
| 244 | static int NumDependencies(const GrRenderTask* renderTask) { |
| 245 | return renderTask->fDependencies.count(); |
| 246 | } |
| 247 | static GrRenderTask* Dependency(GrRenderTask* renderTask, int index) { |
| 248 | return renderTask->fDependencies[index]; |
| 249 | } |
| 250 | }; |
| 251 | |
Adlai Holler | e9ea414 | 2021-04-27 14:31:56 -0400 | [diff] [blame^] | 252 | virtual void onMakeSkippable() {} |
| 253 | virtual void onPrePrepare(GrRecordingContext*) {} // Only GrOpsTask currently overrides this |
| 254 | virtual void onPrepare(GrOpFlushState*) {} // GrOpsTask and GrDDLTask override this |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 255 | virtual bool onExecute(GrOpFlushState* flushState) = 0; |
| 256 | |
| 257 | const uint32_t fUniqueID; |
| 258 | uint32_t fFlags; |
| 259 | |
Greg Daniel | f41b2bd | 2019-08-22 16:19:24 -0400 | [diff] [blame] | 260 | // 'this' GrRenderTask relies on the output of the GrRenderTasks in 'fDependencies' |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 261 | SkSTArray<1, GrRenderTask*, true> fDependencies; |
Greg Daniel | f41b2bd | 2019-08-22 16:19:24 -0400 | [diff] [blame] | 262 | // 'this' GrRenderTask's output is relied on by the GrRenderTasks in 'fDependents' |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 263 | SkSTArray<1, GrRenderTask*, true> fDependents; |
Chris Dalton | e2a903e | 2019-09-18 13:41:50 -0600 | [diff] [blame] | 264 | |
| 265 | // For performance reasons, we should perform texture resolves back-to-back as much as possible. |
| 266 | // (http://skbug.com/9406). To accomplish this, we make and reuse one single resolve task for |
| 267 | // each render task, then add it as a dependency during makeClosed(). |
| 268 | GrTextureResolveRenderTask* fTextureResolveTask = nullptr; |
Adlai Holler | 96ead54 | 2020-06-26 08:50:14 -0400 | [diff] [blame] | 269 | |
| 270 | SkDEBUGCODE(GrDrawingManager *fDrawingMgr = nullptr;) |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 271 | }; |
| 272 | |
| 273 | #endif |