Feat/row align bytes (#7)
* better bytes alignment Signed-off-by: fufesou <shuanglongchen@yeah.net> * debug macos Signed-off-by: fufesou <shuanglongchen@yeah.net> * debug linux Signed-off-by: fufesou <shuanglongchen@yeah.net> * windows switch_rgba Signed-off-by: fufesou <shuanglongchen@yeah.net> * better switch_rgba Signed-off-by: fufesou <shuanglongchen@yeah.net> --------- Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
044bb260d9
commit
873919902e
16 changed files with 94 additions and 60 deletions
10
README.md
10
README.md
|
|
@ -118,17 +118,17 @@ class TextureRgbaRenderer {
|
|||
Note that the `onRgba` function is not called immediately. It depends on the execution scheduler of Flutter. To solve the problem, the plugin provide the low level function on all 3 pc platforms, which can make them be executed immediately.
|
||||
|
||||
```c
|
||||
void FlutterRgbaRendererPluginOnRgba(void* texture_rgba_ptr, const uint8_t* buffer, int width, int height)
|
||||
void FlutterRgbaRendererPluginOnRgba(void* texture_rgba_ptr, const uint8_t* buffer, int len, int width, int height, int row_align_bytes)
|
||||
```
|
||||
|
||||
You could use the native API in other programing languages. A dart quick example:
|
||||
|
||||
```dart
|
||||
/// The `Native` class is bundled in this plugin.
|
||||
typedef F1 = Void Function(
|
||||
Pointer<Void> ptr, Pointer<Uint8> buffer, Int32 width, Int32 height);
|
||||
typedef F1Dart = void Function(
|
||||
Pointer<Void> ptr, Pointer<Uint8> buffer, int width, int height);
|
||||
typedef F1 = Void Function(Pointer<Void> ptr, Pointer<Uint8> buffer, Int len,
|
||||
Int32 width, Int32 height, Int row_align_bytes);
|
||||
typedef F1Dart = void Function(Pointer<Void> ptr, Pointer<Uint8> buffer,
|
||||
int len, int width, int height, int row_align_bytes);
|
||||
|
||||
class Native {
|
||||
Native._();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue