5#include "flutter/shell/platform/android/surface_texture_external_texture.h"
11#include "flutter/display_list/effects/dl_color_source.h"
27 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade)
29 jni_facade_(jni_facade),
30 surface_texture_(surface_texture),
50 const bool should_process_frame =
52 if (should_process_frame) {
72 paintWithShader = *context.
paint;
81 <<
"No DlImage available for SurfaceTextureExternalTexture to paint.";
127 <<
"Invalid (not invertable) SurfaceTexture transformation matrix";
bool invert(SkMatrix *inverse) const
virtual void DrawRect(const SkRect &rect, const DlPaint &paint)=0
virtual void Scale(SkScalar sx, SkScalar sy)=0
virtual void Translate(SkScalar tx, SkScalar ty)=0
virtual void DrawImage(const sk_sp< DlImage > &image, const SkPoint point, DlImageSampling sampling, const DlPaint *paint=nullptr)=0
DlPaint & setColorSource(std::shared_ptr< const DlColorSource > source)
void MarkNewFrameAvailable() override
void OnGrContextCreated() override
SurfaceTextureExternalTexture(int64_t id, const fml::jni::ScopedJavaGlobalRef< jobject > &surface_texture, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade)
~SurfaceTextureExternalTexture() override
void Paint(PaintContext &context, const SkRect &bounds, bool freeze, const DlImageSampling sampling) override
sk_sp< flutter::DlImage > dl_image_
fml::jni::ScopedJavaGlobalRef< jobject > surface_texture_
void Attach(int gl_tex_id)
void OnTextureUnregistered() override
void OnGrContextDestroyed() override
std::shared_ptr< PlatformViewAndroidJNI > jni_facade_
virtual void ProcessFrame(PaintContext &context, const SkRect &bounds)=0
void reset(T *ptr=nullptr)
#define FML_LOG(severity)
#define FML_CHECK(condition)
Optional< SkRect > bounds
SkSamplingOptions sampling
static constexpr SkRect MakeWH(float w, float h)