Unverified Commit 72725643 authored by gaaclarke's avatar gaaclarke Committed by GitHub

Started using direct ByteBuffers for our performance tests (#83371)

parent 3bb4a34a
......@@ -23,7 +23,7 @@ class MainActivity: FlutterActivity() {
} }
val basicStandard = BasicMessageChannel(flutterEngine.dartExecutor, "dev.flutter.echo.basic.standard", StandardMessageCodec.INSTANCE)
basicStandard.setMessageHandler { message, reply -> reply.reply(message) }
val basicBinary = BasicMessageChannel(flutterEngine.dartExecutor, "dev.flutter.echo.basic.binary", BinaryCodec.INSTANCE)
val basicBinary = BasicMessageChannel(flutterEngine.dartExecutor, "dev.flutter.echo.basic.binary", BinaryCodec.INSTANCE_DIRECT)
basicBinary.setMessageHandler { message, reply -> run {
if (byteBufferCache == null) {
byteBufferCache = ByteBuffer.allocateDirect(message!!.capacity())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment