bump: 0.0.6

This commit is contained in:
Kingtous 2023-02-19 15:36:42 +08:00
parent 7f6b8b0d66
commit 44d3a78b9b
4 changed files with 11 additions and 6 deletions

View file

@ -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)));
}
}