Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrExternalTextureGenerator.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
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#ifndef GrExternalTextureGenerator_DEFINED
9#define GrExternalTextureGenerator_DEFINED
10
15
16#include <memory>
17
20class SkImage;
21enum class GrImageTexGenPolicy : int;
22namespace skgpu { enum class Mipmapped : bool; }
23struct SkImageInfo;
24
26public:
27 virtual ~GrExternalTexture() = default;
29 virtual void dispose() = 0;
30};
31
43
44namespace SkImages {
45/**
46 * Like SkImages::DeferredFromGenerator except allows for the use of GrTextureGenerator.
47 *
48 * @param gen producer of textures
49 * @return created SkImage, or nullptr
50 */
51SK_API sk_sp<SkImage> DeferredFromTextureGenerator(std::unique_ptr<GrTextureGenerator> gen);
52}
53
54#endif // GrExternalTextureGenerator_DEFINED
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
#define SK_API
Definition SkAPI.h:35
GrImageTexGenPolicy
Definition SkGr.h:141
Type::kYUV Type::kRGBA() int(0.7 *637)
virtual std::unique_ptr< GrExternalTexture > generateExternalTexture(GrRecordingContext *, skgpu::Mipmapped)=0
virtual ~GrExternalTexture()=default
virtual void dispose()=0
virtual GrBackendTexture getBackendTexture()=0
virtual GrSurfaceProxyView onGenerateTexture(GrRecordingContext *, const SkImageInfo &, skgpu::Mipmapped, GrImageTexGenPolicy)=0
SK_API sk_sp< SkImage > DeferredFromTextureGenerator(std::unique_ptr< GrTextureGenerator > gen)
Definition gen.py:1
Mipmapped
Definition GpuTypes.h:53