This should satisfy the low-latency need of DevTools.
Test added:
* ReportTimingsIsCalledSoonerInNonReleaseMode
* ReportTimingsIsCalledLaterInReleaseMode
For https://github.com/flutter/flutter/issues/33807
We still need to make layers' children immutable for full immutability.
That will require us to change the SceneBuilder API to build the layer
bottom up instead of top down (post-order traversal instead of pre-order
traversal).
Using it, a Flutter app can monitor missing frames in the release mode, and a custom Flutter runner (e.g., Fuchsia) can add a custom FrameRasterizedCallback.
Related issues:
https://github.com/flutter/flutter/issues/26154https://github.com/flutter/flutter/issues/31444https://github.com/flutter/flutter/issues/32447
Need review as soon as possible so we can merge this before the end of May to catch the milestone.
Tests added:
* NoNeedToReportTimingsByDefault
* NeedsReportTimingsIsSetWithCallback
* ReportTimingsIsCalled
* FrameRasterizedCallbackIsCalled
* FrameTimingSetsAndGetsProperly
* onReportTimings preserves callback zone
* FrameTiming.toString has the correct format
This will need a manual engine roll as the TestWindow defined in the framework needs to implement onReportTimings.
Fix null closure warnings, and a possible race condition where the
handle for the view_holder_token is destroyed on the gpu thread. The
handle's destructor enters the isolate, so it must be destroyed on the
UI thread.
FL-257 #done
FL-269 #done
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.
Made use of `misspell` tool:
https://github.com/client9/misspell
Remove the extra `decodedCacheRatioCap` parameter, and the
`_frameBitmaps` member from `Codec`. This means that small looped images
will consume more CPU but prevents us from hitting OOM exceptions based
on trying to render multiple larger images.
Also switch to fDisposalMethod for caching frames.
Previously we looped over every single SkCodec::FrameInfo, tracked its
`fRequiredFrame`, and then saved any frames matching those indeces.
Doing this instead avoids that initialization loop and extra data
structure.
* Dart side resize primitives exposed
* Write the codec side changes
* return un-scaled image if we can not allocate bitmap
* Format _instantiateImageCodec calls to be single lined
Move null check for size to be inner
* Address CR comments and make image resize dimensions container
* Round not trunc, also format
* Add tests, remove ImageResizeDims from api surface
* Make placeholder value public
* Make the api side changes
* Add a feature to resize pixels and also add tests
* Fix grammar and add more info
This does not actually import the runners into the engine. It only sets up the targets so they need no modifications are necessary when the migration is done. The engine has been verified to build in both buildroots.
This default is already set in the framework, but this also needs to be
set in the binding layer to preserve the same behavior when the
deprecated framework parameter is removed.
EngineLayers can hold references to Skia objects and may consume significant
resources. This change will result in more aggressive cleanup of EngineLayers
by the Dart GC.
See https://github.com/flutter/flutter/issues/31303
Skia allows drawing unpremul images, but filtering them can look bad.
Internally Skia performs this transformation when creating SkImages from
encoded data (so this already happens for MakeCrossContextFromEncoded),
and for consistency/quality it should be done here, too.
Fixes#28785
* Revert "fix toString (#8688)"
This reverts commit c9a0f50ecc62899952ff693ed67d022d510d9453.
* Revert "Make Rect and RRect use 64 bit doubles, and make them const-able (#8565)"
This reverts commit d98c2e2df0427aad3bd824f41d804ccc56eee367.
This is the first step in making Flutter aware of and responsive to Z
bound overflow. On its own this patch shouldn't result in any changes in
behavior. This will need to be followed up with a patch in Fuchsia's
Flutter runner to set the Z bounds after this lands, and another patch
in the engine actually implementing the desired overflow behavior.
This Z bound info is routed through the engine itself to make sure the
bounds in flow are truly consistent from the Fuchsia runner. However
these values should eventually be exposed to the framework as well.