Xamarin.forms: [Bug] Image animation not working in GTK

Created on 3 Dec 2019  ·  29Comments  ·  Source: xamarin/Xamarin.Forms

Description

It seems like image animation is not working in GTK. Similar code worked on the UWP backend.

Steps to Reproduce

https://github.com/ysangkok/XamarinGTKAnimationIssue

src.zip

Expected Behavior

Image should be animated.

Actual Behavior

Image is not animated.

Basic Information

  • Version with issue: 4.4.0.991210-pre2
  • Last known good version: don't know
  • Platform Target Frameworks: Ubuntu 18.04 with gtk-sharp 2.12.45-0xamarin17+ubuntu1804
  • Nuget Packages: See linked repository
image in-progress gtk bug

All 29 comments

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This issue now has a funding of 1.045 ETH (150.03 USD @ $143.57/ETH) attached to it.__

@izoch Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Commenting back

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@izoch due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

  • [x] reminder (3 days)
  • [x] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@samhouts does this require work? Would like to work on it

@mul53 what do you mean?

@knocte working on the bug

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work has been started__.

These users each claimed they can complete the work by 1 week ago.
Please review their action plans below:

1) bobface has been approved to start work.

I can fix the bug with the animation.

Learn more on the Gitcoin Issue Details page.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work for 1.045 ETH (272.64 USD @ $260.9/ETH) has been submitted by__:

  1. @bobface

@knocte please take a look at the submitted work:

  • PR by @Bobface

I tested this, with the sample project from the issue. It works, but it consumes 100% CPU and is not smooth. I am not sure whether this is a problem with this PR or with the sample project (which I made).

Hmm, would it be possible to link the image you have used?

@ysangkok Also, the large the image the more expensive the calculation for scale & rotate. Did you test if it works smoothly with a small image, say 50x50?

@Bobface I have a HiDPI monitor, so 50x50 is really small. But you are right that smaller sizes have less CPU load. For example, a 250x188 image runs with only 50% CPU utilization. I am using the ImageMagick logo image. To generate it in its full size (with width 500px), use convert logo: logo.png.

@Bobface maybe have a look at these answers: https://stackoverflow.com/questions/6888965/any-way-to-speed-up-reduce-cpu-usage-when-drawing-with-cairo?rq=1 :)

@ysangkok Okay, so the size of the image is definitely the problem.
@knocte Thanks, but it seems like I already do everything as described in that thread.

Even the FPS reduction?

That should be achievable by reducing the frequency rate of the animation in @ysangkok 's repro (dummyFrequencyRate in LoadingPage.xaml.fs). However he links to another issue which says that that parameter is also not implemented in Xamarin.Forms and has no effect. Is that still correct @ysangkok ?

@Bobface I have tested your PR 9856 with this one cherry-picked on top. Everything works as expected. Thank you.

@ysangkok you mean CPU doesn't go to 100% anymore?

@knocte CPU consumption is not too high with reasonable animation update intervals and smaller image sizes, no.

Hi @ysangkok,

Is the fix provided by @Bobface working?

@Solexplorer yes

@knocte Does this bounty also need review from maintainers?

Yes but this should be merged only after PR 9856 is merged.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This issue now has a funding of 1.045 ETH (249.23 USD @ $238.5/ETH) attached to it.__

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work has been started__.

These users each claimed they can complete the work by 1 month from now.
Please review their action plans below:

1) bobface has started work.

.................................................................

Learn more on the Gitcoin Issue Details page.

⚡️ A tip worth 1.04000 ETH (248.04 USD @ $238.5/ETH) has been granted to @bobface for this issue from @knocte. ⚡️

Nice work @bobface! Your tip has automatically been deposited in the ETH address we have on file.

Fixed by https://github.com/xamarin/Xamarin.Forms/pull/9649 which was merged , @ysangkok you can close

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This Bounty has been completed.__

Additional Tips for this Bounty:

  • knocte tipped 1.0400 ETH worth 248.04 USD to bobface.

Was this page helpful?
0 / 5 - 0 ratings