Refact/stride align (#8)
* rename row_align_bytes to stride_align Signed-off-by: fufesou <shuanglongchen@yeah.net> * trivail changes Signed-off-by: fufesou <shuanglongchen@yeah.net> --------- Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
873919902e
commit
8d66a7c55e
13 changed files with 26 additions and 26 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import 'dart:ffi';
|
||||
|
||||
typedef F1 = Void Function(Pointer<Void> ptr, Pointer<Uint8> buffer, Int len,
|
||||
Int32 width, Int32 height, Int row_align_bytes);
|
||||
Int32 width, Int32 height, Int stride_align);
|
||||
typedef F1Dart = void Function(Pointer<Void> ptr, Pointer<Uint8> buffer,
|
||||
int len, int width, int height, int row_align_bytes);
|
||||
int len, int width, int height, int stride_align);
|
||||
|
||||
class Native {
|
||||
Native._();
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ class TextureRgbaRenderer {
|
|||
|
||||
/// Provide the rgba data to the texture.
|
||||
Future<bool> onRgba(
|
||||
int key, Uint8List data, int height, int width, int row_align_bytes) {
|
||||
int key, Uint8List data, int height, int width, int stride_align) {
|
||||
return TextureRgbaRendererPlatform.instance
|
||||
.onRgba(key, data, height, width, row_align_bytes);
|
||||
.onRgba(key, data, height, width, stride_align);
|
||||
}
|
||||
|
||||
Future<int> getTexturePtr(int key) {
|
||||
|
|
|
|||
|
|
@ -37,14 +37,14 @@ class MethodChannelTextureRgbaRenderer extends TextureRgbaRendererPlatform {
|
|||
}
|
||||
|
||||
@override
|
||||
Future<bool> onRgba(int key, Uint8List data, int height, int width,
|
||||
int row_align_bytes) async {
|
||||
Future<bool> onRgba(
|
||||
int key, Uint8List data, int height, int width, int stride_align) async {
|
||||
return await methodChannel.invokeMethod<bool>('onRgba', {
|
||||
"data": data,
|
||||
"height": height,
|
||||
"width": width,
|
||||
"key": key,
|
||||
"row_align_bytes": row_align_bytes,
|
||||
"stride_align": stride_align,
|
||||
}) ??
|
||||
false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ abstract class TextureRgbaRendererPlatform extends PlatformInterface {
|
|||
}
|
||||
|
||||
Future<bool> onRgba(
|
||||
int key, Uint8List data, int height, int width, int row_align_bytes) {
|
||||
int key, Uint8List data, int height, int width, int stride_align) {
|
||||
throw UnimplementedError('onRgba() has not been implemented.');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue