Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 2ebe9fd

Browse files
Merge branch 'main' into main
2 parents 8ccc196 + cca222b commit 2ebe9fd

21 files changed

+202
-427
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ vars = {
1414
'flutter_git': 'https://flutter.googlesource.com',
1515
'skia_git': 'https://skia.googlesource.com',
1616
'llvm_git': 'https://llvm.googlesource.com',
17-
'skia_revision': '18e4408592757a6e70355ecd6cec7dc68f97d670',
17+
'skia_revision': 'f3b9e80d262aa6724bcdbe15dde3650f284f35dd',
1818

1919
# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
2020
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.

shell/platform/android/android_shell_holder_unittests.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ class MockPlatformViewAndroidJNI : public PlatformViewAndroidJNI {
3535
SurfaceTextureAttachToGLContext,
3636
(JavaLocalRef surface_texture, int textureId),
3737
(override));
38-
MOCK_METHOD(bool,
39-
SurfaceTextureShouldUpdate,
40-
(JavaLocalRef surface_texture),
41-
(override));
4238
MOCK_METHOD(void,
4339
SurfaceTextureUpdateTexImage,
4440
(JavaLocalRef surface_texture),

shell/platform/android/image_external_texture.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ void ImageExternalTexture::Paint(PaintContext& context,
2626
return;
2727
}
2828
Attach(context);
29-
const bool should_process_frame = !freeze;
29+
const bool should_process_frame =
30+
(!freeze && new_frame_ready_) || dl_image_ == nullptr;
3031
if (should_process_frame) {
3132
ProcessFrame(context, bounds);
33+
new_frame_ready_ = false;
3234
}
3335
if (dl_image_) {
3436
context.canvas->DrawImageRect(
@@ -46,7 +48,7 @@ void ImageExternalTexture::Paint(PaintContext& context,
4648

4749
// Implementing flutter::Texture.
4850
void ImageExternalTexture::MarkNewFrameAvailable() {
49-
// NOOP.
51+
new_frame_ready_ = true;
5052
}
5153

5254
// Implementing flutter::Texture.

shell/platform/android/image_external_texture.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class ImageExternalTexture : public flutter::Texture {
6161

6262
enum class AttachmentState { kUninitialized, kAttached, kDetached };
6363
AttachmentState state_ = AttachmentState::kUninitialized;
64+
bool new_frame_ready_ = false;
6465

6566
sk_sp<flutter::DlImage> dl_image_;
6667

shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -951,16 +951,6 @@ public void markTextureFrameAvailable(long textureId) {
951951

952952
private native void nativeMarkTextureFrameAvailable(long nativeShellHolderId, long textureId);
953953

954-
/** Schedule the engine to draw a frame but does not invalidate the layout tree. */
955-
@UiThread
956-
public void scheduleFrame() {
957-
ensureRunningOnMainThread();
958-
ensureAttachedToNative();
959-
nativeScheduleFrame(nativeShellHolderId);
960-
}
961-
962-
private native void nativeScheduleFrame(long nativeShellHolderId);
963-
964954
/**
965955
* Unregisters a texture that was registered with {@link #registerTexture(long,
966956
* SurfaceTextureWrapper)}.

0 commit comments

Comments
 (0)