44 "TextureForPinnableRasterImageWithPolicyNotEqualKDraw"),
59 return sk_make_sp<SkImage_RasterPinnable>(bm);
73 if (!raster->fPinnedData) {
74 auto data = std::make_unique<PinnedData>();
75 std::tie(
data->fPinnedView,
data->fPinnedColorType) =
78 "ganesh_PinAsTexture",
80 if (!
data->fPinnedView) {
83 data->fPinnedUniqueID = raster->bitmap().getGenerationID();
85 raster->fPinnedData.swap(
data);
87 SkASSERT(raster->fPinnedData->fPinnedCount > 0);
88 SkASSERT(raster->fPinnedData->fPinnedUniqueID != 0);
89 if (rContext->
priv().
contextID() != raster->fPinnedData->fPinnedContextID) {
94 raster->fPinnedData->fPinnedCount++;
105 if (!raster->fPinnedData) {
110 SkASSERT(raster->fPinnedData->fPinnedCount > 0);
111 SkASSERT(raster->fPinnedData->fPinnedUniqueID != 0);
115 raster->fPinnedData->fPinnedCount--;
116 if (raster->fPinnedData->fPinnedCount <= 0) {
117 raster->fPinnedData.reset(
nullptr);
std::tuple< GrSurfaceProxyView, GrColorType > GrMakeCachedBitmapProxyView(GrRecordingContext *rContext, const SkBitmap &bitmap, std::string_view label, skgpu::Mipmapped mipmapped)
static bool SkImageInfoIsValid(const SkImageInfo &info)
static SkImage_Base * as_IB(SkImage *image)
uint32_t contextID() const
GrRecordingContextPriv priv()
const SkImageInfo & info() const
std::tuple< GrSurfaceProxyView, GrColorType > asView(GrRecordingContext *, skgpu::Mipmapped, GrImageTexGenPolicy) const
std::unique_ptr< PinnedData > fPinnedData
SK_API sk_sp< SkImage > PinnableRasterFromBitmap(const SkBitmap &)
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 policy
std::tuple< GrSurfaceProxyView, GrColorType > RasterAsView(GrRecordingContext *rContext, const SkImage_Raster *raster, skgpu::Mipmapped mipmapped, GrImageTexGenPolicy policy)
bool PinAsTexture(GrRecordingContext *, SkImage *)
GrSurfaceProxyView CopyView(GrRecordingContext *context, GrSurfaceProxyView src, skgpu::Mipmapped mipmapped, GrImageTexGenPolicy policy, std::string_view label)
void UnpinTexture(GrRecordingContext *, SkImage *)
size_t minRowBytes() const
std::shared_ptr< const fml::Mapping > data