* Move texture registry ownership to platform view
This enables the texture registry to survive activity pause on Android.
* Remove debug info
* Formatted
* Set texture registry on initial rasterizer
* Remove unneccessary std::move
Fixesflutter/flutter#13018
When linear blending was disabled, we started rendering directly to FBO0 again. We can't attach stencil there, and the profile graph code triggers a path that (by default) uses it. This option forces us to use alternate rendering methods.
Note that the graph rendering code is constructing a fairly complex path. It would probably be much faster to render as a simpler series of drawRect calls for each box (which would get batched inside Skia).
This retains gamut correction (adjusting colors for screens with different capabilities), but does all blending and interpolation with sRGB-encoded values. That matches the behavior expected by most users, as well as the behavior of nearly all other systems. It also greatly simplifies the EGL code.
A future Skia change will make this behavior more of a first-class citizen, so some of these implementation details will change again, but the behavior will not. The bulk of this change (elimination of complication from the GL surface code) is permanent - it's just the SkColorSpaceXformCanvas that will be replaced.
With the update to HEAD of the Fuchsia buildtools repo, the new clang
toolchain picked up caused link-time breakage in android x86_64
libFlutter.so builds.
Sample log:
https://build.chromium.org/p/client.flutter/builders/Linux%20Engine/builds/1974/steps/build%20android_debug_x64/logs/stdio
Sample failure:
FAILED: libflutter.so libflutter.so.TOC lib.stripped/libflutter.so
../../third_party/android_tools/ndk/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld.gold: error: obj/flutter/shell/platform/android/libflutter/android_context_gl.o: unsupported reloc 42 against global symbol std::__ndk1::num_put<char, std::__ndk1::ostreambuf_iterator<char, std::__ndk1::char_traits<char> > >::id
This reverts commit fecc7aa281821e01037089846744b5331e3cbd22.
* Roll Fuchsia buildtools to 85907c59e97527d79bbfdfd849d8e85c24959cc5
This also updates Flutter buildroot to a6e52dbb776c45cc8c57d7143b8eb8b2e762fdfb
which disables -Wtautological-constant-compare temporarily until
https://reviews.llvm.org/D39462 lands in clang. This is in line with
Fuchsia's compiler options.
* Apply clang-format diffs
No logical changes. This applies clang-format from the latest Fuchsia
buildtools to the engine codebase.
* Fix remaining ftl->fxl conversions
The previous scripting pass at this did not account for objective c file endings
* Update tonic DEPS reference to the post-fxl version
If GPURasterizer::NotifyNextFrameOnce was rapidly invoked twice could
have lead to a null pointer exception.
Also ftp::WeakPtr are not thread safe and should not be dereferenced
from other threads.
* Add back launch screen view until first frame on iOS
* improvements
* Move callback plumbing from ios surfaces to the gpu rasterizer. Didn’t wire java JNI yet.
* Android JNI
* Fix ios reference count and let android engine manage a view on top with launch screen
* Hook up Android activity and view
* review notes
* review notes
* Move thread switching upstream. Use weak references for callbacks.
* Some clean up
* Revert "Revert "Reland "Run Flutter on iOS and Android with color correct Skia" (#3818)" (#3823)"
This reverts commit fdaab5c38fa82de669347508817b377285733946.
* Fix test code to match internal API change
* Revert "Revert "Run Flutter on iOS and Android with color correct Skia (#3743)" (#3775)"
This reverts commit c49f348d7c4238d653e7f3bbb8ce7cfab0996ad1.
* Enable sRGB on IO thread, too
* Add 4444 as a fallback rendering mode
* Use bare ptr to SkColorSpace (not sk_sp) in PrerollContext
* Run Flutter on iOS and Android with color correct Skia (#3716)
***Turns on color correct rendering for Android and iOS
***Communicates dst color space to raster cache
***Turns on color space aware image decoding
Test:
***color_testing_demo on Pixel XL
***flutter_gallery on iPad Mini and iPad Pro (haven't figured out how to run manual_tests on iOS)
TODO:
I needed to split up this CL somewhere. These are follow-up tasks.
***Make desktop backends color correct
***Make debugging tools (ex: encoding frames to png) preserve color space
***Investigate using UIKit API to allow iOS to fine tune color space of rendered content
***Turns on color correct rendering for Android and iOS
***Communicates dst color space to raster cache
***Turns on color space aware image decoding
Test:
***color_testing_demo on Pixel XL
***flutter_gallery on iPad Mini and iPad Pro (haven't figured out how to run manual_tests on iOS)
TODO:
I needed to split up this CL somewhere. These are follow-up tasks.
***Make desktop backends color correct
***Make debugging tools (ex: encoding frames to png) preserve color space
***Investigate using UIKit API to allow iOS to fine tune color space of rendered content
I had added this initially as a means of making it easier to deal with OpenGL directly in Flow. However, we are moving away from dealing with the client rendering APIs directly. Instead, delegating everything to Skia. Besides, we only ever used this to log the GPU description in case of context setup failures. This has not proved to be useful so far. Also, having this in place is making it difficult to remove all dependencies on GL in Shell.
The GPUSurfaceGL holds references to Skia objects that may own GL objects.
If the GL objects are destructed on the GPU thread after the EGL context has been
dropped, then the GL delete calls will not take effect.
* Update Skia revision to pull in GL native interface construction fixes on iOS.
Fixed in https://skia-review.googlesource.com/c/5212/
* Use the new image encoder API from Skia.
We push a bit up the tree during preroll to learn whether there system
composited layers below each layer. During update scene, we squash down
to paint tasks, which we execute after publishing the new scene.