bump: 0.0.6
This commit is contained in:
parent
7f6b8b0d66
commit
44d3a78b9b
4 changed files with 11 additions and 6 deletions
|
|
@ -1,3 +1,7 @@
|
|||
## 0.0.6
|
||||
* Please use `BGRA` format instead.
|
||||
* Memory leak fix for Linux.
|
||||
|
||||
## 0.0.5
|
||||
* Initial macOS support.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name: texture_rgba_renderer
|
||||
description: A texture helper which brings a high level api to handle RGBA data.
|
||||
version: 0.0.5
|
||||
description: A texture helper which brings a high level api to handle BGRA data.
|
||||
version: 0.0.6
|
||||
homepage: https://github.com/Kingtous/flutter_texture_rgba_renderer
|
||||
|
||||
environment:
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ class MockTextureRgbaRendererPlatform
|
|||
@override
|
||||
Future<bool> onRgba(int key, Uint8List data, int height, int width) =>
|
||||
Future.value(true);
|
||||
|
||||
@override
|
||||
Future<int> getTexturePtr(int key) {
|
||||
return Future.value(0);
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
|
|
|||
|
|
@ -80,18 +80,14 @@ void TextureRgbaRendererPlugin::HandleMethodCall(
|
|||
}
|
||||
}
|
||||
else if (method_call.method_name().compare("getTexturePtr") == 0) {
|
||||
std::cout << "REMOVE ME ==================== getTexturePtr 111" << std::endl;
|
||||
auto args = std::get<flutter::EncodableMap>(*method_call.arguments());
|
||||
auto key = std::get<int>(args.at(flutter::EncodableValue("key")));
|
||||
std::cout << "REMOVE ME ==================== getTexturePtr 222 key " << key << std::endl;
|
||||
if (textures_.find(key) == textures_.end()) {
|
||||
std::cout << "REMOVE ME ==================== getTexturePtr 333" << std::endl;
|
||||
result->Success(flutter::EncodableValue(-1));
|
||||
}
|
||||
else {
|
||||
// Return an address.
|
||||
size_t rgba = reinterpret_cast<size_t>((void*) textures_[key].get());
|
||||
std::cout << "REMOVE ME ==================== getTexturePtr 444" << std::endl;
|
||||
result->Success(flutter::EncodableValue(int64_t(rgba)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue