5#include "flutter/shell/platform/embedder/embedder_external_texture_gl.h"
7#include "flutter/fml/logging.h"
24 int64_t texture_identifier,
33void EmbedderExternalTextureGL::Paint(
PaintContext& context,
37 if (last_image_ ==
nullptr) {
50 if (
bounds != image_bounds) {
64 std::unique_ptr<FlutterOpenGLTexture>
texture =
100 release_proc(
texture->user_data);
102 FML_LOG(
ERROR) <<
"Could not create external texture->";
111void EmbedderExternalTextureGL::OnGrContextCreated() {}
114void EmbedderExternalTextureGL::OnGrContextDestroyed() {}
117void EmbedderExternalTextureGL::MarkNewFrameAvailable() {
118 last_image_ =
nullptr;
122void EmbedderExternalTextureGL::OnTextureUnregistered() {}
@ kTopLeft_GrSurfaceOrigin
static const uint32_t kAll_GrBackendState
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
void resetContext(uint32_t state=kAll_GrBackendState)
void flushAndSubmit(GrSyncCpu sync=GrSyncCpu::kNo)
static sk_sp< DlImage > Make(const SkImage *image)
~EmbedderExternalTextureGL()
EmbedderExternalTextureGL(int64_t texture_identifier, const ExternalTextureCallback &callback)
std::function< std::unique_ptr< FlutterOpenGLTexture >(int64_t, size_t, size_t)> ExternalTextureCallback
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
#define FML_LOG(severity)
#define FML_DCHECK(condition)
SK_API GrBackendTexture MakeGL(int width, int height, skgpu::Mipmapped, const GrGLTextureInfo &glInfo, std::string_view label={})
SK_API sk_sp< SkImage > BorrowTextureFrom(GrRecordingContext *context, const GrBackendTexture &backendTexture, GrSurfaceOrigin origin, SkColorType colorType, SkAlphaType alphaType, sk_sp< SkColorSpace > colorSpace, TextureReleaseProc textureReleaseProc=nullptr, ReleaseContext releaseContext=nullptr)
void(*)(ReleaseContext) TextureReleaseProc
Optional< SkRect > bounds
sk_sp< const SkImage > image
SkSamplingOptions sampling
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
flutter::DlCanvas DlCanvas
static constexpr SkISize Make(int32_t w, int32_t h)
static SkRect Make(const SkISize &size)
GrDirectContext * gr_context