Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile/example: paint event sending is too much on iOS #13511

Open
nobonobo opened this issue Dec 6, 2015 · 2 comments
Open

x/mobile/example: paint event sending is too much on iOS #13511

nobonobo opened this issue Dec 6, 2015 · 2 comments
Labels
mobile
Milestone

Comments

@nobonobo
Copy link

@nobonobo nobonobo commented Dec 6, 2015

  • Go 1.5.2(OS-X 10.10)
  • target device: iPhone5s iOS 9.1
  • expected behavior: Just a good paint frequency.
  • instead behavior: high CPU load and Irregular paint timing.

iOS device requires following patch

diff --git a/example/basic/main.go b/example/basic/main.go
index 2b2e0c9..f826c45 100644
--- a/example/basic/main.go
+++ b/example/basic/main.go
@@ -89,7 +89,7 @@ func main() {
                                a.Publish()
                                // Drive the animation by preparing to paint the next frame
                                // after this one is shown.
-                               a.Send(paint.Event{})
+                               //a.Send(paint.Event{})
                        case touch.Event:
                                touchX = e.X
                                touchY = e.Y
@nobonobo
Copy link
Author

@nobonobo nobonobo commented Dec 6, 2015

But, this statement is required for Android:

a.Send(paint.Event{})

@rakyll
Copy link
Contributor

@rakyll rakyll commented Dec 7, 2015

/cc @crawshaw

@rakyll rakyll added this to the Unreleased milestone Dec 7, 2015
@gopherbot gopherbot added the mobile label Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile
Projects
None yet
Development

No branches or pull requests

3 participants