Flutter Engine
The Flutter Engine
GrSurfaceTest.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2013 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
13#include "include/core/SkData.h"
16#include "include/core/SkRect.h"
19#include "include/core/SkSize.h"
27#include "include/gpu/GrTypes.h"
32#include "src/gpu/DataUtils.h"
34#include "src/gpu/Swizzle.h"
52#include "src/gpu/ganesh/SkGr.h"
56#include "tests/Test.h"
59
60#include <cstdint>
61#include <functional>
62#include <initializer_list>
63#include <memory>
64#include <tuple>
65#include <utility>
66#include <vector>
67
68// Tests that GrSurface::asTexture(), GrSurface::asRenderTarget(), and static upcasting of texture
69// and render targets to GrSurface all work as expected.
71 auto context = ctxInfo.directContext();
72 auto resourceProvider = context->priv().resourceProvider();
73
74 static constexpr SkISize kDesc = {256, 256};
75 auto format = context->priv().caps()->getDefaultBackendFormat(GrColorType::kRGBA_8888,
77 sk_sp<GrSurface> texRT1 = resourceProvider->createTexture(kDesc,
78 format,
81 1,
85 /*label=*/{});
86
87 REPORTER_ASSERT(reporter, texRT1.get() == texRT1->asRenderTarget());
88 REPORTER_ASSERT(reporter, texRT1.get() == texRT1->asTexture());
89 REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT1->asRenderTarget()) ==
90 texRT1->asTexture());
92 static_cast<GrSurface*>(texRT1->asTexture()));
93 REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT1->asRenderTarget()) ==
94 static_cast<GrSurface*>(texRT1->asTexture()));
95
96 sk_sp<GrTexture> tex1 = resourceProvider->createTexture(kDesc,
97 format,
100 1,
104 /*label=*/{});
105 REPORTER_ASSERT(reporter, nullptr == tex1->asRenderTarget());
106 REPORTER_ASSERT(reporter, tex1.get() == tex1->asTexture());
107 REPORTER_ASSERT(reporter, static_cast<GrSurface*>(tex1.get()) == tex1->asTexture());
108
109 GrBackendTexture backendTex = context->createBackendTexture(256,
110 256,
116
117 sk_sp<GrSurface> texRT2 = resourceProvider->wrapRenderableBackendTexture(
119
120 REPORTER_ASSERT(reporter, texRT2.get() == texRT2->asRenderTarget());
121 REPORTER_ASSERT(reporter, texRT2.get() == texRT2->asTexture());
122 REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT2->asRenderTarget()) ==
123 texRT2->asTexture());
125 static_cast<GrSurface*>(texRT2->asTexture()));
126 REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT2->asRenderTarget()) ==
127 static_cast<GrSurface*>(texRT2->asTexture()));
128
129 context->deleteBackendTexture(backendTex);
130}
131
132// This test checks that the isFormatTexturable and isFormatRenderable are
133// consistent with createTexture's result.
134DEF_GANESH_TEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability,
135 reporter,
136 ctxInfo,
138 auto context = ctxInfo.directContext();
139 GrProxyProvider* proxyProvider = context->priv().proxyProvider();
140 GrResourceProvider* resourceProvider = context->priv().resourceProvider();
141 const GrCaps* caps = context->priv().caps();
142
143 // TODO: Should only need format here but need to determine compression type from format
144 // without config.
145 auto createTexture = [](SkISize dimensions, GrColorType colorType,
146 const GrBackendFormat& format, GrRenderable renderable,
149 if (compression != SkTextureCompressionType::kNone) {
150 if (renderable == GrRenderable::kYes) {
151 return nullptr;
152 }
153 auto size = SkCompressedDataSize(compression, dimensions, nullptr, false);
155 SkColor4f color = {0, 0, 0, 0};
156 skgpu::FillInCompressedData(compression,
157 dimensions,
159 (char*)data->writable_data(),
160 color);
161 return rp->createCompressedTexture(dimensions,
162 format,
166 data.get(),
167 /*label=*/{});
168 } else {
169 return rp->createTexture(dimensions,
170 format,
172 renderable,
173 1,
177 /*label=*/{});
178 }
179 };
180
181 static constexpr SkISize kDims = {64, 64};
182
183 const std::vector<GrTest::TestFormatColorTypeCombination>& combos =
184 caps->getTestingCombinations();
185
186 for (const GrTest::TestFormatColorTypeCombination& combo : combos) {
187
188 SkASSERT(combo.fColorType != GrColorType::kUnknown);
189 SkASSERT(combo.fFormat.isValid());
190
191 // Right now Vulkan has two backend formats that support ABGR_4444 (R4G4B4A4 and B4G4R4A4).
192 // Until we can create textures directly from the backend format this yields some
193 // ambiguity in what is actually supported and which textures can be created.
194 if (ctxInfo.backend() == kVulkan_GrBackend && combo.fColorType == GrColorType::kABGR_4444) {
195 continue;
196 }
197
198 // Check if 'isFormatTexturable' agrees with 'createTexture' and that the mipmap
199 // support check is working
200 {
201 bool isCompressed = caps->isFormatCompressed(combo.fFormat);
202 bool isTexturable = caps->isFormatTexturable(combo.fFormat, GrTextureType::k2D);
203
204 sk_sp<GrSurface> tex = createTexture(kDims, combo.fColorType, combo.fFormat,
205 GrRenderable::kNo, resourceProvider);
206 REPORTER_ASSERT(reporter, SkToBool(tex) == isTexturable,
207 "ct:%s format:%s, tex:%d, isTexturable:%d",
208 GrColorTypeToStr(combo.fColorType), combo.fFormat.toStr().c_str(),
209 SkToBool(tex), isTexturable);
210
211 // Check that the lack of mipmap support blocks the creation of mipmapped
212 // proxies
213 bool expectedMipMapability = isTexturable && caps->mipmapSupport() && !isCompressed;
214
215 sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(combo.fFormat,
216 kDims,
218 1,
223 /*label=*/{});
224 REPORTER_ASSERT(reporter, SkToBool(proxy.get()) == expectedMipMapability,
225 "ct:%s format:%s, tex:%d, expectedMipMapability:%d",
226 GrColorTypeToStr(combo.fColorType), combo.fFormat.toStr().c_str(),
227 SkToBool(proxy.get()), expectedMipMapability);
228 }
229
230 // Check if 'isFormatAsColorTypeRenderable' agrees with 'createTexture' (w/o MSAA)
231 {
232 bool isRenderable = caps->isFormatRenderable(combo.fFormat, 1);
233
234 sk_sp<GrSurface> tex = resourceProvider->createTexture(kDims,
235 combo.fFormat,
238 1,
242 /*label=*/{});
243 REPORTER_ASSERT(reporter, SkToBool(tex) == isRenderable,
244 "ct:%s format:%s, tex:%d, isRenderable:%d",
245 GrColorTypeToStr(combo.fColorType), combo.fFormat.toStr().c_str(),
246 SkToBool(tex), isRenderable);
247 }
248
249 // Check if 'isFormatAsColorTypeRenderable' agrees with 'createTexture' w/ MSAA
250 {
251 bool isRenderable = caps->isFormatRenderable(combo.fFormat, 2);
252
253 sk_sp<GrSurface> tex = resourceProvider->createTexture(kDims,
254 combo.fFormat,
257 2,
261 /*label=*/{});
262 REPORTER_ASSERT(reporter, SkToBool(tex) == isRenderable,
263 "ct:%s format:%s, tex:%d, isRenderable:%d",
264 GrColorTypeToStr(combo.fColorType), combo.fFormat.toStr().c_str(),
265 SkToBool(tex), isRenderable);
266 }
267 }
268}
269
270// For each context, set it to always clear the textures and then run through all the
271// supported formats checking that the textures are actually cleared
272DEF_GANESH_TEST(InitialTextureClear, reporter, baseOptions, CtsEnforcement::kApiLevel_T) {
273 GrContextOptions options = baseOptions;
274 options.fClearAllTextures = true;
275
276 static constexpr int kSize = 100;
277 static constexpr SkColor kClearColor = 0xABABABAB;
278
281
283 readback.alloc(imageInfo);
284
286 desc.fWidth = desc.fHeight = kSize;
287
288 for (int ct = 0; ct < skgpu::kContextTypeCount; ++ct) {
290 auto contextType = static_cast<skgpu::ContextType>(ct);
291 if (!skgpu::IsRenderingContext(contextType)) {
292 continue;
293 }
294 auto dContext = factory.get(contextType);
295 if (!dContext) {
296 continue;
297 }
298
299 GrProxyProvider* proxyProvider = dContext->priv().proxyProvider();
300 const GrCaps* caps = dContext->priv().caps();
301
302 const std::vector<GrTest::TestFormatColorTypeCombination>& combos =
303 caps->getTestingCombinations();
304
305 for (const GrTest::TestFormatColorTypeCombination& combo : combos) {
306
307 SkASSERT(combo.fColorType != GrColorType::kUnknown);
308 SkASSERT(combo.fFormat.isValid());
309
310 if (!caps->isFormatTexturable(combo.fFormat, GrTextureType::k2D)) {
311 continue;
312 }
313
314 auto checkColor = [reporter](const GrTest::TestFormatColorTypeCombination& combo,
315 uint32_t readColor) {
316 // We expect that if there is no alpha in the src color type and we read it to a
317 // color type with alpha that we will get one for alpha rather than zero. We used to
318 // require this but the Intel Iris 6100 on Win 10 test bot doesn't put one in the
319 // alpha channel when reading back from GL_RG16 or GL_RG16F. So now we allow either.
320 uint32_t channels = GrColorTypeChannelFlags(combo.fColorType);
321 bool allowAlphaOne = !(channels & kAlpha_SkColorChannelFlag);
322 if (allowAlphaOne) {
323 if (readColor != 0x00000000 && readColor != 0xFF000000) {
325 "Failed on ct %s format %s 0x%08x is not 0x00000000 or 0xFF000000",
326 GrColorTypeToStr(combo.fColorType), combo.fFormat.toStr().c_str(),
327 readColor);
328 return false;
329 }
330 } else {
331 if (readColor) {
332 ERRORF(reporter, "Failed on ct %s format %s 0x%08x != 0x00000000",
333 GrColorTypeToStr(combo.fColorType), combo.fFormat.toStr().c_str(),
334 readColor);
335 return false;
336 }
337 }
338 return true;
339 };
340
341 for (auto renderable : {GrRenderable::kNo, GrRenderable::kYes}) {
342 if (renderable == GrRenderable::kYes &&
343 !caps->isFormatAsColorTypeRenderable(combo.fColorType, combo.fFormat)) {
344 continue;
345 }
346
347 for (auto fit : {SkBackingFit::kApprox, SkBackingFit::kExact}) {
348
349 // Does directly allocating a texture clear it?
350 {
351 auto proxy = proxyProvider->testingOnly_createInstantiatedProxy(
352 {kSize, kSize},
353 combo.fFormat,
354 renderable,
355 1,
356 fit,
359 if (proxy) {
360 skgpu::Swizzle swizzle = caps->getReadSwizzle(combo.fFormat,
361 combo.fColorType);
362 GrSurfaceProxyView view(std::move(proxy), kTopLeft_GrSurfaceOrigin,
363 swizzle);
365 auto texCtx = dContext->priv().makeSC(std::move(view), info);
366
367 readback.erase(kClearColor);
368 if (texCtx->readPixels(dContext, readback, {0, 0})) {
369 for (int i = 0; i < kSize * kSize; ++i) {
370 if (!checkColor(combo, readback.addr32()[i])) {
371 break;
372 }
373 }
374 }
375 }
376
377 dContext->priv().getResourceCache()->purgeUnlockedResources(
379 }
380
381 // Try creating the texture as a deferred proxy.
382 {
387 nullptr,
388 {desc.fHeight, desc.fHeight});
389
390 auto sc = dContext->priv().makeSC(info,
391 combo.fFormat,
392 /*label=*/{},
393 fit,
395 renderable);
396 if (!sc) {
397 continue;
398 }
399
400 readback.erase(kClearColor);
401 if (sc->readPixels(dContext, readback, {0, 0})) {
402 for (int i = 0; i < kSize * kSize; ++i) {
403 if (!checkColor(combo, readback.addr32()[i])) {
404 break;
405 }
406 }
407 }
408 dContext->priv().getResourceCache()->purgeUnlockedResources(
410 }
411 }
412 }
413 }
414 }
415}
416
418 reporter,
419 context_info,
421 using namespace skgpu;
422
423 auto fillPixels = [](SkPixmap* p, const std::function<uint32_t(int x, int y)>& f) {
424 for (int y = 0; y < p->height(); ++y) {
425 for (int x = 0; x < p->width(); ++x) {
426 *p->writable_addr32(x, y) = f(x, y);
427 }
428 }
429 };
430
431 auto comparePixels = [](const SkPixmap& p1, const SkPixmap& p2, skiatest::Reporter* reporter) {
432 SkASSERT(p1.info() == p2.info());
433 for (int y = 0; y < p1.height(); ++y) {
434 for (int x = 0; x < p1.width(); ++x) {
435 REPORTER_ASSERT(reporter, p1.getColor(x, y) == p2.getColor(x, y));
436 if (p1.getColor(x, y) != p2.getColor(x, y)) {
437 return;
438 }
439 }
440 }
441 };
442
443 static constexpr int kSize = 100;
445 SkAutoPixmapStorage srcPixmap;
446 srcPixmap.alloc(ii);
447 fillPixels(&srcPixmap,
448 [](int x, int y) {
449 return (0xFFU << 24) | (x << 16) | (y << 8) | uint8_t((x * y) & 0xFF);
450 });
451
452 auto dContext = context_info.directContext();
453 GrProxyProvider* proxyProvider = dContext->priv().proxyProvider();
454
455 Protected isProtected = Protected(dContext->priv().caps()->supportsProtectedContent());
456
457 // We test both kRW in addition to kRead mostly to ensure that the calls are structured such
458 // that they'd succeed if the texture wasn't kRead. We want to be sure we're failing with
459 // kRead for the right reason.
460 for (auto ioType : {kRead_GrIOType, kRW_GrIOType}) {
462 srcPixmap,
465 isProtected);
466 if (!mbet) {
467 ERRORF(reporter, "Could not make texture.");
468 return;
469 }
470 auto proxy = proxyProvider->wrapBackendTexture(mbet->texture(), kBorrow_GrWrapOwnership,
471 GrWrapCacheable::kNo, ioType,
472 mbet->refCountedCallback());
473 Swizzle swizzle = dContext->priv().caps()->getReadSwizzle(proxy->backendFormat(),
475 GrSurfaceProxyView view(proxy, kTopLeft_GrSurfaceOrigin, swizzle);
476 auto surfContext = dContext->priv().makeSC(std::move(view), ii.colorInfo());
477 // Read pixels should work with a read-only texture.
478 {
480 read.alloc(srcPixmap.info());
481 auto readResult = surfContext->readPixels(dContext, read, {0, 0});
482 REPORTER_ASSERT(reporter, readResult);
483 if (readResult) {
484 comparePixels(srcPixmap, read, reporter);
485 }
486 }
487
488 // Write pixels should not work with a read-only texture.
490 write.alloc(srcPixmap.info());
491 fillPixels(&write, [&srcPixmap](int x, int y) { return ~*srcPixmap.addr32(); });
492 auto writeResult = surfContext->writePixels(dContext, write, {0, 0});
493 REPORTER_ASSERT(reporter, writeResult == (ioType == kRW_GrIOType));
494 // Try the low level write.
495 dContext->flushAndSubmit();
496 auto gpuWriteResult = dContext->priv().getGpu()->writePixels(
497 proxy->peekTexture(),
501 write.addr32(),
503 REPORTER_ASSERT(reporter, gpuWriteResult == (ioType == kRW_GrIOType));
504
505 SkBitmap copySrcBitmap;
506 copySrcBitmap.installPixels(write);
507 copySrcBitmap.setImmutable();
508
509 auto copySrc = std::get<0>(GrMakeUncachedBitmapProxyView(dContext, copySrcBitmap));
510
511 REPORTER_ASSERT(reporter, copySrc);
512 auto copyResult = surfContext->testCopy(copySrc.refProxy());
513 REPORTER_ASSERT(reporter, copyResult == (ioType == kRW_GrIOType));
514 // Try the low level copy.
515 dContext->flushAndSubmit();
516 auto gpuCopyResult = dContext->priv().getGpu()->copySurface(
517 proxy->peekSurface(),
519 copySrc.proxy()->peekSurface(),
522 REPORTER_ASSERT(reporter, gpuCopyResult == (ioType == kRW_GrIOType));
523
524 // Mip regen should not work with a read only texture.
525 if (dContext->priv().caps()->mipmapSupport()) {
526 mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(dContext,
527 kSize,
528 kSize,
532 isProtected);
533 proxy = proxyProvider->wrapBackendTexture(mbet->texture(), kBorrow_GrWrapOwnership,
534 GrWrapCacheable::kNo, ioType,
535 mbet->refCountedCallback());
536 dContext->flushAndSubmit();
537 proxy->peekTexture()->markMipmapsDirty(); // avoids assert in GrGpu.
538 auto regenResult =
539 dContext->priv().getGpu()->regenerateMipMapLevels(proxy->peekTexture());
540 REPORTER_ASSERT(reporter, regenResult == (ioType == kRW_GrIOType));
541 }
542 }
543}
static void readback(const SkBitmap &src, int *result, int resultCount)
Definition: BlurTest.cpp:264
const char * options
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
reporter
Definition: FontMgrTest.cpp:39
SkTextureCompressionType GrBackendFormatToCompressionType(const GrBackendFormat &format)
DEF_GANESH_TEST_FOR_MOCK_CONTEXT(GrSurface, reporter, ctxInfo)
DEF_GANESH_TEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
DEF_GANESH_TEST(InitialTextureClear, reporter, baseOptions, CtsEnforcement::kApiLevel_T)
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(ReadOnlyTexture, reporter, context_info, CtsEnforcement::kApiLevel_T)
static constexpr uint32_t GrColorTypeChannelFlags(GrColorType ct)
Definition: GrTypesPriv.h:661
static constexpr size_t GrColorTypeBytesPerPixel(GrColorType ct)
Definition: GrTypesPriv.h:896
@ kRead_GrIOType
Definition: GrTypesPriv.h:403
@ kRW_GrIOType
Definition: GrTypesPriv.h:405
@ kBorrow_GrWrapOwnership
Definition: GrTypesPriv.h:79
GrColorType
Definition: GrTypesPriv.h:540
static constexpr bool GrColorTypeHasAlpha(GrColorType ct)
Definition: GrTypesPriv.h:892
@ kTopLeft_GrSurfaceOrigin
Definition: GrTypes.h:148
static constexpr GrBackendApi kVulkan_GrBackend
Definition: GrTypes.h:126
skgpu::Protected Protected
@ kOpaque_SkAlphaType
pixel is opaque
Definition: SkAlphaType.h:28
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
Definition: SkAlphaType.h:29
#define SkASSERT(cond)
Definition: SkAssert.h:116
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
Definition: SkColorType.h:24
uint32_t SkColor
Definition: SkColor.h:37
@ kAlpha_SkColorChannelFlag
Definition: SkColor.h:242
size_t SkCompressedDataSize(SkTextureCompressionType type, SkISize dimensions, TArray< size_t > *individualMipOffsets, bool mipmapped)
static bool read(SkStream *stream, void *buffer, size_t amount)
std::tuple< GrSurfaceProxyView, GrColorType > GrMakeUncachedBitmapProxyView(GrRecordingContext *rContext, const SkBitmap &bitmap, skgpu::Mipmapped mipmapped, SkBackingFit fit, skgpu::Budgeted budgeted)
Definition: SkGr.cpp:253
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
SkTextureCompressionType
static constexpr bool SkToBool(const T &x)
Definition: SkTo.h:35
#define REPORTER_ASSERT(r, cond,...)
Definition: Test.h:286
#define ERRORF(r,...)
Definition: Test.h:293
Definition: GrCaps.h:57
bool mipmapSupport() const
Definition: GrCaps.h:72
virtual bool isFormatTexturable(const GrBackendFormat &, GrTextureType) const =0
virtual bool isFormatRenderable(const GrBackendFormat &format, int sampleCount) const =0
bool isFormatCompressed(const GrBackendFormat &format) const
Definition: GrCaps.cpp:457
virtual bool isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat &format, int sampleCount=1) const =0
skgpu::Swizzle getReadSwizzle(const GrBackendFormat &format, GrColorType colorType) const
Definition: GrCaps.cpp:443
sk_sp< GrTextureProxy > wrapBackendTexture(const GrBackendTexture &, GrWrapOwnership, GrWrapCacheable, GrIOType, sk_sp< skgpu::RefCntedCallback >=nullptr)
sk_sp< GrTextureProxy > createProxy(const GrBackendFormat &, SkISize dimensions, GrRenderable, int renderTargetSampleCnt, skgpu::Mipmapped, SkBackingFit, skgpu::Budgeted, GrProtected, std::string_view label, GrInternalSurfaceFlags=GrInternalSurfaceFlags::kNone, UseAllocator useAllocator=UseAllocator::kYes)
GrResourceProviderPriv priv()
sk_sp< GrTexture > createTexture(SkISize dimensions, const GrBackendFormat &format, GrTextureType textureType, skgpu::Renderable renderable, int renderTargetSampleCnt, skgpu::Mipmapped mipmapped, skgpu::Budgeted budgeted, skgpu::Protected isProtected, std::string_view label)
GrTexture * peekTexture() const
virtual GrTexture * asTexture()
Definition: GrSurface.h:59
virtual GrRenderTarget * asRenderTarget()
Definition: GrSurface.h:65
void markMipmapsDirty()
Definition: GrTexture.cpp:25
GrTexture * asTexture() override
Definition: GrTexture.h:33
void alloc(const SkImageInfo &)
void setImmutable()
Definition: SkBitmap.cpp:400
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
Definition: SkBitmap.cpp:323
static sk_sp< SkData > MakeUninitialized(size_t length)
Definition: SkData.cpp:116
SkColor getColor(int x, int y) const
Definition: SkPixmap.cpp:187
const uint32_t * addr32() const
Definition: SkPixmap.h:352
int width() const
Definition: SkPixmap.h:160
const SkImageInfo & info() const
Definition: SkPixmap.h:135
int height() const
Definition: SkPixmap.h:166
GrDirectContext * get(ContextType type, ContextOverrides overrides=ContextOverrides::kNone)
T * get() const
Definition: SkRefCnt.h:303
DlColor color
uint32_t uint32_t * format
Dart_NativeFunction function
Definition: fuchsia.cc:51
constexpr int kSize
double y
double x
constexpr SkColor4f kTransparent
Definition: SkColor.h:434
SK_API sk_sp< SkPixelRef > MakeWithData(const SkImageInfo &, size_t rowBytes, sk_sp< SkData > data)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
const myers::Point & get< 0 >(const myers::Segment &s)
Definition: Myers.h:80
Definition: GpuTools.h:21
void FillInCompressedData(SkTextureCompressionType type, SkISize dimensions, skgpu::Mipmapped mipmapped, char *dstPixels, const SkColor4f &colorf)
Definition: DataUtils.cpp:257
static const int kContextTypeCount
Definition: ContextType.h:42
ContextType
Definition: ContextType.h:19
Renderable
Definition: GpuTypes.h:69
bool IsRenderingContext(skgpu::ContextType type)
Definition: ContextType.cpp:88
Protected
Definition: GpuTypes.h:61
void write(SkWStream *wStream, const T &text)
Definition: skqp.cpp:188
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
Definition: SkRect.h:56
Definition: SkSize.h:16
const SkColorInfo & colorInfo() const
Definition: SkImageInfo.h:404
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63