Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Unified Diff: services/gfx/compositor/compositor_engine.cc

Issue 1949233002: Create a RegisterViewAssociate method in ViewManager (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add tests to mojo tests Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/BUILD.gn ('k') | services/ui/launcher/launch_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gfx/compositor/compositor_engine.cc
diff --git a/services/gfx/compositor/compositor_engine.cc b/services/gfx/compositor/compositor_engine.cc
index 1e18866258072d708d9413e00d9b4b1896c5748f..8ad5b0f36e45dfd569a199045a8de32cfedc89d0 100644
--- a/services/gfx/compositor/compositor_engine.cc
+++ b/services/gfx/compositor/compositor_engine.cc
@@ -83,14 +83,18 @@ void CompositorEngine::DestroyScene(SceneState* scene_state) {
}
// Destroy any renderers using this scene.
+ std::vector<RendererState*> renderers_to_destroy;
for (auto& renderer : renderers_) {
if (renderer->root_scene() == scene_state) {
- LOG(ERROR) << "Destroying renderer whose root scene has become "
- "unavailable: renderer="
- << renderer;
- DestroyRenderer(renderer);
+ renderers_to_destroy.emplace_back(renderer);
}
}
+ for (auto& renderer : renderers_to_destroy) {
+ LOG(ERROR) << "Destroying renderer whose root scene has become "
+ "unavailable: renderer="
+ << renderer;
+ DestroyRenderer(renderer);
+ }
// Consider all dependent rendering to be invalidated.
universe_.RemoveScene(scene_state->scene_token());
« no previous file with comments | « services/BUILD.gn ('k') | services/ui/launcher/launch_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698