robertphillips | 76948d4 | 2016-05-04 12:47:41 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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. |
| 6 | */ |
| 7 | |
| 8 | #include "GrSurfaceProxy.h" |
Robert Phillips | b726d58 | 2017-03-09 16:36:32 -0500 | [diff] [blame] | 9 | #include "GrSurfaceProxyPriv.h" |
robertphillips | 76948d4 | 2016-05-04 12:47:41 -0700 | [diff] [blame] | 10 | |
Robert Phillips | 784b7bf | 2016-12-09 13:35:02 -0500 | [diff] [blame] | 11 | #include "GrCaps.h" |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 12 | #include "GrContext.h" |
| 13 | #include "GrContextPriv.h" |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 14 | #include "GrGpuResourcePriv.h" |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 15 | #include "GrOpList.h" |
Brian Osman | 32342f0 | 2017-03-04 08:12:46 -0500 | [diff] [blame] | 16 | #include "GrResourceProvider.h" |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 17 | #include "GrSurfaceContext.h" |
Robert Phillips | a4c41b3 | 2017-03-15 13:02:45 -0400 | [diff] [blame] | 18 | #include "GrTexturePriv.h" |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 19 | #include "GrTextureRenderTargetProxy.h" |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 20 | |
Robert Phillips | 93f1633 | 2016-11-23 19:37:13 -0500 | [diff] [blame] | 21 | #include "SkMathPriv.h" |
| 22 | |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 23 | GrSurfaceProxy::GrSurfaceProxy(sk_sp<GrSurface> surface, SkBackingFit fit) |
Brian Salomon | bb5711a | 2017-05-17 13:49:59 -0400 | [diff] [blame] | 24 | : INHERITED(std::move(surface)) |
| 25 | , fConfig(fTarget->config()) |
| 26 | , fWidth(fTarget->width()) |
| 27 | , fHeight(fTarget->height()) |
| 28 | , fOrigin(fTarget->origin()) |
| 29 | , fFit(fit) |
| 30 | , fBudgeted(fTarget->resourcePriv().isBudgeted()) |
| 31 | , fFlags(0) |
| 32 | , fUniqueID(fTarget->uniqueID()) // Note: converting from unique resource ID to a proxy ID! |
Brian Salomon | d17b4a6 | 2017-05-23 16:53:47 -0400 | [diff] [blame] | 33 | , fNeedsClear(false) |
Brian Salomon | bb5711a | 2017-05-17 13:49:59 -0400 | [diff] [blame] | 34 | , fGpuMemorySize(kInvalidGpuMemorySize) |
| 35 | , fLastOpList(nullptr) {} |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 36 | |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 37 | GrSurfaceProxy::~GrSurfaceProxy() { |
Robert Phillips | 6cdc22c | 2017-05-11 16:29:14 -0400 | [diff] [blame] | 38 | // For this to be deleted the opList that held a ref on it (if there was one) must have been |
| 39 | // deleted. Which would have cleared out this back pointer. |
| 40 | SkASSERT(!fLastOpList); |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 41 | } |
| 42 | |
Brian Salomon | bb5711a | 2017-05-17 13:49:59 -0400 | [diff] [blame] | 43 | GrSurface* GrSurfaceProxy::instantiateImpl(GrResourceProvider* resourceProvider, int sampleCnt, |
Brian Salomon | 081e0e6 | 2017-05-17 14:27:58 -0400 | [diff] [blame] | 44 | GrSurfaceFlags flags, bool isMipMapped, |
| 45 | SkDestinationSurfaceColorMode mipColorMode) { |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 46 | if (fTarget) { |
| 47 | return fTarget; |
| 48 | } |
Brian Salomon | bb5711a | 2017-05-17 13:49:59 -0400 | [diff] [blame] | 49 | GrSurfaceDesc desc; |
| 50 | desc.fConfig = fConfig; |
| 51 | desc.fWidth = fWidth; |
| 52 | desc.fHeight = fHeight; |
| 53 | desc.fOrigin = fOrigin; |
| 54 | desc.fSampleCnt = sampleCnt; |
| 55 | desc.fIsMipMapped = isMipMapped; |
| 56 | desc.fFlags = flags; |
Brian Salomon | d17b4a6 | 2017-05-23 16:53:47 -0400 | [diff] [blame] | 57 | if (fNeedsClear) { |
| 58 | desc.fFlags |= kPerformInitialClear_GrSurfaceFlag; |
| 59 | } |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 60 | |
| 61 | if (SkBackingFit::kApprox == fFit) { |
Brian Salomon | bb5711a | 2017-05-17 13:49:59 -0400 | [diff] [blame] | 62 | fTarget = resourceProvider->createApproxTexture(desc, fFlags); |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 63 | } else { |
Brian Salomon | bb5711a | 2017-05-17 13:49:59 -0400 | [diff] [blame] | 64 | fTarget = resourceProvider->createTexture(desc, fBudgeted, fFlags).release(); |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 65 | } |
| 66 | if (!fTarget) { |
| 67 | return nullptr; |
| 68 | } |
| 69 | |
Brian Salomon | 081e0e6 | 2017-05-17 14:27:58 -0400 | [diff] [blame] | 70 | fTarget->asTexture()->texturePriv().setMipColorMode(mipColorMode); |
robertphillips | 1125a03 | 2016-11-16 11:17:17 -0800 | [diff] [blame] | 71 | this->INHERITED::transferRefs(); |
| 72 | |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 73 | #ifdef SK_DEBUG |
| 74 | if (kInvalidGpuMemorySize != this->getRawGpuMemorySize_debugOnly()) { |
Robert Phillips | 784b7bf | 2016-12-09 13:35:02 -0500 | [diff] [blame] | 75 | SkASSERT(fTarget->gpuMemorySize() <= this->getRawGpuMemorySize_debugOnly()); |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 76 | } |
| 77 | #endif |
| 78 | |
| 79 | return fTarget; |
| 80 | } |
| 81 | |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 82 | void GrSurfaceProxy::setLastOpList(GrOpList* opList) { |
Robert Phillips | 6cdc22c | 2017-05-11 16:29:14 -0400 | [diff] [blame] | 83 | #ifdef SK_DEBUG |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 84 | if (fLastOpList) { |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 85 | SkASSERT(fLastOpList->isClosed()); |
Robert Phillips | 4a39504 | 2017-04-24 16:27:17 +0000 | [diff] [blame] | 86 | } |
Robert Phillips | 6cdc22c | 2017-05-11 16:29:14 -0400 | [diff] [blame] | 87 | #endif |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 88 | |
Robert Phillips | 6cdc22c | 2017-05-11 16:29:14 -0400 | [diff] [blame] | 89 | // Un-reffed |
| 90 | fLastOpList = opList; |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 91 | } |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 92 | |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 93 | GrRenderTargetOpList* GrSurfaceProxy::getLastRenderTargetOpList() { |
| 94 | return fLastOpList ? fLastOpList->asRenderTargetOpList() : nullptr; |
| 95 | } |
| 96 | |
| 97 | GrTextureOpList* GrSurfaceProxy::getLastTextureOpList() { |
| 98 | return fLastOpList ? fLastOpList->asTextureOpList() : nullptr; |
| 99 | } |
| 100 | |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 101 | sk_sp<GrSurfaceProxy> GrSurfaceProxy::MakeWrapped(sk_sp<GrSurface> surf) { |
Robert Phillips | bc7a4fb | 2017-01-23 15:30:35 -0500 | [diff] [blame] | 102 | if (!surf) { |
| 103 | return nullptr; |
| 104 | } |
| 105 | |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 106 | if (surf->asTexture()) { |
| 107 | if (surf->asRenderTarget()) { |
| 108 | return sk_sp<GrSurfaceProxy>(new GrTextureRenderTargetProxy(std::move(surf))); |
| 109 | } else { |
| 110 | return sk_sp<GrSurfaceProxy>(new GrTextureProxy(std::move(surf))); |
| 111 | } |
| 112 | } else { |
| 113 | SkASSERT(surf->asRenderTarget()); |
| 114 | |
| 115 | // Not texturable |
| 116 | return sk_sp<GrSurfaceProxy>(new GrRenderTargetProxy(std::move(surf))); |
| 117 | } |
| 118 | } |
| 119 | |
Robert Phillips | 63c6746 | 2017-02-15 14:19:01 -0500 | [diff] [blame] | 120 | sk_sp<GrTextureProxy> GrSurfaceProxy::MakeWrapped(sk_sp<GrTexture> tex) { |
| 121 | if (!tex) { |
| 122 | return nullptr; |
| 123 | } |
| 124 | |
| 125 | if (tex->asRenderTarget()) { |
| 126 | return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(std::move(tex))); |
| 127 | } else { |
| 128 | return sk_sp<GrTextureProxy>(new GrTextureProxy(std::move(tex))); |
| 129 | } |
| 130 | } |
| 131 | |
Brian Osman | 32342f0 | 2017-03-04 08:12:46 -0500 | [diff] [blame] | 132 | sk_sp<GrTextureProxy> GrSurfaceProxy::MakeDeferred(GrResourceProvider* resourceProvider, |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 133 | const GrSurfaceDesc& desc, |
| 134 | SkBackingFit fit, |
Robert Phillips | c787e49 | 2017-02-28 11:26:32 -0500 | [diff] [blame] | 135 | SkBudgeted budgeted, |
| 136 | uint32_t flags) { |
| 137 | SkASSERT(0 == flags || GrResourceProvider::kNoPendingIO_Flag == flags); |
| 138 | |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 139 | const GrCaps* caps = resourceProvider->caps(); |
| 140 | |
| 141 | // TODO: move this logic into GrResourceProvider! |
Robert Phillips | 8f741bb | 2017-01-31 17:25:29 -0500 | [diff] [blame] | 142 | // TODO: share this testing code with check_texture_creation_params |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 143 | if (!caps->isConfigTexturable(desc.fConfig)) { |
Robert Phillips | 8f741bb | 2017-01-31 17:25:29 -0500 | [diff] [blame] | 144 | return nullptr; |
| 145 | } |
| 146 | |
| 147 | bool willBeRT = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag); |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 148 | if (willBeRT && !caps->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) { |
Robert Phillips | 8f741bb | 2017-01-31 17:25:29 -0500 | [diff] [blame] | 149 | return nullptr; |
| 150 | } |
| 151 | |
| 152 | // We currently do not support multisampled textures |
| 153 | if (!willBeRT && desc.fSampleCnt > 0) { |
| 154 | return nullptr; |
| 155 | } |
| 156 | |
| 157 | int maxSize; |
| 158 | if (willBeRT) { |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 159 | maxSize = caps->maxRenderTargetSize(); |
Robert Phillips | 8f741bb | 2017-01-31 17:25:29 -0500 | [diff] [blame] | 160 | } else { |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 161 | maxSize = caps->maxTextureSize(); |
Robert Phillips | 8f741bb | 2017-01-31 17:25:29 -0500 | [diff] [blame] | 162 | } |
| 163 | |
Robert Phillips | 78de212 | 2017-04-26 07:44:26 -0400 | [diff] [blame] | 164 | if (desc.fWidth > maxSize || desc.fHeight > maxSize || desc.fWidth <= 0 || desc.fHeight <= 0) { |
Robert Phillips | 8f741bb | 2017-01-31 17:25:29 -0500 | [diff] [blame] | 165 | return nullptr; |
| 166 | } |
| 167 | |
Robert Phillips | 6520a69 | 2017-02-01 09:20:00 -0500 | [diff] [blame] | 168 | GrSurfaceDesc copyDesc = desc; |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 169 | copyDesc.fSampleCnt = SkTMin(desc.fSampleCnt, caps->maxSampleCount()); |
Robert Phillips | 6520a69 | 2017-02-01 09:20:00 -0500 | [diff] [blame] | 170 | |
Robert Phillips | 8f741bb | 2017-01-31 17:25:29 -0500 | [diff] [blame] | 171 | if (willBeRT) { |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 172 | // We know anything we instantiate later from this deferred path will be |
| 173 | // both texturable and renderable |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 174 | return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(*caps, copyDesc, fit, |
Robert Phillips | c787e49 | 2017-02-28 11:26:32 -0500 | [diff] [blame] | 175 | budgeted, flags)); |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 176 | } |
| 177 | |
Robert Phillips | 2f49314 | 2017-03-02 18:18:38 -0500 | [diff] [blame] | 178 | return sk_sp<GrTextureProxy>(new GrTextureProxy(copyDesc, fit, budgeted, nullptr, 0, flags)); |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 179 | } |
| 180 | |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 181 | sk_sp<GrTextureProxy> GrSurfaceProxy::MakeDeferred(GrResourceProvider* resourceProvider, |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 182 | const GrSurfaceDesc& desc, |
| 183 | SkBudgeted budgeted, |
| 184 | const void* srcData, |
| 185 | size_t rowBytes) { |
| 186 | if (srcData) { |
Robert Phillips | 45fdae1 | 2017-04-17 12:57:27 -0400 | [diff] [blame] | 187 | GrMipLevel mipLevel = { srcData, rowBytes }; |
| 188 | |
| 189 | return resourceProvider->createTextureProxy(desc, budgeted, mipLevel); |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 190 | } |
| 191 | |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 192 | return GrSurfaceProxy::MakeDeferred(resourceProvider, desc, SkBackingFit::kExact, budgeted); |
Robert Phillips | 3743013 | 2016-11-09 06:50:43 -0500 | [diff] [blame] | 193 | } |
| 194 | |
Greg Daniel | 7ef28f3 | 2017-04-20 16:41:55 +0000 | [diff] [blame] | 195 | sk_sp<GrTextureProxy> GrSurfaceProxy::MakeWrappedBackend(GrContext* context, |
| 196 | GrBackendTexture& backendTex, |
| 197 | GrSurfaceOrigin origin) { |
| 198 | sk_sp<GrTexture> tex(context->resourceProvider()->wrapBackendTexture( |
| 199 | backendTex, origin, kNone_GrBackendTextureFlag, 0)); |
Robert Phillips | 26caf89 | 2017-01-27 10:58:31 -0500 | [diff] [blame] | 200 | return GrSurfaceProxy::MakeWrapped(std::move(tex)); |
| 201 | } |
| 202 | |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 203 | #ifdef SK_DEBUG |
| 204 | void GrSurfaceProxy::validate(GrContext* context) const { |
| 205 | if (fTarget) { |
| 206 | SkASSERT(fTarget->getContext() == context); |
| 207 | } |
| 208 | |
| 209 | INHERITED::validate(); |
| 210 | } |
| 211 | #endif |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 212 | |
Robert Phillips | 63c6746 | 2017-02-15 14:19:01 -0500 | [diff] [blame] | 213 | sk_sp<GrTextureProxy> GrSurfaceProxy::Copy(GrContext* context, |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 214 | GrSurfaceProxy* src, |
| 215 | SkIRect srcRect, |
| 216 | SkBudgeted budgeted) { |
| 217 | if (!srcRect.intersect(SkIRect::MakeWH(src->width(), src->height()))) { |
| 218 | return nullptr; |
| 219 | } |
| 220 | |
Brian Salomon | 63e7973 | 2017-05-15 21:23:13 -0400 | [diff] [blame] | 221 | GrSurfaceDesc dstDesc; |
| 222 | dstDesc.fConfig = src->config(); |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 223 | dstDesc.fWidth = srcRect.width(); |
| 224 | dstDesc.fHeight = srcRect.height(); |
Brian Salomon | 63e7973 | 2017-05-15 21:23:13 -0400 | [diff] [blame] | 225 | dstDesc.fOrigin = src->origin(); |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 226 | |
| 227 | sk_sp<GrSurfaceContext> dstContext(context->contextPriv().makeDeferredSurfaceContext( |
| 228 | dstDesc, |
| 229 | SkBackingFit::kExact, |
| 230 | budgeted)); |
| 231 | if (!dstContext) { |
| 232 | return nullptr; |
| 233 | } |
| 234 | |
| 235 | if (!dstContext->copy(src, srcRect, SkIPoint::Make(0, 0))) { |
| 236 | return nullptr; |
| 237 | } |
| 238 | |
Robert Phillips | 63c6746 | 2017-02-15 14:19:01 -0500 | [diff] [blame] | 239 | return dstContext->asTextureProxyRef(); |
| 240 | } |
| 241 | |
| 242 | sk_sp<GrTextureProxy> GrSurfaceProxy::Copy(GrContext* context, GrSurfaceProxy* src, |
| 243 | SkBudgeted budgeted) { |
| 244 | return Copy(context, src, SkIRect::MakeWH(src->width(), src->height()), budgeted); |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 245 | } |
| 246 | |
Robert Phillips | d46697a | 2017-01-25 12:10:37 -0500 | [diff] [blame] | 247 | sk_sp<GrSurfaceContext> GrSurfaceProxy::TestCopy(GrContext* context, const GrSurfaceDesc& dstDesc, |
| 248 | GrSurfaceProxy* srcProxy) { |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 249 | |
| 250 | sk_sp<GrSurfaceContext> dstContext(context->contextPriv().makeDeferredSurfaceContext( |
| 251 | dstDesc, |
| 252 | SkBackingFit::kExact, |
Robert Phillips | d46697a | 2017-01-25 12:10:37 -0500 | [diff] [blame] | 253 | SkBudgeted::kYes)); |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 254 | if (!dstContext) { |
| 255 | return nullptr; |
| 256 | } |
| 257 | |
Robert Phillips | d46697a | 2017-01-25 12:10:37 -0500 | [diff] [blame] | 258 | if (!dstContext->copy(srcProxy)) { |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 259 | return nullptr; |
| 260 | } |
| 261 | |
Robert Phillips | d46697a | 2017-01-25 12:10:37 -0500 | [diff] [blame] | 262 | return dstContext; |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 263 | } |
Robert Phillips | b726d58 | 2017-03-09 16:36:32 -0500 | [diff] [blame] | 264 | |
Robert Phillips | 0ae6faa | 2017-03-21 16:22:00 -0400 | [diff] [blame] | 265 | void GrSurfaceProxyPriv::exactify() { |
| 266 | if (this->isExact()) { |
| 267 | return; |
| 268 | } |
| 269 | |
| 270 | SkASSERT(SkBackingFit::kApprox == fProxy->fFit); |
| 271 | |
| 272 | if (fProxy->fTarget) { |
| 273 | // The kApprox but already instantiated case. Setting the proxy's width & height to |
| 274 | // the instantiated width & height could have side-effects going forward, since we're |
| 275 | // obliterating the area of interest information. This call (exactify) only used |
| 276 | // when converting an SkSpecialImage to an SkImage so the proxy shouldn't be |
| 277 | // used for additional draws. |
Brian Salomon | bb5711a | 2017-05-17 13:49:59 -0400 | [diff] [blame] | 278 | fProxy->fWidth = fProxy->fTarget->width(); |
| 279 | fProxy->fHeight = fProxy->fTarget->height(); |
Robert Phillips | 0ae6faa | 2017-03-21 16:22:00 -0400 | [diff] [blame] | 280 | return; |
| 281 | } |
| 282 | |
| 283 | // The kApprox uninstantiated case. Making this proxy be exact should be okay. |
| 284 | // It could mess things up if prior decisions were based on the approximate size. |
| 285 | fProxy->fFit = SkBackingFit::kExact; |
| 286 | // If fGpuMemorySize is used when caching specialImages for the image filter DAG. If it has |
Robert Phillips | 6cdc22c | 2017-05-11 16:29:14 -0400 | [diff] [blame] | 287 | // already been computed we want to leave it alone so that amount will be removed when |
Robert Phillips | 0ae6faa | 2017-03-21 16:22:00 -0400 | [diff] [blame] | 288 | // the special image goes away. If it hasn't been computed yet it might as well compute the |
| 289 | // exact amount. |
| 290 | } |
| 291 | |