Re-create texture from pixel buffer onGrContextCreate (#8792)

* Re-create texture from pixel buffer onGrContextCreate

OnGrContextDestroy we destroy the texture, this is because
we can not access it from the potentially new context that
we get on bringing the app back to foreground.

To show a valid texture on fg, we need to preserve the pixel
buffer, using which we will create the new texture.

* ensure texture cache exists

* only reset pixel buffer if not null.
2 files changed
tree: 7bb6337fd995404709498d2500b46ef86a0fe86a
  1. assets/
  2. benchmarking/
  3. build/
  4. ci/
  5. common/
  6. docs/
  7. flow/
  8. flutter_kernel_transformers/
  9. fml/
  10. frontend_server/
  11. lib/
  12. runtime/
  13. shell/
  14. sky/
  15. testing/
  16. third_party/
  17. tools/
  18. vulkan/
  19. web_sdk/
  20. .cirrus.yml
  21. .clang-format
  22. .gitattributes
  23. .gitignore
  24. analysis_options.yaml
  25. AUTHORS
  26. BUILD.gn
  27. CONTRIBUTING.md
  28. DEPS
  29. LICENSE
  30. README.md
README.md

Flutter Engine

Build Status

Flutter is a new way to build high-performance, cross-platform mobile apps. Flutter is optimized for today‘s, and tomorrow’s, mobile devices. We are focused on low-latency input and high frame rates on Android and iOS.

The Flutter Engine is a portable runtime for hosting Flutter applications. It implements Flutter's core libraries, including animation and graphics, file and network I/O, accessibility support, plugin architecture, and a Dart runtime and compile toolchain. Most developers will interact with Flutter via the Flutter Framework, which provides a modern, reactive framework, and a rich set of platform, layout and foundation widgets.

If you are new to Flutter, then you will find more general information on the Flutter project, including tutorials and samples, on our Web site at Flutter.dev. For specific information about Flutter's APIs, consider our API reference which can be found at the docs.flutter.dev.

If you intend to contribute to Flutter, welcome! You are encouraged to start with our contributor guide, which helps onboard new team members.