Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
/ engine Public archive
Prev Previous commit
Next Next commit
++
  • Loading branch information
jonahwilliams committed Nov 10, 2022
commit 3bff2a9d9a93f07fb547124d8ce6de35b678e80d
2 changes: 1 addition & 1 deletion lib/ui/dart_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ typedef CanvasPath Path;
V(FragmentProgram, initFromAsset, 2) \
V(ReusableFragmentShader, Dispose, 1) \
V(ReusableFragmentShader, SetSampler, 3) \
V(ReusableFragmentShader, ValidateSamplers, 0) \
V(ReusableFragmentShader, ValidateSamplers, 1) \
V(Gradient, initLinear, 6) \
V(Gradient, initRadial, 8) \
V(Gradient, initSweep, 9) \
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/painting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4263,8 +4263,7 @@ class FragmentShader extends Shader {
final String? _debugName;

static final Float32List _kEmptyFloat32List = Float32List(0);

late Float32List _floats;
Float32List _floats = _kEmptyFloat32List;

/// Sets the float uniform at [index] to [value].
void setFloat(int index, double value) {
Expand Down Expand Up @@ -4295,6 +4294,7 @@ class FragmentShader extends Shader {

@override
void _validate() {
assert(!debugDisposed, 'Tried to accesss uniforms on a disposed Shader: $this');
if (!_validateSamplers()) {
throw Exception('Invalid FragmentShader ${_debugName ?? ''}: missing sampler');
}
Expand Down