-
Notifications
You must be signed in to change notification settings - Fork 6k
Include TextureLayer in contents of toImageSync #35608
Include TextureLayer in contents of toImageSync #35608
Conversation
…ne into hack_for_texture_view
…ne into hack_for_texture_view
shell/common/rasterizer.cc
Outdated
| } | ||
|
|
||
| GrDirectContext* Rasterizer::GetGrContext() { | ||
| return surface_->GetContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return surface_->GetContext(); | |
| return surface_ ? surface_->GetContext() : nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nullsafety for c++ when?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something something billion dollar mistake
|
This is almost ready again, but I need to do another local engine build and verify the test now passes |
dnfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as long as the internal test is passing.
|
It passed: http://sponge2/ad365424-d3c9-485e-b628-98f0b80d8686 :D |
This PR fixes flutter/flutter#112202. `Scene` is no longer tied to views, but receives method arguments for view properties, clearing the path to multiview Flutter. `Scene` no longer creates a `LayerTree` on construction, but only part of the config. When a output method is called (`toImage`, `toImageSync`, or `takeLayerTree`), the `LayerTree` is constructed on the spot. In this way, all `LayerTree`s return to being `unique_ptr`s instead of `shared_ptr`s, reverting part of #35608 . And `Scene` no longer needs to disfunction after one `takeLayerTree`, since the layer tree config is never really taken away. A `device_pixel_ratio` is now added to the parameter list of `Engine::Render` and `Animator::Render`. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
See revert #35587
Fixes NPE in GetGrContext