Skip to content

x/mobile/app: faster reshape callback on darwin_amd64 #13794

@bronze1man

Description

@bronze1man

I write a simple 2d app with gomobile on mac.
I paint one image with fixed position and fixed size.
I found that when I resize the window quickly ,the image size on the screen is bigger or smaller proportionally to the screen size.
Sometimes,the image size remember the windows size in seconds ago.

After I comment out following code,the problem disappear:
image
src/golang.org/x/mobile/app/darwin_amd64.m:48

It looks like the reshape function is too slow.
May be we can cache same result from the system api.

gomobile version +0a85ca5 Fri Dec 25 00:41:33 2015 +0000 (android,ios); androidSDK=/usr/local/AndroidSdk/platforms/android-22
go version go1.5.2 darwin/amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions