Started using direct ByteBuffers for our performance tests (#83371)
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user