blob: ad6d8ab646f876c9d1e3185381d4866dd8483c38 [file] [log] [blame]
Robert Phillipsdbaf3172019-02-06 15:12:53 -05001/*
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 Kleinc0bd9f92019-04-23 12:05:21 -05008#include "src/gpu/GrContextPriv.h"
Robert Phillipsdbaf3172019-02-06 15:12:53 -05009
Mike Kleinc0bd9f92019-04-23 12:05:21 -050010#include "include/gpu/GrContextThreadSafeProxy.h"
11#include "include/gpu/GrTexture.h"
Greg Danielf91aeb22019-06-18 09:58:02 -040012#include "src/gpu/GrAuditTrail.h"
Mike Kleinc0bd9f92019-04-23 12:05:21 -050013#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 Danielf91aeb22019-06-18 09:58:02 -040018#include "src/gpu/GrSkSLFPFactoryCache.h"
Greg Daniel46cfbc62019-06-07 11:43:30 -040019#include "src/gpu/GrSurfaceContextPriv.h"
Mike Klein4b432fa2019-06-06 11:44:05 -050020#include "src/gpu/GrSurfacePriv.h"
Mike Kleinc0bd9f92019-04-23 12:05:21 -050021#include "src/gpu/GrTextureContext.h"
22#include "src/gpu/SkGr.h"
Greg Daniel6eb8c242019-06-05 10:22:24 -040023#include "src/gpu/effects/generated/GrConfigConversionEffect.h"
Mike Kleinc0bd9f92019-04-23 12:05:21 -050024#include "src/gpu/text/GrTextBlobCache.h"
25#include "src/image/SkImage_Base.h"
26#include "src/image/SkImage_Gpu.h"
Robert Phillipsdbaf3172019-02-06 15:12:53 -050027
Brian Salomonf9a1fdf2019-05-09 10:30:12 -040028#define ASSERT_OWNED_PROXY(P) \
Robert Phillipsdbaf3172019-02-06 15:12:53 -050029 SkASSERT(!(P) || !((P)->peekTexture()) || (P)->peekTexture()->getContext() == fContext)
Brian Salomonf9a1fdf2019-05-09 10:30:12 -040030#define ASSERT_SINGLE_OWNER \
Robert Phillipsa41c6852019-02-07 10:44:10 -050031 SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fContext->singleOwner());)
Brian Salomonf9a1fdf2019-05-09 10:30:12 -040032#define RETURN_VALUE_IF_ABANDONED(value) if (fContext->abandoned()) { return (value); }
33#define RETURN_IF_ABANDONED RETURN_VALUE_IF_ABANDONED(void)
Robert Phillipsdbaf3172019-02-06 15:12:53 -050034
Robert Phillipsa41c6852019-02-07 10:44:10 -050035sk_sp<const GrCaps> GrContextPriv::refCaps() const {
36 return fContext->refCaps();
37}
38
Robert Phillipsdbaf3172019-02-06 15:12:53 -050039sk_sp<GrSkSLFPFactoryCache> GrContextPriv::fpFactoryCache() {
40 return fContext->fpFactoryCache();
41}
42
43sk_sp<GrOpMemoryPool> GrContextPriv::refOpMemoryPool() {
Robert Phillipsd6841482019-02-08 10:29:20 -050044 return fContext->refOpMemoryPool();
Robert Phillipsdbaf3172019-02-06 15:12:53 -050045}
46
Robert Phillipsc5058a62019-02-15 12:52:59 -050047void GrContextPriv::addOnFlushCallbackObject(GrOnFlushCallbackObject* onFlushCBObject) {
48 fContext->addOnFlushCallbackObject(onFlushCBObject);
49}
50
Brian Salomone7499c72019-06-24 12:12:36 -040051sk_sp<GrSurfaceContext> GrContextPriv::makeWrappedSurfaceContext(sk_sp<GrSurfaceProxy> proxy,
Brian Salomond6287472019-06-24 15:50:07 -040052 GrColorType colorType,
Brian Salomone7499c72019-06-24 12:12:36 -040053 SkAlphaType alphaType,
54 sk_sp<SkColorSpace> colorSpace,
55 const SkSurfaceProps* props) {
Brian Salomond6287472019-06-24 15:50:07 -040056 return fContext->makeWrappedSurfaceContext(std::move(proxy), colorType, alphaType,
57 std::move(colorSpace), props);
Robert Phillips292a6b22019-02-14 14:49:02 -050058}
59
Brian Salomon947efe22019-07-16 15:36:11 -040060sk_sp<GrTextureContext> GrContextPriv::makeDeferredTextureContext(SkBackingFit fit,
61 int width,
62 int height,
Brian Salomond6287472019-06-24 15:50:07 -040063 GrColorType colorType,
Brian Salomone7499c72019-06-24 12:12:36 -040064 SkAlphaType alphaType,
65 sk_sp<SkColorSpace> colorSpace,
Brian Salomon947efe22019-07-16 15:36:11 -040066 GrMipMapped mipMapped,
67 GrSurfaceOrigin origin,
68 SkBudgeted budgeted,
69 GrProtected isProtected) {
70 return fContext->makeDeferredTextureContext(fit, width, height, colorType, alphaType,
71 std::move(colorSpace), mipMapped, origin, budgeted,
72 isProtected);
Robert Phillips292a6b22019-02-14 14:49:02 -050073}
74
Robert Phillipsb97da532019-02-12 15:24:12 -050075sk_sp<GrRenderTargetContext> GrContextPriv::makeDeferredRenderTargetContext(
Brian Salomond6287472019-06-24 15:50:07 -040076 SkBackingFit fit,
77 int width,
78 int height,
Brian Salomond6287472019-06-24 15:50:07 -040079 GrColorType colorType,
80 sk_sp<SkColorSpace> colorSpace,
81 int sampleCnt,
82 GrMipMapped mipMapped,
83 GrSurfaceOrigin origin,
84 const SkSurfaceProps* surfaceProps,
85 SkBudgeted budgeted,
Emircan Uysaler23ca4e72019-06-24 10:53:09 -040086 GrProtected isProtected) {
Brian Salomon27ae52c2019-07-03 11:27:44 -040087 return fContext->makeDeferredRenderTargetContext(fit, width, height, colorType,
Robert Phillipsb97da532019-02-12 15:24:12 -050088 std::move(colorSpace), sampleCnt, mipMapped,
Emircan Uysaler23ca4e72019-06-24 10:53:09 -040089 origin, surfaceProps, budgeted, isProtected);
Robert Phillipsb97da532019-02-12 15:24:12 -050090}
91
Robert Phillips6f0e02f2019-02-13 11:02:28 -050092sk_sp<GrRenderTargetContext> GrContextPriv::makeDeferredRenderTargetContextWithFallback(
Brian Salomon27ae52c2019-07-03 11:27:44 -040093 SkBackingFit fit, int width, int height, GrColorType colorType,
94 sk_sp<SkColorSpace> colorSpace, int sampleCnt, GrMipMapped mipMapped,
95 GrSurfaceOrigin origin, const SkSurfaceProps* surfaceProps, SkBudgeted budgeted) {
Brian Salomond6287472019-06-24 15:50:07 -040096 return fContext->makeDeferredRenderTargetContextWithFallback(
Brian Salomon27ae52c2019-07-03 11:27:44 -040097 fit, width, height, colorType, std::move(colorSpace), sampleCnt, mipMapped, origin,
98 surfaceProps, budgeted);
Robert Phillips6f0e02f2019-02-13 11:02:28 -050099}
100
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500101sk_sp<GrTextureContext> GrContextPriv::makeBackendTextureContext(const GrBackendTexture& tex,
102 GrSurfaceOrigin origin,
Brian Salomond6287472019-06-24 15:50:07 -0400103 GrColorType colorType,
Brian Salomone7499c72019-06-24 12:12:36 -0400104 SkAlphaType alphaType,
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500105 sk_sp<SkColorSpace> colorSpace) {
Brian Salomonf9a1fdf2019-05-09 10:30:12 -0400106 ASSERT_SINGLE_OWNER
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500107
108 sk_sp<GrSurfaceProxy> proxy = this->proxyProvider()->wrapBackendTexture(
109 tex, origin, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo, kRW_GrIOType);
110 if (!proxy) {
111 return nullptr;
112 }
113
Brian Salomond6287472019-06-24 15:50:07 -0400114 return this->drawingManager()->makeTextureContext(std::move(proxy), colorType, alphaType,
Brian Salomone7499c72019-06-24 12:12:36 -0400115 std::move(colorSpace));
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500116}
117
118sk_sp<GrRenderTargetContext> GrContextPriv::makeBackendTextureRenderTargetContext(
Brian Salomond6287472019-06-24 15:50:07 -0400119 const GrBackendTexture& tex,
120 GrSurfaceOrigin origin,
121 int sampleCnt,
122 GrColorType colorType,
123 sk_sp<SkColorSpace> colorSpace,
124 const SkSurfaceProps* props,
125 ReleaseProc releaseProc,
126 ReleaseContext releaseCtx) {
Brian Salomonf9a1fdf2019-05-09 10:30:12 -0400127 ASSERT_SINGLE_OWNER
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500128 SkASSERT(sampleCnt > 0);
129
130 sk_sp<GrTextureProxy> proxy(this->proxyProvider()->wrapRenderableBackendTexture(
Robert Phillips0902c982019-07-16 07:47:56 -0400131 tex, origin, sampleCnt, colorType, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo,
132 releaseProc, releaseCtx));
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500133 if (!proxy) {
134 return nullptr;
135 }
136
Brian Salomond6287472019-06-24 15:50:07 -0400137 return this->drawingManager()->makeRenderTargetContext(std::move(proxy), colorType,
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500138 std::move(colorSpace), props);
139}
140
141sk_sp<GrRenderTargetContext> GrContextPriv::makeBackendRenderTargetRenderTargetContext(
Brian Salomond6287472019-06-24 15:50:07 -0400142 const GrBackendRenderTarget& backendRT,
143 GrSurfaceOrigin origin,
144 GrColorType colorType,
145 sk_sp<SkColorSpace> colorSpace,
146 const SkSurfaceProps* surfaceProps,
147 ReleaseProc releaseProc,
148 ReleaseContext releaseCtx) {
Brian Salomonf9a1fdf2019-05-09 10:30:12 -0400149 ASSERT_SINGLE_OWNER
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500150
151 sk_sp<GrSurfaceProxy> proxy = this->proxyProvider()->wrapBackendRenderTarget(
152 backendRT, origin, releaseProc, releaseCtx);
153 if (!proxy) {
154 return nullptr;
155 }
156
Brian Salomond6287472019-06-24 15:50:07 -0400157 return this->drawingManager()->makeRenderTargetContext(std::move(proxy), colorType,
158 std::move(colorSpace), surfaceProps);
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500159}
160
161sk_sp<GrRenderTargetContext> GrContextPriv::makeBackendTextureAsRenderTargetRenderTargetContext(
Brian Salomond6287472019-06-24 15:50:07 -0400162 const GrBackendTexture& tex,
163 GrSurfaceOrigin origin,
164 int sampleCnt,
165 GrColorType colorType,
166 sk_sp<SkColorSpace> colorSpace,
167 const SkSurfaceProps* props) {
Brian Salomonf9a1fdf2019-05-09 10:30:12 -0400168 ASSERT_SINGLE_OWNER
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500169 SkASSERT(sampleCnt > 0);
170 sk_sp<GrSurfaceProxy> proxy(
171 this->proxyProvider()->wrapBackendTextureAsRenderTarget(tex, origin, sampleCnt));
172 if (!proxy) {
173 return nullptr;
174 }
175
Brian Salomond6287472019-06-24 15:50:07 -0400176 return this->drawingManager()->makeRenderTargetContext(std::move(proxy), colorType,
177 std::move(colorSpace), props);
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500178}
179
180sk_sp<GrRenderTargetContext> GrContextPriv::makeVulkanSecondaryCBRenderTargetContext(
181 const SkImageInfo& imageInfo, const GrVkDrawableInfo& vkInfo, const SkSurfaceProps* props) {
Brian Salomonf9a1fdf2019-05-09 10:30:12 -0400182 ASSERT_SINGLE_OWNER
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500183 sk_sp<GrSurfaceProxy> proxy(
184 this->proxyProvider()->wrapVulkanSecondaryCBAsRenderTarget(imageInfo, vkInfo));
185 if (!proxy) {
186 return nullptr;
187 }
188
Brian Salomond6287472019-06-24 15:50:07 -0400189 return this->drawingManager()->makeRenderTargetContext(
190 std::move(proxy),
191 SkColorTypeToGrColorType(imageInfo.colorType()),
192 imageInfo.refColorSpace(),
193 props);
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500194}
195
Brian Salomonf9a1fdf2019-05-09 10:30:12 -0400196GrSemaphoresSubmitted GrContextPriv::flushSurfaces(GrSurfaceProxy* proxies[], int numProxies,
197 const GrFlushInfo& info) {
198 ASSERT_SINGLE_OWNER
199 RETURN_VALUE_IF_ABANDONED(GrSemaphoresSubmitted::kNo)
200 GR_CREATE_TRACE_MARKER_CONTEXT("GrContextPriv", "flushSurfaces", fContext);
201 SkASSERT(numProxies >= 0);
202 SkASSERT(!numProxies || proxies);
203 for (int i = 0; i < numProxies; ++i) {
204 SkASSERT(proxies[i]);
205 ASSERT_OWNED_PROXY(proxies[i]);
206 }
207 return fContext->drawingManager()->flushSurfaces(
208 proxies, numProxies, SkSurface::BackendSurfaceAccess::kNoAccess, info);
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500209}
210
Brian Salomon693bc2b2019-05-09 13:48:00 +0000211void GrContextPriv::flushSurface(GrSurfaceProxy* proxy) {
Brian Salomonf9a1fdf2019-05-09 10:30:12 -0400212 this->flushSurfaces(proxy ? &proxy : nullptr, proxy ? 1 : 0, {});
Brian Salomon693bc2b2019-05-09 13:48:00 +0000213}
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500214
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500215void GrContextPriv::moveOpListsToDDL(SkDeferredDisplayList* ddl) {
Robert Phillips292a6b22019-02-14 14:49:02 -0500216 fContext->drawingManager()->moveOpListsToDDL(ddl);
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500217}
218
219void GrContextPriv::copyOpListsFromDDL(const SkDeferredDisplayList* ddl,
220 GrRenderTargetProxy* newDest) {
Robert Phillips6a6de562019-02-15 15:19:15 -0500221 fContext->drawingManager()->copyOpListsFromDDL(ddl, newDest);
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500222}
223
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500224//////////////////////////////////////////////////////////////////////////////
225#ifdef SK_ENABLE_DUMP_GPU
Mike Kleinc0bd9f92019-04-23 12:05:21 -0500226#include "src/utils/SkJSONWriter.h"
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500227SkString GrContextPriv::dump() const {
228 SkDynamicMemoryWStream stream;
229 SkJSONWriter writer(&stream, SkJSONWriter::Mode::kPretty);
230 writer.beginObject();
231
232 static const char* kBackendStr[] = {
233 "Metal",
234 "OpenGL",
235 "Vulkan",
236 "Mock",
237 };
238 GR_STATIC_ASSERT(0 == (unsigned)GrBackendApi::kMetal);
239 GR_STATIC_ASSERT(1 == (unsigned)GrBackendApi::kOpenGL);
240 GR_STATIC_ASSERT(2 == (unsigned)GrBackendApi::kVulkan);
241 GR_STATIC_ASSERT(3 == (unsigned)GrBackendApi::kMock);
242 writer.appendString("backend", kBackendStr[(unsigned)fContext->backend()]);
243
244 writer.appendName("caps");
245 fContext->caps()->dumpJSON(&writer);
246
247 writer.appendName("gpu");
248 fContext->fGpu->dumpJSON(&writer);
249
250 // Flush JSON to the memory stream
251 writer.endObject();
252 writer.flush();
253
254 // Null terminate the JSON data in the memory stream
255 stream.write8(0);
256
257 // Allocate a string big enough to hold all the data, then copy out of the stream
258 SkString result(stream.bytesWritten());
259 stream.copyToAndReset(result.writable_str());
260 return result;
261}
262#endif
263
264#if GR_TEST_UTILS
265void GrContextPriv::resetGpuStats() const {
266#if GR_GPU_STATS
267 fContext->fGpu->stats()->reset();
268#endif
269}
270
271void GrContextPriv::dumpCacheStats(SkString* out) const {
272#if GR_CACHE_STATS
273 fContext->fResourceCache->dumpStats(out);
274#endif
275}
276
277void GrContextPriv::dumpCacheStatsKeyValuePairs(SkTArray<SkString>* keys,
278 SkTArray<double>* values) const {
279#if GR_CACHE_STATS
280 fContext->fResourceCache->dumpStatsKeyValuePairs(keys, values);
281#endif
282}
283
284void GrContextPriv::printCacheStats() const {
285 SkString out;
286 this->dumpCacheStats(&out);
287 SkDebugf("%s", out.c_str());
288}
289
290void GrContextPriv::dumpGpuStats(SkString* out) const {
291#if GR_GPU_STATS
292 return fContext->fGpu->stats()->dump(out);
293#endif
294}
295
296void GrContextPriv::dumpGpuStatsKeyValuePairs(SkTArray<SkString>* keys,
297 SkTArray<double>* values) const {
298#if GR_GPU_STATS
299 return fContext->fGpu->stats()->dumpKeyValuePairs(keys, values);
300#endif
301}
302
303void GrContextPriv::printGpuStats() const {
304 SkString out;
305 this->dumpGpuStats(&out);
306 SkDebugf("%s", out.c_str());
307}
308
309void GrContextPriv::testingOnly_setTextBlobCacheLimit(size_t bytes) {
Robert Phillips2184fb72019-02-21 16:11:41 -0500310 fContext->priv().getTextBlobCache()->setBudget(bytes);
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500311}
312
313sk_sp<SkImage> GrContextPriv::testingOnly_getFontAtlasImage(GrMaskFormat format, unsigned int index) {
314 auto atlasManager = this->getAtlasManager();
315 if (!atlasManager) {
316 return nullptr;
317 }
318
319 unsigned int numActiveProxies;
320 const sk_sp<GrTextureProxy>* proxies = atlasManager->getProxies(format, &numActiveProxies);
321 if (index >= numActiveProxies || !proxies || !proxies[index]) {
322 return nullptr;
323 }
324
325 SkASSERT(proxies[index]->priv().isExact());
326 sk_sp<SkImage> image(new SkImage_Gpu(sk_ref_sp(fContext), kNeedNewImageUniqueID,
327 kPremul_SkAlphaType, proxies[index], nullptr));
328 return image;
329}
330
331void GrContextPriv::testingOnly_purgeAllUnlockedResources() {
332 fContext->fResourceCache->purgeAllUnlocked();
333}
334
335void GrContextPriv::testingOnly_flushAndRemoveOnFlushCallbackObject(GrOnFlushCallbackObject* cb) {
336 fContext->flush();
Robert Phillips292a6b22019-02-14 14:49:02 -0500337 fContext->drawingManager()->testingOnly_removeOnFlushCallbackObject(cb);
Robert Phillipsdbaf3172019-02-06 15:12:53 -0500338}
339#endif
Greg Daniel6eb8c242019-06-05 10:22:24 -0400340
341bool GrContextPriv::validPMUPMConversionExists() {
342 ASSERT_SINGLE_OWNER
343 if (!fContext->fDidTestPMConversions) {
344 fContext->fPMUPMConversionsRoundTrip =
345 GrConfigConversionEffect::TestForPreservingPMConversions(fContext);
346 fContext->fDidTestPMConversions = true;
347 }
348
349 // The PM<->UPM tests fail or succeed together so we only need to check one.
350 return fContext->fPMUPMConversionsRoundTrip;
351}
352
353std::unique_ptr<GrFragmentProcessor> GrContextPriv::createPMToUPMEffect(
354 std::unique_ptr<GrFragmentProcessor> fp) {
355 ASSERT_SINGLE_OWNER
356 // We should have already called this->priv().validPMUPMConversionExists() in this case
357 SkASSERT(fContext->fDidTestPMConversions);
358 // ...and it should have succeeded
359 SkASSERT(this->validPMUPMConversionExists());
360
361 return GrConfigConversionEffect::Make(std::move(fp), PMConversion::kToUnpremul);
362}
363
364std::unique_ptr<GrFragmentProcessor> GrContextPriv::createUPMToPMEffect(
365 std::unique_ptr<GrFragmentProcessor> fp) {
366 ASSERT_SINGLE_OWNER
367 // We should have already called this->priv().validPMUPMConversionExists() in this case
368 SkASSERT(fContext->fDidTestPMConversions);
369 // ...and it should have succeeded
370 SkASSERT(this->validPMUPMConversionExists());
371
372 return GrConfigConversionEffect::Make(std::move(fp), PMConversion::kToPremul);
373}
Robert Phillipscb1adb42019-06-10 15:09:34 -0400374
375//////////////////////////////////////////////////////////////////////////////
376
377#include "src/core/SkMipMap.h"
378
379GrBackendTexture GrContextPriv::createBackendTexture(const SkPixmap srcData[], int numLevels,
Robert Phillipsda2e67a2019-07-01 15:04:06 -0400380 GrRenderable renderable,
381 GrProtected isProtected) {
Robert Phillipscb1adb42019-06-10 15:09:34 -0400382 if (!fContext->asDirectContext()) {
383 return {};
384 }
385
386 if (this->abandoned()) {
387 return {};
388 }
389
390 if (!srcData || !numLevels) {
391 return {};
392 }
393
394 int baseWidth = srcData[0].width();
395 int baseHeight = srcData[0].height();
396 SkColorType colorType = srcData[0].colorType();
397
398 if (numLevels > 1) {
399 if (numLevels != SkMipMap::ComputeLevelCount(baseWidth, baseHeight) + 1) {
400 return {};
401 }
402
403 int currentWidth = baseWidth;
404 int currentHeight = baseHeight;
405 for (int i = 1; i < numLevels; ++i) {
406 currentWidth = SkTMax(1, currentWidth / 2);
407 currentHeight = SkTMax(1, currentHeight / 2);
408
409 if (srcData[i].colorType() != colorType) {
410 return {};
411 }
412
413 if (srcData[i].width() != currentWidth || srcData[i].height() != currentHeight) {
414 return {};
415 }
416 }
417 }
418
Greg Daniel627d0532019-07-08 16:48:14 -0400419 GrBackendFormat backendFormat =
420 this->caps()->getBackendFormatFromColorType(SkColorTypeToGrColorType(colorType));
Robert Phillipscb1adb42019-06-10 15:09:34 -0400421 if (!backendFormat.isValid()) {
422 return {};
423 }
424
425 GrGpu* gpu = fContext->fGpu.get();
426
427 // TODO: propagate the array of pixmaps interface to GrGpu
428 return gpu->createBackendTexture(baseWidth, baseHeight, backendFormat,
429 GrMipMapped::kNo, // TODO: use real mipmap setting here
430 renderable, srcData[0].addr(), srcData[0].rowBytes(),
Robert Phillipsda2e67a2019-07-01 15:04:06 -0400431 nullptr, isProtected);
Robert Phillipscb1adb42019-06-10 15:09:34 -0400432}