I have a question when I monitor project performance by DevTools on Flutter.
I found when animation running, it has many purple tringles "event" on the memory page.
These events detail are Flutter.ImageSizesForFrame assets/bg.jpg (it is my background image, not animation)
Is it an issue? is that mean flutter decode bg.jpg again and again when animation running?
Related
I use SkiaSharp canvas to draw the main game screen, and then there are various Xamarin.Forms Buttons around the UI. This all works fine on when used directly on iPhone or iPad using a finger. However, when I connect a mouse (e.g., through a MacBook or otherwise), the buttons start working with about 10% chance after mouse-clicking on the SkiaSharp canvas (and not receiving the mouse click events with 90% chance). The SkiaSharp canvas itself works just fine.
If I bring up the iOS app launch menu from the bottom (which probably somehow temporarily exists the mouse navigation on the app), the buttons start working again with the mouse. But if I click the SkiaSharp canvas again with the mouse, the buttons have a high chance of becoming disabled again. If I change to using a finger, all works fine (even if the mouse clicks were not being registered immediately before). However, mouse clicks are not being registered even after touching with a finger, so finger-touching does not reset the issue with the mouse (but bringing up the menu from the bottom does).
We found this bug by testing the iOS game on MacBook Pro (the iOS apps recently came available on the App Store) but the same issue persists also directly with an iPad / mouse combination. It seems to be some sort of an issue between using a mouse (on iPad or on MacBook Pro), SkiaSharp canvas and Xamarin.Forms buttons.
Does anyone know what the root cause of the problem is and what is the workaround?
Not an answer as such, but some more information about reproducing the issue: A simpler repro case may be this small project: https://github.com/jrc14/TraceMatching/ .
Don't worry too much about what it's doing, but note that you're mean to click in the grey Skia canvas in the middle to create 'targets' - and that after you've done that, mouse-clicks are getting lost.
If you run it on a Mac, you'll see that, though the clicks get lost after you've clicked on the Skia canvas, they will start being received again if you click on something else (another app, or the Mac background).
(further edit) - after some noodling around I did find a workaround. If, once you've finished processing the touch action on the SKCanvasView, you reset its EnableTouchEvents property (i.e. set it to false, then back to true again), it seems that the clicks don't get lost any more,
I'm using an image as my background in my project in hand in flutter and to get a nice look, i have a applied a nice blur effect and white overlay with blendmode set to overlay to get a brightness effect. It works fine in my phone but I have tried phones with lower hardware and it lags horribly. I had a similar problem in my web project and it was simply solved by blurring the image once in canvas and getting it as an base64 dataUrl, in flutter though couldn't achieve this.
Can anyone help me with it?
I want to add a Lottie animation for a splash screen before any content launches in my Flutter app. The plugins I've checked out don't completely support all features of the animations yet or don't work as desired.
Is there some way I can add it before the actual flutter activity launches. I want the animation to completely finish, and only then go forward to the main content.
Any help appreciated, thanks!
Currently the Lottie plugins for Flutter do not work that well (hopefully they are improved soon) but what I did for my app is save the animation as a .gif (set repeat to once) which can then natively be displayed in an ImageView, then use a timer to move to the next screen one the animation has finished.
Not the ideal solution but a work around until the plugins have been improved.
You can use lottie plugin. lottie: ^0.7.0+1
And then use status listener provided by AnimationController.
Code below:
_controller = AnimationController(vsync: this)
..addStatusListener((status) {
if(status == AnimationStatus.completed){
//Move to next page
}
I want to create an infinite scroll website that will present a massive amount of animated GIFs. The problem is, having all of the GIFs animating continuously after page load is causing severe performance issues, so that the website running very slow.
Is there a javascript-snippet or plugin, that stops all GIFs that are not visible in the browser window?
A solution is freezeframe.js, but it forces the user to click or hover the animations.
I want to have two aplications simultaneously run: one that analyzes image from webcam written using OpenCV (the image is acquired through callback function) and an application that goes into fullscreen mode (let's say a 3D game). The problem is that while the fullscreen mode is launched the webcam image stream is stopping - the frames simply don't turn up, the callback function isn't called. This seems to be an issue with OpenCV - to test that a simple application displaying the image form camera has been prepared.
Why the image stream could be blocked by the fullscreen mode? How to bypass this?
Thanks for any hints.
Your question does not tell if you have tried to search for the problem in the OpenCV community first, so I post this as a hint in case: http://tech.groups.yahoo.com/group/OpenCV/
Also check out the list of issues, maybe its a known bug: https://code.ros.org/trac/opencv/report/1
I'm not an OpenCV expert so this is closer to a suggestion than an answer - but I've experienced similar on my multi-monitor setup using a number of media players on the second monitor and some fullscreen apps ont he first.
In my limited testing, it comes down to what method is used to render the 3d app - DirectX seems to stop media players, OpenGL doesn't.
So it might not be OpenCV which has a problem - it may be what DirectX does to the hardware during a full-screen game.
Actually the behaviour of the OpenCV camera stream is strange. It seems to depend on the native OpenCV window (cvNamedWindow()) that shows the output image form webcam. If the window is on the same screen that went fullscreen the streaming will continue. If the camera window would be placed on another screen, the stream would stop.
Another curious thing is with the screen resolution change. If you change the resolution of the screen and the camera window is not visible (is closed or even minimalized) the image stream would get blocked.
These are just my observations on the topic, maybe it'll be helpful for someone.