Fixed
Status Update
Comments
le...@google.com <le...@google.com>
nj...@google.com <nj...@google.com> #2
I notice the same issue and LogCat shows the following message:
Google Play services out of date. Requires 3159100 but found 3136130
Google Play services out of date. Requires 3159100 but found 3136130
Description
Motivation
The motivation is to create an API to capture specific view hierarchy in a way that can be manipulated or stored by the developer.
Currently it is possible to capture the hierarchy once using the Picture API as follows:
Problem with this approach is that
drawContent
functionality does not completely correlate with (at least I don't personally think) theView
class. Which (again speculating) in turn makes thedrawContent
keep drawing into thePicture
'sCanvas
.Modifying the above code to this:
…is again very problematic since the hierarchy is captured only once and recording has promptly ended capturing a single frame only. Not only that but
drawContent
is invoked twice which, I can imagine, implies increased runtime costs. Nonetheless the view thereafter not frozen in time.Proposal
Therefore having the same freedom recording hierarchy and modifying the captured image (with native code - renderscript replacements / shaders, rendereffects, …) would greatly improve options in making beautiful and modern UI effects, analyze test and compare specific segments whilst testing animations frame by frame and more.
If it became pluggable into the
Modifier
chain, then the API could look very similar to this:Use Case:
Blur/Glass effect
Note that the
Modifier
needs to clip to the position in parent, therefore it would be perhaps beneficial to note the coordinates of the captured content on screen and check against global position provided bybackgroundBlur
.Screen Sampling
Bitmaps are not the best bet I would presume(?) since if not hardware they are retained in app's memory, but it should be preferred to get hardware bitmap with hardware accelerated (vulkan/opengl) transformations.
But this feels like it will be preferred to be simplified to this:
Recording