From c85485ce33f176142953e8352cd8cfd8b80fc6bf Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 26 Sep 2023 14:36:52 -0700 Subject: [PATCH] Declare native wrapper classes in the GPU package as base classes This prohibits other implementations of the class interface that can not act as native wrappers. See https://github.com/flutter/flutter/issues/123756 --- lib/gpu/lib/src/context.dart | 2 +- lib/ui/experiments/gpu.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gpu/lib/src/context.dart b/lib/gpu/lib/src/context.dart index 1c1be14267fbb..a0efc586d16a1 100644 --- a/lib/gpu/lib/src/context.dart +++ b/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/lib/ui/experiments/gpu.dart b/lib/ui/experiments/gpu.dart index 282f955e6658e..6b07dc65efc7b 100644 --- a/lib/ui/experiments/gpu.dart +++ b/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() {