Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions shell/platform/android/surface_texture_external_texture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ namespace flutter {
SurfaceTextureExternalTexture::SurfaceTextureExternalTexture(
int64_t id,
const fml::jni::ScopedJavaGlobalRef<jobject>& surface_texture,
std::shared_ptr<PlatformViewAndroidJNI> jni_facade)
const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade)
: Texture(id),
jni_facade_(std::move(jni_facade)),
jni_facade_(jni_facade),
surface_texture_(surface_texture),
transform_(SkMatrix::I()) {}

Expand Down
2 changes: 1 addition & 1 deletion shell/platform/android/surface_texture_external_texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SurfaceTextureExternalTexture : public flutter::Texture {
SurfaceTextureExternalTexture(
int64_t id,
const fml::jni::ScopedJavaGlobalRef<jobject>& surface_texture,
std::shared_ptr<PlatformViewAndroidJNI> jni_facade);
const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade);

~SurfaceTextureExternalTexture() override;

Expand Down
12 changes: 6 additions & 6 deletions shell/platform/android/surface_texture_external_texture_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ namespace flutter {
SurfaceTextureExternalTextureGL::SurfaceTextureExternalTextureGL(
int64_t id,
const fml::jni::ScopedJavaGlobalRef<jobject>& surface_texture,
std::shared_ptr<PlatformViewAndroidJNI> jni_facade)
const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade)
: SurfaceTextureExternalTexture(id, surface_texture, jni_facade) {}

SurfaceTextureExternalTextureGL::~SurfaceTextureExternalTextureGL() {
Detach();
if (texture_name_ != 0) {
glDeleteTextures(1, &texture_name_);
}
}

void SurfaceTextureExternalTextureGL::ProcessFrame(PaintContext& context,
Expand Down Expand Up @@ -66,14 +68,12 @@ SurfaceTextureExternalTextureImpellerGL::
const std::shared_ptr<impeller::ContextGLES>& context,
int64_t id,
const fml::jni::ScopedJavaGlobalRef<jobject>& surface_texture,
std::shared_ptr<PlatformViewAndroidJNI> jni_facade)
const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade)
: SurfaceTextureExternalTexture(id, surface_texture, jni_facade),
impeller_context_(context) {}

SurfaceTextureExternalTextureImpellerGL::
~SurfaceTextureExternalTextureImpellerGL() {
Detach();
}
~SurfaceTextureExternalTextureImpellerGL() {}

void SurfaceTextureExternalTextureImpellerGL::ProcessFrame(
PaintContext& context,
Expand Down
4 changes: 2 additions & 2 deletions shell/platform/android/surface_texture_external_texture_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SurfaceTextureExternalTextureGL : public SurfaceTextureExternalTexture {
SurfaceTextureExternalTextureGL(
int64_t id,
const fml::jni::ScopedJavaGlobalRef<jobject>& surface_texture,
std::shared_ptr<PlatformViewAndroidJNI> jni_facade);
const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade);

~SurfaceTextureExternalTextureGL() override;

Expand All @@ -44,7 +44,7 @@ class SurfaceTextureExternalTextureImpellerGL
const std::shared_ptr<impeller::ContextGLES>& context,
int64_t id,
const fml::jni::ScopedJavaGlobalRef<jobject>& surface_texture,
std::shared_ptr<PlatformViewAndroidJNI> jni_facade);
const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade);

~SurfaceTextureExternalTextureImpellerGL() override;

Expand Down