[flutter_releases] apply patches to flutter-2.5-candidate.8 (#28520)
* Roll Skia cherrypicks
* Revert "Reland enable DisplayList by default (#27892)" (#28308)
* Started providing the GPU sync switch to Rasterizer.DrawToSurface() (#28383)
Co-authored-by: Aaron Clarke <gaaclarke>
* Update licenses_skia
* update .ci.yaml
Co-authored-by: Jim Graham <flar@google.com>
Co-authored-by: ColdPaleLight <31977171+ColdPaleLight@users.noreply.github.com>
diff --git a/.ci.yaml b/.ci.yaml
index 42f0608..912f96b 100644
--- a/.ci.yaml
+++ b/.ci.yaml
@@ -10,6 +10,7 @@
- dev
- beta
- stable
+ - flutter-2.5-candidate.8
platform_properties:
linux:
diff --git a/DEPS b/DEPS
index 046cd10..d477de1 100644
--- a/DEPS
+++ b/DEPS
@@ -27,7 +27,7 @@
'skia_git': 'https://skia.googlesource.com',
# OCMock is for testing only so there is no google clone
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
- 'skia_revision': '9a6f3990aff79e826e6c5b7c11c384e4ea19b89f',
+ 'skia_revision': 'e835a74ea80e00c90ec0bf3281c09d01eda32311',
# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia
index d7f93b3..dd4cca5 100644
--- a/ci/licenses_golden/licenses_skia
+++ b/ci/licenses_golden/licenses_skia
@@ -1,4 +1,4 @@
-Signature: f1dd52ab83ce37340bbe5f8c4f35bb5e
+Signature: eed272ad3db69cb88daa5be046a86122
UNUSED LICENSES:
diff --git a/common/settings.h b/common/settings.h
index 332e328..c6289d9 100644
--- a/common/settings.h
+++ b/common/settings.h
@@ -166,7 +166,7 @@
bool enable_skparagraph = false;
// Selects the DisplayList for storage of rendering operations.
- bool enable_display_list = true;
+ bool enable_display_list = false;
// All shells in the process share the same VM. The last shell to shutdown
// should typically shut down the VM as well. However, applications depend on
diff --git a/flow/compositor_context.h b/flow/compositor_context.h
index ca1bb66..7c10f3b 100644
--- a/flow/compositor_context.h
+++ b/flow/compositor_context.h
@@ -46,8 +46,12 @@
kEnqueuePipeline,
// Failed to rasterize the frame.
kFailed,
- // Layer tree was discarded due to LayerTreeDiscardCallback
- kDiscarded
+ // Layer tree was discarded due to LayerTreeDiscardCallback or inability to
+ // access the GPU.
+ kDiscarded,
+ // Drawing was yielded to allow the correct thread to draw as a result of the
+ // RasterThreadMerger.
+ kYielded,
};
class CompositorContext {
diff --git a/flow/embedded_views.cc b/flow/embedded_views.cc
index bf4ccaa..9441c8d 100644
--- a/flow/embedded_views.cc
+++ b/flow/embedded_views.cc
@@ -6,10 +6,8 @@
namespace flutter {
-void ExternalViewEmbedder::SubmitFrame(
- GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch) {
+void ExternalViewEmbedder::SubmitFrame(GrDirectContext* context,
+ std::unique_ptr<SurfaceFrame> frame) {
frame->Submit();
};
diff --git a/flow/embedded_views.h b/flow/embedded_views.h
index 8f8e228..c94d671 100644
--- a/flow/embedded_views.h
+++ b/flow/embedded_views.h
@@ -10,7 +10,6 @@
#include "flutter/flow/surface_frame.h"
#include "flutter/fml/memory/ref_counted.h"
#include "flutter/fml/raster_thread_merger.h"
-#include "flutter/fml/synchronization/sync_switch.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkPoint.h"
@@ -313,10 +312,8 @@
// This method can mutate the root Skia canvas before submitting the frame.
//
// It can also allocate frames for overlay surfaces to compose hybrid views.
- virtual void SubmitFrame(
- GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch);
+ virtual void SubmitFrame(GrDirectContext* context,
+ std::unique_ptr<SurfaceFrame> frame);
// This method provides the embedder a way to do additional tasks after
// |SubmitFrame|. For example, merge task runners if `should_resubmit_frame`
diff --git a/flow/surface.cc b/flow/surface.cc
index 7dbe56c..79c8c8d 100644
--- a/flow/surface.cc
+++ b/flow/surface.cc
@@ -18,4 +18,8 @@
return false;
}
+bool Surface::AllowsDrawingWhenGpuDisabled() const {
+ return true;
+}
+
} // namespace flutter
diff --git a/flow/surface.h b/flow/surface.h
index 21b248c..fc8daae 100644
--- a/flow/surface.h
+++ b/flow/surface.h
@@ -33,6 +33,8 @@
virtual bool ClearRenderContext();
+ virtual bool AllowsDrawingWhenGpuDisabled() const;
+
private:
FML_DISALLOW_COPY_AND_ASSIGN(Surface);
};
diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc
index 502e04c..fe39958 100644
--- a/shell/common/rasterizer.cc
+++ b/shell/common/rasterizer.cc
@@ -147,7 +147,7 @@
DrawToSurface(*frame_timings_recorder, *last_layer_tree_);
}
-void Rasterizer::Draw(
+RasterStatus Rasterizer::Draw(
std::unique_ptr<FrameTimingsRecorder> frame_timings_recorder,
std::shared_ptr<Pipeline<flutter::LayerTree>> pipeline,
LayerTreeDiscardCallback discardCallback) {
@@ -156,7 +156,7 @@
if (raster_thread_merger_ &&
!raster_thread_merger_->IsOnRasterizingThread()) {
// we yield and let this frame be serviced on the right thread.
- return;
+ return RasterStatus::kYielded;
}
FML_DCHECK(delegate_.GetTaskRunners()
.GetRasterTaskRunner()
@@ -217,6 +217,8 @@
default:
break;
}
+
+ return raster_status;
}
namespace {
@@ -385,6 +387,8 @@
raster_status == RasterStatus::kSkipAndRetry) {
resubmitted_layer_tree_ = std::move(layer_tree);
return raster_status;
+ } else if (raster_status == RasterStatus::kDiscarded) {
+ return raster_status;
}
if (persistent_cache->IsDumpingSkp() &&
@@ -465,6 +469,31 @@
TRACE_EVENT0("flutter", "Rasterizer::DrawToSurface");
FML_DCHECK(surface_);
+ RasterStatus raster_status;
+ if (surface_->AllowsDrawingWhenGpuDisabled()) {
+ raster_status = DrawToSurfaceUnsafe(frame_timings_recorder, layer_tree);
+ } else {
+ delegate_.GetIsGpuDisabledSyncSwitch()->Execute(
+ fml::SyncSwitch::Handlers()
+ .SetIfTrue([&] { raster_status = RasterStatus::kDiscarded; })
+ .SetIfFalse([&] {
+ raster_status =
+ DrawToSurfaceUnsafe(frame_timings_recorder, layer_tree);
+ }));
+ }
+
+ return raster_status;
+}
+
+/// Unsafe because it assumes we have access to the GPU which isn't the case
+/// when iOS is backgrounded, for example.
+/// \see Rasterizer::DrawToSurface
+RasterStatus Rasterizer::DrawToSurfaceUnsafe(
+ FrameTimingsRecorder& frame_timings_recorder,
+ flutter::LayerTree& layer_tree) {
+ TRACE_EVENT0("flutter", "Rasterizer::DrawToSurfaceUnsafe");
+ FML_DCHECK(surface_);
+
compositor_context_->ui_time().SetLapTime(
frame_timings_recorder.GetBuildDuration());
@@ -512,9 +541,8 @@
if (external_view_embedder_ &&
(!raster_thread_merger_ || raster_thread_merger_->IsMerged())) {
FML_DCHECK(!frame->IsSubmitted());
- external_view_embedder_->SubmitFrame(
- surface_->GetContext(), std::move(frame),
- delegate_.GetIsGpuDisabledSyncSwitch());
+ external_view_embedder_->SubmitFrame(surface_->GetContext(),
+ std::move(frame));
} else {
frame->Submit();
}
diff --git a/shell/common/rasterizer.h b/shell/common/rasterizer.h
index 15beadf..2829f0c 100644
--- a/shell/common/rasterizer.h
+++ b/shell/common/rasterizer.h
@@ -233,9 +233,10 @@
/// @param[in] discardCallback if specified and returns true, the layer tree
/// is discarded instead of being rendered
///
- void Draw(std::unique_ptr<FrameTimingsRecorder> frame_timings_recorder,
- std::shared_ptr<Pipeline<flutter::LayerTree>> pipeline,
- LayerTreeDiscardCallback discardCallback = NoDiscard);
+ RasterStatus Draw(
+ std::unique_ptr<FrameTimingsRecorder> frame_timings_recorder,
+ std::shared_ptr<Pipeline<flutter::LayerTree>> pipeline,
+ LayerTreeDiscardCallback discardCallback = NoDiscard);
//----------------------------------------------------------------------------
/// @brief The type of the screenshot to obtain of the previously
@@ -492,6 +493,9 @@
RasterStatus DrawToSurface(FrameTimingsRecorder& frame_timings_recorder,
flutter::LayerTree& layer_tree);
+ RasterStatus DrawToSurfaceUnsafe(FrameTimingsRecorder& frame_timings_recorder,
+ flutter::LayerTree& layer_tree);
+
void FireNextFrameCallbackIfPresent();
static bool NoDiscard(const flutter::LayerTree& layer_tree) { return false; }
diff --git a/shell/common/rasterizer_unittests.cc b/shell/common/rasterizer_unittests.cc
index 3bd3f824..5d082a6 100644
--- a/shell/common/rasterizer_unittests.cc
+++ b/shell/common/rasterizer_unittests.cc
@@ -45,6 +45,7 @@
MOCK_METHOD0(GetExternalViewEmbedder, ExternalViewEmbedder*());
MOCK_METHOD0(MakeRenderContextCurrent, std::unique_ptr<GLContextResult>());
MOCK_METHOD0(ClearRenderContext, bool());
+ MOCK_CONST_METHOD0(AllowsDrawingWhenGpuDisabled, bool());
};
class MockExternalViewEmbedder : public ExternalViewEmbedder {
@@ -63,11 +64,9 @@
fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger));
MOCK_METHOD0(GetCurrentCanvases, std::vector<SkCanvas*>());
MOCK_METHOD1(CompositeEmbeddedView, SkCanvas*(int view_id));
- MOCK_METHOD3(SubmitFrame,
+ MOCK_METHOD2(SubmitFrame,
void(GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>&
- gpu_disable_sync_switch));
+ std::unique_ptr<SurfaceFrame> frame));
MOCK_METHOD2(EndFrame,
void(bool should_resubmit_frame,
fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger));
@@ -142,6 +141,7 @@
auto surface_frame = std::make_unique<SurfaceFrame>(
/*surface=*/nullptr, /*supports_readback=*/true,
/*submit_callback=*/[](const SurfaceFrame&, SkCanvas*) { return true; });
+ EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true));
EXPECT_CALL(*surface, AcquireFrame(SkISize()))
.WillOnce(Return(ByMove(std::move(surface_frame))));
EXPECT_CALL(*surface, MakeRenderContextCurrent())
@@ -202,6 +202,7 @@
auto surface_frame = std::make_unique<SurfaceFrame>(
/*surface=*/nullptr, /*supports_readback=*/true,
/*submit_callback=*/[](const SurfaceFrame&, SkCanvas*) { return true; });
+ EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true));
EXPECT_CALL(*surface, AcquireFrame(SkISize()))
.WillOnce(Return(ByMove(std::move(surface_frame))));
EXPECT_CALL(*surface, MakeRenderContextCurrent())
@@ -262,6 +263,7 @@
auto surface_frame = std::make_unique<SurfaceFrame>(
/*surface=*/nullptr, /*supports_readback=*/true,
/*submit_callback=*/[](const SurfaceFrame&, SkCanvas*) { return true; });
+ EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true));
EXPECT_CALL(*surface, AcquireFrame(SkISize()))
.WillOnce(Return(ByMove(std::move(surface_frame))));
EXPECT_CALL(*surface, MakeRenderContextCurrent())
@@ -325,4 +327,200 @@
});
latch.Wait();
}
+
+TEST(RasterizerTest,
+ drawWithGpuEnabledAndSurfaceAllowsDrawingWhenGpuDisabledDoesAcquireFrame) {
+ std::string test_name =
+ ::testing::UnitTest::GetInstance()->current_test_info()->name();
+ ThreadHost thread_host("io.flutter.test." + test_name + ".",
+ ThreadHost::Type::Platform | ThreadHost::Type::RASTER |
+ ThreadHost::Type::IO | ThreadHost::Type::UI);
+ TaskRunners task_runners("test", thread_host.platform_thread->GetTaskRunner(),
+ thread_host.raster_thread->GetTaskRunner(),
+ thread_host.ui_thread->GetTaskRunner(),
+ thread_host.io_thread->GetTaskRunner());
+ MockDelegate delegate;
+ EXPECT_CALL(delegate, GetTaskRunners())
+ .WillRepeatedly(ReturnRef(task_runners));
+ EXPECT_CALL(delegate, OnFrameRasterized(_));
+
+ auto rasterizer = std::make_unique<Rasterizer>(delegate);
+ auto surface = std::make_unique<MockSurface>();
+ auto is_gpu_disabled_sync_switch =
+ std::make_shared<const fml::SyncSwitch>(false);
+
+ auto surface_frame = std::make_unique<SurfaceFrame>(
+ /*surface=*/nullptr, /*supports_readback=*/true,
+ /*submit_callback=*/[](const SurfaceFrame&, SkCanvas*) { return true; });
+ EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true));
+ ON_CALL(delegate, GetIsGpuDisabledSyncSwitch())
+ .WillByDefault(Return(is_gpu_disabled_sync_switch));
+ EXPECT_CALL(delegate, GetIsGpuDisabledSyncSwitch()).Times(0);
+ EXPECT_CALL(*surface, AcquireFrame(SkISize()))
+ .WillOnce(Return(ByMove(std::move(surface_frame))));
+ EXPECT_CALL(*surface, MakeRenderContextCurrent())
+ .WillOnce(Return(ByMove(std::make_unique<GLContextDefaultResult>(true))));
+
+ rasterizer->Setup(std::move(surface));
+ fml::AutoResetWaitableEvent latch;
+ thread_host.raster_thread->GetTaskRunner()->PostTask([&] {
+ auto pipeline = std::make_shared<Pipeline<LayerTree>>(/*depth=*/10);
+ auto layer_tree = std::make_unique<LayerTree>(/*frame_size=*/SkISize(),
+ /*device_pixel_ratio=*/2.0f);
+ bool result = pipeline->Produce().Complete(std::move(layer_tree));
+ EXPECT_TRUE(result);
+ auto no_discard = [](LayerTree&) { return false; };
+ rasterizer->Draw(CreateFinishedBuildRecorder(), pipeline, no_discard);
+ latch.Signal();
+ });
+ latch.Wait();
+}
+
+TEST(
+ RasterizerTest,
+ drawWithGpuDisabledAndSurfaceAllowsDrawingWhenGpuDisabledDoesAcquireFrame) {
+ std::string test_name =
+ ::testing::UnitTest::GetInstance()->current_test_info()->name();
+ ThreadHost thread_host("io.flutter.test." + test_name + ".",
+ ThreadHost::Type::Platform | ThreadHost::Type::RASTER |
+ ThreadHost::Type::IO | ThreadHost::Type::UI);
+ TaskRunners task_runners("test", thread_host.platform_thread->GetTaskRunner(),
+ thread_host.raster_thread->GetTaskRunner(),
+ thread_host.ui_thread->GetTaskRunner(),
+ thread_host.io_thread->GetTaskRunner());
+ MockDelegate delegate;
+ EXPECT_CALL(delegate, GetTaskRunners())
+ .WillRepeatedly(ReturnRef(task_runners));
+ EXPECT_CALL(delegate, OnFrameRasterized(_));
+ auto rasterizer = std::make_unique<Rasterizer>(delegate);
+ auto surface = std::make_unique<MockSurface>();
+ auto is_gpu_disabled_sync_switch =
+ std::make_shared<const fml::SyncSwitch>(true);
+
+ auto surface_frame = std::make_unique<SurfaceFrame>(
+ /*surface=*/nullptr, /*supports_readback=*/true,
+ /*submit_callback=*/[](const SurfaceFrame&, SkCanvas*) { return true; });
+ EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true));
+ ON_CALL(delegate, GetIsGpuDisabledSyncSwitch())
+ .WillByDefault(Return(is_gpu_disabled_sync_switch));
+ EXPECT_CALL(delegate, GetIsGpuDisabledSyncSwitch()).Times(0);
+ EXPECT_CALL(*surface, AcquireFrame(SkISize()))
+ .WillOnce(Return(ByMove(std::move(surface_frame))));
+ EXPECT_CALL(*surface, MakeRenderContextCurrent())
+ .WillOnce(Return(ByMove(std::make_unique<GLContextDefaultResult>(true))));
+
+ rasterizer->Setup(std::move(surface));
+ fml::AutoResetWaitableEvent latch;
+ thread_host.raster_thread->GetTaskRunner()->PostTask([&] {
+ auto pipeline = std::make_shared<Pipeline<LayerTree>>(/*depth=*/10);
+ auto layer_tree = std::make_unique<LayerTree>(/*frame_size=*/SkISize(),
+ /*device_pixel_ratio=*/2.0f);
+ bool result = pipeline->Produce().Complete(std::move(layer_tree));
+ EXPECT_TRUE(result);
+ auto no_discard = [](LayerTree&) { return false; };
+ RasterStatus status =
+ rasterizer->Draw(CreateFinishedBuildRecorder(), pipeline, no_discard);
+ EXPECT_EQ(status, RasterStatus::kSuccess);
+ latch.Signal();
+ });
+ latch.Wait();
+}
+
+TEST(
+ RasterizerTest,
+ drawWithGpuEnabledAndSurfaceDisallowsDrawingWhenGpuDisabledDoesAcquireFrame) {
+ std::string test_name =
+ ::testing::UnitTest::GetInstance()->current_test_info()->name();
+ ThreadHost thread_host("io.flutter.test." + test_name + ".",
+ ThreadHost::Type::Platform | ThreadHost::Type::RASTER |
+ ThreadHost::Type::IO | ThreadHost::Type::UI);
+ TaskRunners task_runners("test", thread_host.platform_thread->GetTaskRunner(),
+ thread_host.raster_thread->GetTaskRunner(),
+ thread_host.ui_thread->GetTaskRunner(),
+ thread_host.io_thread->GetTaskRunner());
+ MockDelegate delegate;
+ EXPECT_CALL(delegate, GetTaskRunners())
+ .WillRepeatedly(ReturnRef(task_runners));
+ EXPECT_CALL(delegate, OnFrameRasterized(_));
+ auto rasterizer = std::make_unique<Rasterizer>(delegate);
+ auto surface = std::make_unique<MockSurface>();
+ auto is_gpu_disabled_sync_switch =
+ std::make_shared<const fml::SyncSwitch>(false);
+
+ auto surface_frame = std::make_unique<SurfaceFrame>(
+ /*surface=*/nullptr, /*supports_readback=*/true,
+ /*submit_callback=*/[](const SurfaceFrame&, SkCanvas*) { return true; });
+ EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(false));
+ EXPECT_CALL(delegate, GetIsGpuDisabledSyncSwitch())
+ .WillOnce(Return(is_gpu_disabled_sync_switch));
+ EXPECT_CALL(*surface, AcquireFrame(SkISize()))
+ .WillOnce(Return(ByMove(std::move(surface_frame))));
+ EXPECT_CALL(*surface, MakeRenderContextCurrent())
+ .WillOnce(Return(ByMove(std::make_unique<GLContextDefaultResult>(true))));
+
+ rasterizer->Setup(std::move(surface));
+ fml::AutoResetWaitableEvent latch;
+ thread_host.raster_thread->GetTaskRunner()->PostTask([&] {
+ auto pipeline = std::make_shared<Pipeline<LayerTree>>(/*depth=*/10);
+ auto layer_tree = std::make_unique<LayerTree>(/*frame_size=*/SkISize(),
+ /*device_pixel_ratio=*/2.0f);
+ bool result = pipeline->Produce().Complete(std::move(layer_tree));
+ EXPECT_TRUE(result);
+ auto no_discard = [](LayerTree&) { return false; };
+ RasterStatus status =
+ rasterizer->Draw(CreateFinishedBuildRecorder(), pipeline, no_discard);
+ EXPECT_EQ(status, RasterStatus::kSuccess);
+ latch.Signal();
+ });
+ latch.Wait();
+}
+
+TEST(
+ RasterizerTest,
+ drawWithGpuDisabledAndSurfaceDisallowsDrawingWhenGpuDisabledDoesntAcquireFrame) {
+ std::string test_name =
+ ::testing::UnitTest::GetInstance()->current_test_info()->name();
+ ThreadHost thread_host("io.flutter.test." + test_name + ".",
+ ThreadHost::Type::Platform | ThreadHost::Type::RASTER |
+ ThreadHost::Type::IO | ThreadHost::Type::UI);
+ TaskRunners task_runners("test", thread_host.platform_thread->GetTaskRunner(),
+ thread_host.raster_thread->GetTaskRunner(),
+ thread_host.ui_thread->GetTaskRunner(),
+ thread_host.io_thread->GetTaskRunner());
+ MockDelegate delegate;
+ EXPECT_CALL(delegate, GetTaskRunners())
+ .WillRepeatedly(ReturnRef(task_runners));
+ EXPECT_CALL(delegate, OnFrameRasterized(_)).Times(0);
+ auto rasterizer = std::make_unique<Rasterizer>(delegate);
+ auto surface = std::make_unique<MockSurface>();
+ auto is_gpu_disabled_sync_switch =
+ std::make_shared<const fml::SyncSwitch>(true);
+
+ auto surface_frame = std::make_unique<SurfaceFrame>(
+ /*surface=*/nullptr, /*supports_readback=*/true,
+ /*submit_callback=*/[](const SurfaceFrame&, SkCanvas*) { return true; });
+ EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(false));
+ EXPECT_CALL(delegate, GetIsGpuDisabledSyncSwitch())
+ .WillOnce(Return(is_gpu_disabled_sync_switch));
+ EXPECT_CALL(*surface, AcquireFrame(SkISize())).Times(0);
+ EXPECT_CALL(*surface, MakeRenderContextCurrent())
+ .WillOnce(Return(ByMove(std::make_unique<GLContextDefaultResult>(true))));
+
+ rasterizer->Setup(std::move(surface));
+ fml::AutoResetWaitableEvent latch;
+ thread_host.raster_thread->GetTaskRunner()->PostTask([&] {
+ auto pipeline = std::make_shared<Pipeline<LayerTree>>(/*depth=*/10);
+ auto layer_tree = std::make_unique<LayerTree>(/*frame_size=*/SkISize(),
+ /*device_pixel_ratio=*/2.0f);
+ bool result = pipeline->Produce().Complete(std::move(layer_tree));
+ EXPECT_TRUE(result);
+ auto no_discard = [](LayerTree&) { return false; };
+ RasterStatus status =
+ rasterizer->Draw(CreateFinishedBuildRecorder(), pipeline, no_discard);
+ EXPECT_EQ(status, RasterStatus::kDiscarded);
+ latch.Signal();
+ });
+ latch.Wait();
+}
+
} // namespace flutter
diff --git a/shell/common/shell_test_external_view_embedder.cc b/shell/common/shell_test_external_view_embedder.cc
index 300fc6a..5a8edc1 100644
--- a/shell/common/shell_test_external_view_embedder.cc
+++ b/shell/common/shell_test_external_view_embedder.cc
@@ -63,8 +63,7 @@
// |ExternalViewEmbedder|
void ShellTestExternalViewEmbedder::SubmitFrame(
GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch) {
+ std::unique_ptr<SurfaceFrame> frame) {
frame->Submit();
if (frame && frame->SkiaSurface()) {
last_submitted_frame_size_ = SkISize::Make(frame->SkiaSurface()->width(),
diff --git a/shell/common/shell_test_external_view_embedder.h b/shell/common/shell_test_external_view_embedder.h
index cd4d6c6..72c101e 100644
--- a/shell/common/shell_test_external_view_embedder.h
+++ b/shell/common/shell_test_external_view_embedder.h
@@ -63,9 +63,7 @@
// |ExternalViewEmbedder|
void SubmitFrame(GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>&
- gpu_disable_sync_switch) override;
+ std::unique_ptr<SurfaceFrame> frame) override;
// |ExternalViewEmbedder|
void EndFrame(
diff --git a/shell/gpu/gpu_surface_gl.cc b/shell/gpu/gpu_surface_gl.cc
index e781356..9d06aa9 100644
--- a/shell/gpu/gpu_surface_gl.cc
+++ b/shell/gpu/gpu_surface_gl.cc
@@ -318,4 +318,9 @@
return delegate_->GLContextClearCurrent();
}
+// |Surface|
+bool GPUSurfaceGL::AllowsDrawingWhenGpuDisabled() const {
+ return delegate_->AllowsDrawingWhenGpuDisabled();
+}
+
} // namespace flutter
diff --git a/shell/gpu/gpu_surface_gl.h b/shell/gpu/gpu_surface_gl.h
index f1be74c..e4b04d3 100644
--- a/shell/gpu/gpu_surface_gl.h
+++ b/shell/gpu/gpu_surface_gl.h
@@ -50,6 +50,9 @@
// |Surface|
bool ClearRenderContext() override;
+ // |Surface|
+ bool AllowsDrawingWhenGpuDisabled() const override;
+
private:
GPUSurfaceGLDelegate* delegate_;
sk_sp<GrDirectContext> context_;
diff --git a/shell/gpu/gpu_surface_gl_delegate.cc b/shell/gpu/gpu_surface_gl_delegate.cc
index 66f9df2..70bdfc0 100644
--- a/shell/gpu/gpu_surface_gl_delegate.cc
+++ b/shell/gpu/gpu_surface_gl_delegate.cc
@@ -99,4 +99,8 @@
return CreateGLInterface(nullptr);
}
+bool GPUSurfaceGLDelegate::AllowsDrawingWhenGpuDisabled() const {
+ return true;
+}
+
} // namespace flutter
diff --git a/shell/gpu/gpu_surface_gl_delegate.h b/shell/gpu/gpu_surface_gl_delegate.h
index fff9694..fb13c82 100644
--- a/shell/gpu/gpu_surface_gl_delegate.h
+++ b/shell/gpu/gpu_surface_gl_delegate.h
@@ -69,6 +69,9 @@
// instrumentation to specific GL calls can specify custom GL functions
// here.
virtual GLProcResolver GetGLProcResolver() const;
+
+ // Whether to allow drawing to the surface when the GPU is disabled
+ virtual bool AllowsDrawingWhenGpuDisabled() const;
};
} // namespace flutter
diff --git a/shell/gpu/gpu_surface_metal.h b/shell/gpu/gpu_surface_metal.h
index bd715ec..8899089 100644
--- a/shell/gpu/gpu_surface_metal.h
+++ b/shell/gpu/gpu_surface_metal.h
@@ -49,6 +49,9 @@
// |Surface|
std::unique_ptr<GLContextResult> MakeRenderContextCurrent() override;
+ // |Surface|
+ bool AllowsDrawingWhenGpuDisabled() const override;
+
std::unique_ptr<SurfaceFrame> AcquireFrameFromCAMetalLayer(
const SkISize& frame_info);
diff --git a/shell/gpu/gpu_surface_metal.mm b/shell/gpu/gpu_surface_metal.mm
index ea40dda..d3ec678 100644
--- a/shell/gpu/gpu_surface_metal.mm
+++ b/shell/gpu/gpu_surface_metal.mm
@@ -184,6 +184,10 @@
return std::make_unique<GLContextDefaultResult>(true);
}
+bool GPUSurfaceMetal::AllowsDrawingWhenGpuDisabled() const {
+ return delegate_->AllowsDrawingWhenGpuDisabled();
+}
+
void GPUSurfaceMetal::ReleaseUnusedDrawableIfNecessary() {
// If the previous surface frame was not submitted before a new one is acquired, the old drawable
// needs to be released. An RAII wrapper may not be used because this needs to interoperate with
diff --git a/shell/gpu/gpu_surface_metal_delegate.cc b/shell/gpu/gpu_surface_metal_delegate.cc
index 427614e..7a22d8d 100644
--- a/shell/gpu/gpu_surface_metal_delegate.cc
+++ b/shell/gpu/gpu_surface_metal_delegate.cc
@@ -16,4 +16,8 @@
return render_target_type_;
}
+bool GPUSurfaceMetalDelegate::AllowsDrawingWhenGpuDisabled() const {
+ return true;
+}
+
} // namespace flutter
diff --git a/shell/gpu/gpu_surface_metal_delegate.h b/shell/gpu/gpu_surface_metal_delegate.h
index b11a622..5611204 100644
--- a/shell/gpu/gpu_surface_metal_delegate.h
+++ b/shell/gpu/gpu_surface_metal_delegate.h
@@ -89,6 +89,11 @@
///
virtual bool PresentTexture(GPUMTLTextureInfo texture) const = 0;
+ //------------------------------------------------------------------------------
+ /// @brief Whether to allow drawing to the surface when the GPU is disabled
+ ///
+ virtual bool AllowsDrawingWhenGpuDisabled() const;
+
MTLRenderTargetType GetRenderTargetType();
private:
diff --git a/shell/platform/android/external_view_embedder/external_view_embedder.cc b/shell/platform/android/external_view_embedder/external_view_embedder.cc
index dd7c451..08596ba 100644
--- a/shell/platform/android/external_view_embedder/external_view_embedder.cc
+++ b/shell/platform/android/external_view_embedder/external_view_embedder.cc
@@ -75,8 +75,7 @@
// |ExternalViewEmbedder|
void AndroidExternalViewEmbedder::SubmitFrame(
GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch) {
+ std::unique_ptr<SurfaceFrame> frame) {
TRACE_EVENT0("flutter", "AndroidExternalViewEmbedder::SubmitFrame");
if (!FrameHasPlatformLayers()) {
diff --git a/shell/platform/android/external_view_embedder/external_view_embedder.h b/shell/platform/android/external_view_embedder/external_view_embedder.h
index f456674..a038616 100644
--- a/shell/platform/android/external_view_embedder/external_view_embedder.h
+++ b/shell/platform/android/external_view_embedder/external_view_embedder.h
@@ -47,9 +47,7 @@
// |ExternalViewEmbedder|
void SubmitFrame(GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>&
- gpu_disable_sync_switch) override;
+ std::unique_ptr<SurfaceFrame> frame) override;
// |ExternalViewEmbedder|
PostPrerollResult PostPrerollAction(
diff --git a/shell/platform/android/external_view_embedder/external_view_embedder_unittests.cc b/shell/platform/android/external_view_embedder/external_view_embedder_unittests.cc
index 24d0063..0b07e6c 100644
--- a/shell/platform/android/external_view_embedder/external_view_embedder_unittests.cc
+++ b/shell/platform/android/external_view_embedder/external_view_embedder_unittests.cc
@@ -334,7 +334,7 @@
return true;
});
- embedder->SubmitFrame(gr_context.get(), std::move(surface_frame), nullptr);
+ embedder->SubmitFrame(gr_context.get(), std::move(surface_frame));
// Submits frame if no Android view in the current frame.
EXPECT_TRUE(did_submit_frame);
// Doesn't resubmit frame.
@@ -401,7 +401,7 @@
return true;
});
- embedder->SubmitFrame(gr_context.get(), std::move(surface_frame), nullptr);
+ embedder->SubmitFrame(gr_context.get(), std::move(surface_frame));
// Doesn't submit frame if there aren't Android views in the previous frame.
EXPECT_FALSE(did_submit_frame);
// Resubmits frame.
@@ -465,7 +465,7 @@
}
return true;
});
- embedder->SubmitFrame(gr_context.get(), std::move(surface_frame), nullptr);
+ embedder->SubmitFrame(gr_context.get(), std::move(surface_frame));
// Submits frame if there are Android views in the previous frame.
EXPECT_TRUE(did_submit_frame);
// Doesn't resubmit frame.
@@ -573,7 +573,7 @@
return true;
});
- embedder->SubmitFrame(gr_context.get(), std::move(surface_frame), nullptr);
+ embedder->SubmitFrame(gr_context.get(), std::move(surface_frame));
EXPECT_CALL(*jni_mock, FlutterViewEndFrame());
embedder->EndFrame(/*should_resubmit_frame=*/false, raster_thread_merger);
@@ -640,7 +640,7 @@
return true;
});
- embedder->SubmitFrame(gr_context.get(), std::move(surface_frame), nullptr);
+ embedder->SubmitFrame(gr_context.get(), std::move(surface_frame));
EXPECT_CALL(*jni_mock, FlutterViewEndFrame());
embedder->EndFrame(/*should_resubmit_frame=*/false, raster_thread_merger);
@@ -734,7 +734,7 @@
std::make_unique<SurfaceFrame>(SkSurface::MakeNull(1000, 1000), false,
[](const SurfaceFrame& surface_frame,
SkCanvas* canvas) { return true; });
- embedder->SubmitFrame(gr_context.get(), std::move(surface_frame), nullptr);
+ embedder->SubmitFrame(gr_context.get(), std::move(surface_frame));
EXPECT_CALL(*jni_mock, FlutterViewEndFrame());
embedder->EndFrame(/*should_resubmit_frame=*/false, raster_thread_merger);
@@ -816,7 +816,7 @@
std::make_unique<SurfaceFrame>(SkSurface::MakeNull(1000, 1000), false,
[](const SurfaceFrame& surface_frame,
SkCanvas* canvas) { return true; });
- embedder->SubmitFrame(gr_context.get(), std::move(surface_frame), nullptr);
+ embedder->SubmitFrame(gr_context.get(), std::move(surface_frame));
EXPECT_CALL(*jni_mock, FlutterViewEndFrame());
embedder->EndFrame(/*should_resubmit_frame=*/false, raster_thread_merger);
diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm
index ed622f0..fdd540c 100644
--- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm
+++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm
@@ -462,22 +462,9 @@
);
}
-bool FlutterPlatformViewsController::SubmitFrame(
- GrDirectContext* gr_context,
- std::shared_ptr<IOSContext> ios_context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch) {
- bool result = false;
- gpu_disable_sync_switch->Execute(
- fml::SyncSwitch::Handlers().SetIfTrue([&] { result = false; }).SetIfFalse([&] {
- result = SubmitFrameGpuSafe(gr_context, ios_context, std::move(frame));
- }));
- return result;
-}
-
-bool FlutterPlatformViewsController::SubmitFrameGpuSafe(GrDirectContext* gr_context,
- std::shared_ptr<IOSContext> ios_context,
- std::unique_ptr<SurfaceFrame> frame) {
+bool FlutterPlatformViewsController::SubmitFrame(GrDirectContext* gr_context,
+ std::shared_ptr<IOSContext> ios_context,
+ std::unique_ptr<SurfaceFrame> frame) {
// Any UIKit related code has to run on main thread.
FML_DCHECK([[NSThread currentThread] isMainThread]);
if (flutter_view_ == nullptr) {
diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm
index 6cd7c34..0bcb1b4 100644
--- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm
+++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm
@@ -968,10 +968,8 @@
auto mock_surface = std::make_unique<flutter::SurfaceFrame>(
nullptr, true,
[](const flutter::SurfaceFrame& surface_frame, SkCanvas* canvas) { return false; });
- auto is_gpu_disabled = std::make_shared<fml::SyncSwitch>();
- is_gpu_disabled->SetSwitch(false);
- XCTAssertFalse(flutterPlatformViewsController->SubmitFrame(
- nullptr, nullptr, std::move(mock_surface), is_gpu_disabled));
+ XCTAssertFalse(
+ flutterPlatformViewsController->SubmitFrame(nullptr, nullptr, std::move(mock_surface)));
auto embeddedViewParams_2 =
std::make_unique<flutter::EmbeddedViewParams>(finalMatrix, SkSize::Make(300, 300), stack);
@@ -980,10 +978,8 @@
auto mock_surface_submit_false = std::make_unique<flutter::SurfaceFrame>(
nullptr, true,
[](const flutter::SurfaceFrame& surface_frame, SkCanvas* canvas) { return true; });
- auto gpu_is_disabled = std::make_shared<fml::SyncSwitch>();
- gpu_is_disabled->SetSwitch(false);
- XCTAssertTrue(flutterPlatformViewsController->SubmitFrame(
- nullptr, nullptr, std::move(mock_surface_submit_false), gpu_is_disabled));
+ XCTAssertTrue(flutterPlatformViewsController->SubmitFrame(nullptr, nullptr,
+ std::move(mock_surface_submit_false)));
}
- (void)
diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h
index c195f87..f886bd0 100644
--- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h
+++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h
@@ -173,8 +173,7 @@
bool SubmitFrame(GrDirectContext* gr_context,
std::shared_ptr<IOSContext> ios_context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch);
+ std::unique_ptr<SurfaceFrame> frame);
void OnMethodCall(FlutterMethodCall* call, FlutterResult& result);
@@ -300,10 +299,6 @@
// Commit a CATransaction if |BeginCATransaction| has been called during the frame.
void CommitCATransactionIfNeeded();
- bool SubmitFrameGpuSafe(GrDirectContext* gr_context,
- std::shared_ptr<IOSContext> ios_context,
- std::unique_ptr<SurfaceFrame> frame);
-
// Resets the state of the frame.
void ResetFrameState();
diff --git a/shell/platform/darwin/ios/ios_external_view_embedder.h b/shell/platform/darwin/ios/ios_external_view_embedder.h
index b6ca3b6..6c023d1 100644
--- a/shell/platform/darwin/ios/ios_external_view_embedder.h
+++ b/shell/platform/darwin/ios/ios_external_view_embedder.h
@@ -54,9 +54,7 @@
// |ExternalViewEmbedder|
void SubmitFrame(GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>&
- gpu_disable_sync_switch) override;
+ std::unique_ptr<SurfaceFrame> frame) override;
// |ExternalViewEmbedder|
void EndFrame(
diff --git a/shell/platform/darwin/ios/ios_external_view_embedder.mm b/shell/platform/darwin/ios/ios_external_view_embedder.mm
index 391044d..a4921af 100644
--- a/shell/platform/darwin/ios/ios_external_view_embedder.mm
+++ b/shell/platform/darwin/ios/ios_external_view_embedder.mm
@@ -72,14 +72,11 @@
}
// |ExternalViewEmbedder|
-void IOSExternalViewEmbedder::SubmitFrame(
- GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch) {
+void IOSExternalViewEmbedder::SubmitFrame(GrDirectContext* context,
+ std::unique_ptr<SurfaceFrame> frame) {
TRACE_EVENT0("flutter", "IOSExternalViewEmbedder::SubmitFrame");
FML_CHECK(platform_views_controller_);
- platform_views_controller_->SubmitFrame(std::move(context), ios_context_, std::move(frame),
- gpu_disable_sync_switch);
+ platform_views_controller_->SubmitFrame(std::move(context), ios_context_, std::move(frame));
TRACE_EVENT0("flutter", "IOSExternalViewEmbedder::DidSubmitFrame");
}
diff --git a/shell/platform/darwin/ios/ios_surface_gl.h b/shell/platform/darwin/ios/ios_surface_gl.h
index 0172e22..a541e28 100644
--- a/shell/platform/darwin/ios/ios_surface_gl.h
+++ b/shell/platform/darwin/ios/ios_surface_gl.h
@@ -46,6 +46,9 @@
// |GPUSurfaceGLDelegate|
bool SurfaceSupportsReadback() const override;
+ // |GPUSurfaceGLDelegate|
+ bool AllowsDrawingWhenGpuDisabled() const override;
+
private:
std::unique_ptr<IOSRenderTargetGL> render_target_;
diff --git a/shell/platform/darwin/ios/ios_surface_gl.mm b/shell/platform/darwin/ios/ios_surface_gl.mm
index 34983f3..e1c5bde 100644
--- a/shell/platform/darwin/ios/ios_surface_gl.mm
+++ b/shell/platform/darwin/ios/ios_surface_gl.mm
@@ -89,4 +89,9 @@
return IsValid() && render_target_->PresentRenderBuffer();
}
+// |GPUSurfaceGLDelegate|
+bool IOSSurfaceGL::AllowsDrawingWhenGpuDisabled() const {
+ return false;
+}
+
} // namespace flutter
diff --git a/shell/platform/darwin/ios/ios_surface_metal.h b/shell/platform/darwin/ios/ios_surface_metal.h
index c2e9b8c..2424cea 100644
--- a/shell/platform/darwin/ios/ios_surface_metal.h
+++ b/shell/platform/darwin/ios/ios_surface_metal.h
@@ -49,6 +49,9 @@
// |GPUSurfaceMetalDelegate|
bool PresentTexture(GPUMTLTextureInfo texture) const override;
+ // |GPUSurfaceMetalDelegate|
+ bool AllowsDrawingWhenGpuDisabled() const override;
+
FML_DISALLOW_COPY_AND_ASSIGN(IOSSurfaceMetal);
};
diff --git a/shell/platform/darwin/ios/ios_surface_metal.mm b/shell/platform/darwin/ios/ios_surface_metal.mm
index 64909e0..2df3fd0 100644
--- a/shell/platform/darwin/ios/ios_surface_metal.mm
+++ b/shell/platform/darwin/ios/ios_surface_metal.mm
@@ -98,4 +98,9 @@
return false;
}
+// |GPUSurfaceMetalDelegate|
+bool IOSSurfaceMetal::AllowsDrawingWhenGpuDisabled() const {
+ return false;
+}
+
} // namespace flutter
diff --git a/shell/platform/embedder/embedder_external_view_embedder.cc b/shell/platform/embedder/embedder_external_view_embedder.cc
index 1d816ab..a890260 100644
--- a/shell/platform/embedder/embedder_external_view_embedder.cc
+++ b/shell/platform/embedder/embedder_external_view_embedder.cc
@@ -135,8 +135,7 @@
// |ExternalViewEmbedder|
void EmbedderExternalViewEmbedder::SubmitFrame(
GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch) {
+ std::unique_ptr<SurfaceFrame> frame) {
auto [matched_render_targets, pending_keys] =
render_target_cache_.GetExistingTargetsInCache(pending_views_);
diff --git a/shell/platform/embedder/embedder_external_view_embedder.h b/shell/platform/embedder/embedder_external_view_embedder.h
index 62b4540..98fe8b2 100644
--- a/shell/platform/embedder/embedder_external_view_embedder.h
+++ b/shell/platform/embedder/embedder_external_view_embedder.h
@@ -98,9 +98,7 @@
// |ExternalViewEmbedder|
void SubmitFrame(GrDirectContext* context,
- std::unique_ptr<SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>&
- gpu_disable_sync_switch) override;
+ std::unique_ptr<SurfaceFrame> frame) override;
// |ExternalViewEmbedder|
SkCanvas* GetRootCanvas() override;
diff --git a/shell/platform/fuchsia/flutter/fuchsia_external_view_embedder.cc b/shell/platform/fuchsia/flutter/fuchsia_external_view_embedder.cc
index 639dd3c..c485c04 100644
--- a/shell/platform/fuchsia/flutter/fuchsia_external_view_embedder.cc
+++ b/shell/platform/fuchsia/flutter/fuchsia_external_view_embedder.cc
@@ -244,8 +244,7 @@
void FuchsiaExternalViewEmbedder::SubmitFrame(
GrDirectContext* context,
- std::unique_ptr<flutter::SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch) {
+ std::unique_ptr<flutter::SurfaceFrame> frame) {
TRACE_EVENT0("flutter", "FuchsiaExternalViewEmbedder::SubmitFrame");
std::vector<std::unique_ptr<SurfaceProducerSurface>> frame_surfaces;
std::unordered_map<EmbedderLayerId, size_t> frame_surface_indices;
diff --git a/shell/platform/fuchsia/flutter/fuchsia_external_view_embedder.h b/shell/platform/fuchsia/flutter/fuchsia_external_view_embedder.h
index 125c8f8..a5eb09d 100644
--- a/shell/platform/fuchsia/flutter/fuchsia_external_view_embedder.h
+++ b/shell/platform/fuchsia/flutter/fuchsia_external_view_embedder.h
@@ -104,9 +104,7 @@
// |ExternalViewEmbedder|
void SubmitFrame(GrDirectContext* context,
- std::unique_ptr<flutter::SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>&
- gpu_disable_sync_switch) override;
+ std::unique_ptr<flutter::SurfaceFrame> frame) override;
// |ExternalViewEmbedder|
void CancelFrame() override { Reset(); }
diff --git a/shell/platform/fuchsia/flutter/platform_view_unittest.cc b/shell/platform/fuchsia/flutter/platform_view_unittest.cc
index e6a7192..fb1a5e8 100644
--- a/shell/platform/fuchsia/flutter/platform_view_unittest.cc
+++ b/shell/platform/fuchsia/flutter/platform_view_unittest.cc
@@ -53,9 +53,7 @@
double device_pixel_ratio,
fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger) override {}
void SubmitFrame(GrDirectContext* context,
- std::unique_ptr<flutter::SurfaceFrame> frame,
- const std::shared_ptr<const fml::SyncSwitch>&
- gpu_disable_sync_switch) override {
+ std::unique_ptr<flutter::SurfaceFrame> frame) override {
return;
}