Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 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 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 8 | #include "src/gpu/GrContextPriv.h" |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 9 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 10 | #include "include/gpu/GrContextThreadSafeProxy.h" |
| 11 | #include "include/gpu/GrTexture.h" |
Greg Daniel | f91aeb2 | 2019-06-18 09:58:02 -0400 | [diff] [blame] | 12 | #include "src/gpu/GrAuditTrail.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 13 | #include "src/gpu/GrContextThreadSafeProxyPriv.h" |
| 14 | #include "src/gpu/GrDrawingManager.h" |
| 15 | #include "src/gpu/GrGpu.h" |
| 16 | #include "src/gpu/GrMemoryPool.h" |
| 17 | #include "src/gpu/GrRenderTargetContext.h" |
Greg Daniel | 46e366a | 2019-12-16 14:38:36 -0500 | [diff] [blame] | 18 | #include "src/gpu/GrSurfaceContext.h" |
Greg Daniel | 46cfbc6 | 2019-06-07 11:43:30 -0400 | [diff] [blame] | 19 | #include "src/gpu/GrSurfaceContextPriv.h" |
Mike Klein | 4b432fa | 2019-06-06 11:44:05 -0500 | [diff] [blame] | 20 | #include "src/gpu/GrSurfacePriv.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 21 | #include "src/gpu/SkGr.h" |
Robert Phillips | 7f11fb5 | 2019-12-03 13:35:19 -0500 | [diff] [blame] | 22 | #include "src/gpu/effects/GrSkSLFP.h" |
Greg Daniel | 6eb8c24 | 2019-06-05 10:22:24 -0400 | [diff] [blame] | 23 | #include "src/gpu/effects/generated/GrConfigConversionEffect.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 24 | #include "src/gpu/text/GrTextBlobCache.h" |
| 25 | #include "src/image/SkImage_Base.h" |
| 26 | #include "src/image/SkImage_Gpu.h" |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 27 | |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 28 | #define ASSERT_OWNED_PROXY(P) \ |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 29 | SkASSERT(!(P) || !((P)->peekTexture()) || (P)->peekTexture()->getContext() == fContext) |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 30 | #define ASSERT_SINGLE_OWNER \ |
Robert Phillips | a41c685 | 2019-02-07 10:44:10 -0500 | [diff] [blame] | 31 | SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fContext->singleOwner());) |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 32 | #define RETURN_VALUE_IF_ABANDONED(value) if (fContext->abandoned()) { return (value); } |
| 33 | #define RETURN_IF_ABANDONED RETURN_VALUE_IF_ABANDONED(void) |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 34 | |
Robert Phillips | a41c685 | 2019-02-07 10:44:10 -0500 | [diff] [blame] | 35 | sk_sp<const GrCaps> GrContextPriv::refCaps() const { |
| 36 | return fContext->refCaps(); |
| 37 | } |
| 38 | |
Robert Phillips | c5058a6 | 2019-02-15 12:52:59 -0500 | [diff] [blame] | 39 | void GrContextPriv::addOnFlushCallbackObject(GrOnFlushCallbackObject* onFlushCBObject) { |
| 40 | fContext->addOnFlushCallbackObject(onFlushCBObject); |
| 41 | } |
| 42 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 43 | std::unique_ptr<GrRenderTargetContext> GrContextPriv::makeDeferredRenderTargetContext( |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 44 | SkBackingFit fit, |
| 45 | int width, |
| 46 | int height, |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 47 | GrColorType colorType, |
| 48 | sk_sp<SkColorSpace> colorSpace, |
| 49 | int sampleCnt, |
| 50 | GrMipMapped mipMapped, |
| 51 | GrSurfaceOrigin origin, |
| 52 | const SkSurfaceProps* surfaceProps, |
| 53 | SkBudgeted budgeted, |
Emircan Uysaler | 23ca4e7 | 2019-06-24 10:53:09 -0400 | [diff] [blame] | 54 | GrProtected isProtected) { |
Brian Salomon | 27ae52c | 2019-07-03 11:27:44 -0400 | [diff] [blame] | 55 | return fContext->makeDeferredRenderTargetContext(fit, width, height, colorType, |
Robert Phillips | b97da53 | 2019-02-12 15:24:12 -0500 | [diff] [blame] | 56 | std::move(colorSpace), sampleCnt, mipMapped, |
Emircan Uysaler | 23ca4e7 | 2019-06-24 10:53:09 -0400 | [diff] [blame] | 57 | origin, surfaceProps, budgeted, isProtected); |
Robert Phillips | b97da53 | 2019-02-12 15:24:12 -0500 | [diff] [blame] | 58 | } |
| 59 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 60 | std::unique_ptr<GrRenderTargetContext> GrContextPriv::makeDeferredRenderTargetContextWithFallback( |
Brian Salomon | 27ae52c | 2019-07-03 11:27:44 -0400 | [diff] [blame] | 61 | SkBackingFit fit, int width, int height, GrColorType colorType, |
| 62 | sk_sp<SkColorSpace> colorSpace, int sampleCnt, GrMipMapped mipMapped, |
Brian Osman | c248659 | 2019-09-20 13:32:51 -0400 | [diff] [blame] | 63 | GrSurfaceOrigin origin, const SkSurfaceProps* surfaceProps, SkBudgeted budgeted, |
| 64 | GrProtected isProtected) { |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 65 | return fContext->makeDeferredRenderTargetContextWithFallback( |
Brian Salomon | 27ae52c | 2019-07-03 11:27:44 -0400 | [diff] [blame] | 66 | fit, width, height, colorType, std::move(colorSpace), sampleCnt, mipMapped, origin, |
Brian Osman | c248659 | 2019-09-20 13:32:51 -0400 | [diff] [blame] | 67 | surfaceProps, budgeted, isProtected); |
Robert Phillips | 6f0e02f | 2019-02-13 11:02:28 -0500 | [diff] [blame] | 68 | } |
| 69 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 70 | std::unique_ptr<GrRenderTargetContext> GrContextPriv::makeBackendTextureRenderTargetContext( |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 71 | const GrBackendTexture& tex, |
| 72 | GrSurfaceOrigin origin, |
| 73 | int sampleCnt, |
| 74 | GrColorType colorType, |
| 75 | sk_sp<SkColorSpace> colorSpace, |
| 76 | const SkSurfaceProps* props, |
| 77 | ReleaseProc releaseProc, |
| 78 | ReleaseContext releaseCtx) { |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 79 | ASSERT_SINGLE_OWNER |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 80 | SkASSERT(sampleCnt > 0); |
| 81 | |
| 82 | sk_sp<GrTextureProxy> proxy(this->proxyProvider()->wrapRenderableBackendTexture( |
Robert Phillips | 0902c98 | 2019-07-16 07:47:56 -0400 | [diff] [blame] | 83 | tex, origin, sampleCnt, colorType, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo, |
| 84 | releaseProc, releaseCtx)); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 85 | if (!proxy) { |
| 86 | return nullptr; |
| 87 | } |
| 88 | |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 89 | return this->drawingManager()->makeRenderTargetContext(std::move(proxy), colorType, |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 90 | std::move(colorSpace), props); |
| 91 | } |
| 92 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 93 | std::unique_ptr<GrRenderTargetContext> GrContextPriv::makeBackendRenderTargetRenderTargetContext( |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 94 | const GrBackendRenderTarget& backendRT, |
| 95 | GrSurfaceOrigin origin, |
| 96 | GrColorType colorType, |
| 97 | sk_sp<SkColorSpace> colorSpace, |
| 98 | const SkSurfaceProps* surfaceProps, |
| 99 | ReleaseProc releaseProc, |
| 100 | ReleaseContext releaseCtx) { |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 101 | ASSERT_SINGLE_OWNER |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 102 | |
| 103 | sk_sp<GrSurfaceProxy> proxy = this->proxyProvider()->wrapBackendRenderTarget( |
Robert Phillips | c80b0e9 | 2019-07-23 10:27:09 -0400 | [diff] [blame] | 104 | backendRT, colorType, origin, releaseProc, releaseCtx); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 105 | if (!proxy) { |
| 106 | return nullptr; |
| 107 | } |
| 108 | |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 109 | return this->drawingManager()->makeRenderTargetContext(std::move(proxy), colorType, |
| 110 | std::move(colorSpace), surfaceProps); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 111 | } |
| 112 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 113 | std::unique_ptr<GrRenderTargetContext> |
| 114 | GrContextPriv::makeBackendTextureAsRenderTargetRenderTargetContext(const GrBackendTexture& tex, |
| 115 | GrSurfaceOrigin origin, |
| 116 | int sampleCnt, |
| 117 | GrColorType colorType, |
| 118 | sk_sp<SkColorSpace> colorSpace, |
| 119 | const SkSurfaceProps* props) { |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 120 | ASSERT_SINGLE_OWNER |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 121 | SkASSERT(sampleCnt > 0); |
| 122 | sk_sp<GrSurfaceProxy> proxy( |
Robert Phillips | c80b0e9 | 2019-07-23 10:27:09 -0400 | [diff] [blame] | 123 | this->proxyProvider()->wrapBackendTextureAsRenderTarget(tex, colorType, |
| 124 | origin, sampleCnt)); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 125 | if (!proxy) { |
| 126 | return nullptr; |
| 127 | } |
| 128 | |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 129 | return this->drawingManager()->makeRenderTargetContext(std::move(proxy), colorType, |
| 130 | std::move(colorSpace), props); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 131 | } |
| 132 | |
Brian Salomon | bf6b979 | 2019-08-21 09:38:10 -0400 | [diff] [blame] | 133 | std::unique_ptr<GrRenderTargetContext> GrContextPriv::makeVulkanSecondaryCBRenderTargetContext( |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 134 | const SkImageInfo& imageInfo, const GrVkDrawableInfo& vkInfo, const SkSurfaceProps* props) { |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 135 | ASSERT_SINGLE_OWNER |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 136 | sk_sp<GrSurfaceProxy> proxy( |
| 137 | this->proxyProvider()->wrapVulkanSecondaryCBAsRenderTarget(imageInfo, vkInfo)); |
| 138 | if (!proxy) { |
| 139 | return nullptr; |
| 140 | } |
| 141 | |
Brian Salomon | d628747 | 2019-06-24 15:50:07 -0400 | [diff] [blame] | 142 | return this->drawingManager()->makeRenderTargetContext( |
| 143 | std::move(proxy), |
| 144 | SkColorTypeToGrColorType(imageInfo.colorType()), |
| 145 | imageInfo.refColorSpace(), |
| 146 | props); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 147 | } |
| 148 | |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 149 | GrSemaphoresSubmitted GrContextPriv::flushSurfaces(GrSurfaceProxy* proxies[], int numProxies, |
| 150 | const GrFlushInfo& info) { |
| 151 | ASSERT_SINGLE_OWNER |
| 152 | RETURN_VALUE_IF_ABANDONED(GrSemaphoresSubmitted::kNo) |
| 153 | GR_CREATE_TRACE_MARKER_CONTEXT("GrContextPriv", "flushSurfaces", fContext); |
| 154 | SkASSERT(numProxies >= 0); |
| 155 | SkASSERT(!numProxies || proxies); |
| 156 | for (int i = 0; i < numProxies; ++i) { |
| 157 | SkASSERT(proxies[i]); |
| 158 | ASSERT_OWNED_PROXY(proxies[i]); |
| 159 | } |
| 160 | return fContext->drawingManager()->flushSurfaces( |
| 161 | proxies, numProxies, SkSurface::BackendSurfaceAccess::kNoAccess, info); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 162 | } |
| 163 | |
Brian Salomon | 693bc2b | 2019-05-09 13:48:00 +0000 | [diff] [blame] | 164 | void GrContextPriv::flushSurface(GrSurfaceProxy* proxy) { |
Brian Salomon | f9a1fdf | 2019-05-09 10:30:12 -0400 | [diff] [blame] | 165 | this->flushSurfaces(proxy ? &proxy : nullptr, proxy ? 1 : 0, {}); |
Brian Salomon | 693bc2b | 2019-05-09 13:48:00 +0000 | [diff] [blame] | 166 | } |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 167 | |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 168 | void GrContextPriv::moveRenderTasksToDDL(SkDeferredDisplayList* ddl) { |
| 169 | fContext->drawingManager()->moveRenderTasksToDDL(ddl); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 170 | } |
| 171 | |
Chris Dalton | 6b49810 | 2019-08-01 14:14:52 -0600 | [diff] [blame] | 172 | void GrContextPriv::copyRenderTasksFromDDL(const SkDeferredDisplayList* ddl, |
| 173 | GrRenderTargetProxy* newDest) { |
| 174 | fContext->drawingManager()->copyRenderTasksFromDDL(ddl, newDest); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 175 | } |
| 176 | |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 177 | ////////////////////////////////////////////////////////////////////////////// |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 178 | |
| 179 | #if GR_TEST_UTILS |
| 180 | void GrContextPriv::resetGpuStats() const { |
| 181 | #if GR_GPU_STATS |
| 182 | fContext->fGpu->stats()->reset(); |
| 183 | #endif |
| 184 | } |
| 185 | |
| 186 | void GrContextPriv::dumpCacheStats(SkString* out) const { |
| 187 | #if GR_CACHE_STATS |
| 188 | fContext->fResourceCache->dumpStats(out); |
| 189 | #endif |
| 190 | } |
| 191 | |
| 192 | void GrContextPriv::dumpCacheStatsKeyValuePairs(SkTArray<SkString>* keys, |
| 193 | SkTArray<double>* values) const { |
| 194 | #if GR_CACHE_STATS |
| 195 | fContext->fResourceCache->dumpStatsKeyValuePairs(keys, values); |
| 196 | #endif |
| 197 | } |
| 198 | |
| 199 | void GrContextPriv::printCacheStats() const { |
| 200 | SkString out; |
| 201 | this->dumpCacheStats(&out); |
| 202 | SkDebugf("%s", out.c_str()); |
| 203 | } |
| 204 | |
| 205 | void GrContextPriv::dumpGpuStats(SkString* out) const { |
| 206 | #if GR_GPU_STATS |
| 207 | return fContext->fGpu->stats()->dump(out); |
| 208 | #endif |
| 209 | } |
| 210 | |
| 211 | void GrContextPriv::dumpGpuStatsKeyValuePairs(SkTArray<SkString>* keys, |
| 212 | SkTArray<double>* values) const { |
| 213 | #if GR_GPU_STATS |
| 214 | return fContext->fGpu->stats()->dumpKeyValuePairs(keys, values); |
| 215 | #endif |
| 216 | } |
| 217 | |
| 218 | void GrContextPriv::printGpuStats() const { |
| 219 | SkString out; |
| 220 | this->dumpGpuStats(&out); |
| 221 | SkDebugf("%s", out.c_str()); |
| 222 | } |
| 223 | |
| 224 | void GrContextPriv::testingOnly_setTextBlobCacheLimit(size_t bytes) { |
Robert Phillips | 2184fb7 | 2019-02-21 16:11:41 -0500 | [diff] [blame] | 225 | fContext->priv().getTextBlobCache()->setBudget(bytes); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 226 | } |
| 227 | |
| 228 | sk_sp<SkImage> GrContextPriv::testingOnly_getFontAtlasImage(GrMaskFormat format, unsigned int index) { |
| 229 | auto atlasManager = this->getAtlasManager(); |
| 230 | if (!atlasManager) { |
| 231 | return nullptr; |
| 232 | } |
| 233 | |
| 234 | unsigned int numActiveProxies; |
Greg Daniel | 9715b6c | 2019-12-10 15:03:10 -0500 | [diff] [blame] | 235 | const GrSurfaceProxyView* views = atlasManager->getViews(format, &numActiveProxies); |
| 236 | if (index >= numActiveProxies || !views || !views[index].proxy()) { |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 237 | return nullptr; |
| 238 | } |
| 239 | |
Greg Daniel | 9715b6c | 2019-12-10 15:03:10 -0500 | [diff] [blame] | 240 | SkASSERT(views[index].proxy()->priv().isExact()); |
Brian Salomon | 729fc0c | 2019-09-30 16:33:11 +0000 | [diff] [blame] | 241 | sk_sp<SkImage> image(new SkImage_Gpu(sk_ref_sp(fContext), kNeedNewImageUniqueID, |
Greg Daniel | 81b9897 | 2019-12-13 11:09:43 -0500 | [diff] [blame] | 242 | kPremul_SkAlphaType, views[index], nullptr)); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 243 | return image; |
| 244 | } |
| 245 | |
| 246 | void GrContextPriv::testingOnly_purgeAllUnlockedResources() { |
| 247 | fContext->fResourceCache->purgeAllUnlocked(); |
| 248 | } |
| 249 | |
| 250 | void GrContextPriv::testingOnly_flushAndRemoveOnFlushCallbackObject(GrOnFlushCallbackObject* cb) { |
| 251 | fContext->flush(); |
Robert Phillips | 292a6b2 | 2019-02-14 14:49:02 -0500 | [diff] [blame] | 252 | fContext->drawingManager()->testingOnly_removeOnFlushCallbackObject(cb); |
Robert Phillips | dbaf317 | 2019-02-06 15:12:53 -0500 | [diff] [blame] | 253 | } |
| 254 | #endif |
Greg Daniel | 6eb8c24 | 2019-06-05 10:22:24 -0400 | [diff] [blame] | 255 | |
| 256 | bool GrContextPriv::validPMUPMConversionExists() { |
| 257 | ASSERT_SINGLE_OWNER |
| 258 | if (!fContext->fDidTestPMConversions) { |
| 259 | fContext->fPMUPMConversionsRoundTrip = |
| 260 | GrConfigConversionEffect::TestForPreservingPMConversions(fContext); |
| 261 | fContext->fDidTestPMConversions = true; |
| 262 | } |
| 263 | |
| 264 | // The PM<->UPM tests fail or succeed together so we only need to check one. |
| 265 | return fContext->fPMUPMConversionsRoundTrip; |
| 266 | } |
| 267 | |
| 268 | std::unique_ptr<GrFragmentProcessor> GrContextPriv::createPMToUPMEffect( |
| 269 | std::unique_ptr<GrFragmentProcessor> fp) { |
| 270 | ASSERT_SINGLE_OWNER |
| 271 | // We should have already called this->priv().validPMUPMConversionExists() in this case |
| 272 | SkASSERT(fContext->fDidTestPMConversions); |
| 273 | // ...and it should have succeeded |
| 274 | SkASSERT(this->validPMUPMConversionExists()); |
| 275 | |
| 276 | return GrConfigConversionEffect::Make(std::move(fp), PMConversion::kToUnpremul); |
| 277 | } |
| 278 | |
| 279 | std::unique_ptr<GrFragmentProcessor> GrContextPriv::createUPMToPMEffect( |
| 280 | std::unique_ptr<GrFragmentProcessor> fp) { |
| 281 | ASSERT_SINGLE_OWNER |
| 282 | // We should have already called this->priv().validPMUPMConversionExists() in this case |
| 283 | SkASSERT(fContext->fDidTestPMConversions); |
| 284 | // ...and it should have succeeded |
| 285 | SkASSERT(this->validPMUPMConversionExists()); |
| 286 | |
| 287 | return GrConfigConversionEffect::Make(std::move(fp), PMConversion::kToPremul); |
| 288 | } |