@@ -6,28 +6,23 @@ import 'dart:ffi';
66import 'dart:nativewrappers' ;
77import 'dart:typed_data' ;
88
9- import 'context.dart' ;
10-
119/// A reference to a byte range within a GPU-resident [Buffer] .
1210class BufferView {
1311 /// The buffer of this view.
14- final Buffer buffer;
12+ final HostBuffer buffer;
1513
1614 /// The start of the view, in bytes starting from the beginning of the
1715 /// [buffer] .
1816 final int offsetInBytes;
1917
20- /// The end of the view
18+ /// The length of the view.
2119 final int lengthInBytes;
2220
2321 /// Create a new view into a buffer on the GPU.
2422 const BufferView (this .buffer,
2523 {required this .offsetInBytes, required this .lengthInBytes});
2624}
2725
28- /// A buffer that can be referenced by commands on the GPU.
29- mixin Buffer {}
30-
3126/// [HostBuffer] is a [Buffer] which is allocated on the host (native CPU
3227/// resident memory) and lazily uploaded to the GPU. A [HostBuffer] can be
3328/// safely mutated or extended at any time on the host, and will be
@@ -41,7 +36,7 @@ mixin Buffer {}
4136/// accessing device buffer data. The [HostBuffer] takes these
4237/// requirements into account and automatically inserts padding between
4338/// emplaced data if necessary.
44- class HostBuffer extends NativeFieldWrapperClass1 with Buffer {
39+ class HostBuffer extends NativeFieldWrapperClass1 {
4540 /// Creates a new HostBuffer.
4641 HostBuffer () {
4742 _initialize ();
0 commit comments