From c53ee755538331fc441d02c0e4b7c533b920cd7d Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 27 Sep 2023 07:44:54 -0700 Subject: [PATCH] Declare native wrapper classes in the GPU package as base classes (flutter/engine#46304) This prohibits other implementations of the class interface that can not act as native wrappers. See https://github.com/flutter/flutter/issues/123756 --- engine/src/flutter/lib/gpu/lib/src/context.dart | 2 +- engine/src/flutter/lib/ui/experiments/gpu.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/lib/gpu/lib/src/context.dart b/engine/src/flutter/lib/gpu/lib/src/context.dart index 1c1be14267..a0efc586d1 100644 --- a/engine/src/flutter/lib/gpu/lib/src/context.dart +++ b/engine/src/flutter/lib/gpu/lib/src/context.dart @@ -8,7 +8,7 @@ import 'dart:nativewrappers'; /// A handle to a graphics context. Used to create and manage GPU resources. /// /// To obtain the default graphics context, use [getContext]. -class GpuContext extends NativeFieldWrapperClass1 { +base class GpuContext extends NativeFieldWrapperClass1 { /// Creates a new graphics context that corresponds to the default Impeller /// context. GpuContext._createDefault() { diff --git a/engine/src/flutter/lib/ui/experiments/gpu.dart b/engine/src/flutter/lib/ui/experiments/gpu.dart index 282f955e66..6b07dc65ef 100644 --- a/engine/src/flutter/lib/ui/experiments/gpu.dart +++ b/engine/src/flutter/lib/ui/experiments/gpu.dart @@ -147,7 +147,7 @@ class RasterPipeline {} /// A handle to a graphics context. Used to create and manage GPU resources. /// /// To obtain the default graphics context, use [getGpuContext]. -class GpuContext extends NativeFieldWrapperClass1 { +base class GpuContext extends NativeFieldWrapperClass1 { /// Creates a new graphics context that corresponds to the default Impeller /// context. GpuContext._createDefault() {