diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 0b1d1470956b6..ecf50eb39e466 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -40251,7 +40251,6 @@ ORIGIN: ../../../flutter/lib/ui/dart_runtime_hooks.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/ui/dart_ui.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/ui/dart_ui.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/ui/dart_wrapper.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/lib/ui/experiments/gpu.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/ui/experiments/scene.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/ui/experiments/setup_hooks.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/ui/experiments/ui.dart + ../../../flutter/LICENSE @@ -43108,7 +43107,6 @@ FILE: ../../../flutter/lib/ui/dart_runtime_hooks.h FILE: ../../../flutter/lib/ui/dart_ui.cc FILE: ../../../flutter/lib/ui/dart_ui.h FILE: ../../../flutter/lib/ui/dart_wrapper.h -FILE: ../../../flutter/lib/ui/experiments/gpu.dart FILE: ../../../flutter/lib/ui/experiments/scene.dart FILE: ../../../flutter/lib/ui/experiments/setup_hooks.dart FILE: ../../../flutter/lib/ui/experiments/ui.dart diff --git a/lib/ui/experiments/gpu.dart b/lib/ui/experiments/gpu.dart deleted file mode 100644 index 6b07dc65efc7b..0000000000000 --- a/lib/ui/experiments/gpu.dart +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// ignore_for_file: public_member_api_docs - -part of dart.ui; - -class GpuContextException implements Exception { - GpuContextException(this.message); - String message; - - @override - String toString() { - return 'GpuContextException: $message'; - } -} - -enum BlendOperation { add, subtract, reverseSubtract } - -enum BlendFactor { - zero, - one, - sourceColor, - oneMinusSourceColor, - sourceAlpha, - oneMinusSourceAlpha, - destinationColor, - oneMinusDestinationColor, - destinationAlpha, - oneMinusDestinationAlpha, - sourceAlphaSaturated, - blendColor, - oneMinusBlendColor, - blendAlpha, - oneMinusBlendAlpha, -} - -class BlendOptions { - const BlendOptions({ - this.colorOperation = BlendOperation.add, - this.sourceColorFactor = BlendFactor.one, - this.destinationColorFactor = BlendFactor.oneMinusSourceAlpha, - this.alphaOperation = BlendOperation.add, - this.sourceAlphaFactor = BlendFactor.one, - this.destinationAlphaFactor = BlendFactor.oneMinusSourceAlpha, - }); - - final BlendOperation colorOperation; - final BlendFactor sourceColorFactor; - final BlendFactor destinationColorFactor; - final BlendOperation alphaOperation; - final BlendFactor sourceAlphaFactor; - final BlendFactor destinationAlphaFactor; -} - -enum StencilOperation { - keep, - zero, - setToReferenceValue, - incrementClamp, - decrementClamp, - invert, - incrementWrap, - decrementWrap, -} - -enum CompareFunction { - never, - always, - less, - equal, - lessEqual, - greater, - notEqual, - greaterEqual, -} - -class StencilOptions { - const StencilOptions({ - this.operation = StencilOperation.incrementClamp, - this.compare = CompareFunction.always, - }); - - final StencilOperation operation; - final CompareFunction compare; -} - -enum ShaderType { - unknown, - voidType, - booleanType, - signedByteType, - unsignedByteType, - signedShortType, - unsignedShortType, - signedIntType, - unsignedIntType, - signedInt64Type, - unsignedInt64Type, - atomicCounterType, - halfFloatType, - floatType, - doubleType, - structType, - imageType, - sampledImageType, - samplerType, -} - -class VertexAttribute { - const VertexAttribute({ - this.name = '', - this.location = 0, - this.set = 0, - this.binding = 0, - this.type = ShaderType.floatType, - this.elements = 2, - }); - - final String name; - final int location; - final int set; - final int binding; - final ShaderType type; - final int elements; -} - -class UniformSlot { - const UniformSlot({ - this.name = '', - this.set = 0, - this.extRes0 = 0, - this.binding = 0, - }); - - final String name; - final int set; - final int extRes0; - final int binding; -} - -class GpuShader {} - -class RasterPipeline {} - -/// A handle to a graphics context. Used to create and manage GPU resources. -/// -/// To obtain the default graphics context, use [getGpuContext]. -base class GpuContext extends NativeFieldWrapperClass1 { - /// Creates a new graphics context that corresponds to the default Impeller - /// context. - GpuContext._createDefault() { - final String error = _initializeDefault(); - if (error.isNotEmpty) { - throw GpuContextException(error); - } - } - - //registerShaderLibrary() async - - Future createRasterPipeline({ - required GpuShader vertex, - required GpuShader fragment, - BlendOptions blendOptions = const BlendOptions(), - StencilOptions stencilOptions = const StencilOptions(), - List vertexLayout = const [], - List uniformLayout = const [], - }) async { - return RasterPipeline(); - } - - /// Associates the default Impeller context with this GpuContext. - @Native(symbol: 'GpuContext::InitializeDefault') - external String _initializeDefault(); -} - -GpuContext? _defaultGpuContext; - -/// Returns the default graphics context. -GpuContext getGpuContext() { - _defaultGpuContext ??= GpuContext._createDefault(); - return _defaultGpuContext!; -} diff --git a/lib/ui/experiments/ui.dart b/lib/ui/experiments/ui.dart index 47535a94963a7..beaf3e143f4fe 100644 --- a/lib/ui/experiments/ui.dart +++ b/lib/ui/experiments/ui.dart @@ -49,5 +49,4 @@ part 'setup_hooks.dart'; part '../text.dart'; part '../window.dart'; -part 'gpu.dart'; part 'scene.dart';