flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.16k stars 27.24k forks source link

Images are uploaded to the GPU synchronously #3805

Closed Hixie closed 8 years ago

Hixie commented 8 years ago

This trace: https://github.com/flutter/flutter/issues/3082#issuecomment-217916705 ...includes a 300ms frame which we suspect corresponds to the frame during which we upload images to the GPU.

To reproduce, open the gallery app and run the Weather demo.

I'd like us to use a solution that keeps the developer in control, i.e. not one that always replaces loading images with a checkboard or some such. We could solve this in various ways, maybe a function that says "pin this to the GPU" and returns a Future that resolves when it's ready (but then how do you handle eviction?); maybe the function that takes the image (drawImage and friends) would also optionally return a bool, and if the bool is false (meaning that the image won't be painted this frame in all likelihood) you'd be able to paint something cheaper that frame. We'd also need a way to retrigger a paint once an image was uploaded (maybe a Future again).

sethladd commented 8 years ago

Blocked https://github.com/flutter/flutter/issues/3478

eseidelGoogle commented 8 years ago

I spoke with @abarth just now. It will probably be a while before we tackle this. That could change with more examples, but for now expect this to be a few months away.

eseidelGoogle commented 8 years ago

I also mentioned this to @jason-simmons today in case he's interested in more meaty engine work.

eseidelGoogle commented 8 years ago

I just spoke with @chinmaygarde and he's willing to tackle this asap.

sethladd commented 8 years ago

Thanks @chinmaygarde !

sethladd commented 8 years ago

I believe we landed this. There are some bugs, but I think we can close.

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.