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

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

Issue 1775143004: Mozart: Directly associate the renderer with the view tree. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-1
Patch Set: Created 4 years, 9 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/gfx/compositor/renderer_state.h ('k') | services/ui/launcher/launcher_view_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gfx/compositor/renderer_state.cc
diff --git a/services/gfx/compositor/renderer_state.cc b/services/gfx/compositor/renderer_state.cc
index 28ba6870bf9bfcdf18781cc332713d73dc5fe7f5..37bf319aac87a7a128a4766e76395e675b95cf25 100644
--- a/services/gfx/compositor/renderer_state.cc
+++ b/services/gfx/compositor/renderer_state.cc
@@ -18,7 +18,6 @@ bool RendererState::SetRootScene(SceneState* scene,
uint32_t version,
const mojo::Rect& viewport) {
DCHECK(scene);
- DCHECK(version);
if (root_scene_ != scene || root_scene_version_ != version ||
!root_scene_viewport_.Equals(viewport)) {
@@ -31,6 +30,15 @@ bool RendererState::SetRootScene(SceneState* scene,
return false;
}
+bool RendererState::ResetRootScene() {
+ if (root_scene_) {
+ root_scene_ = nullptr;
+ SetSnapshot(nullptr);
+ return true;
+ }
+ return false;
+}
+
bool RendererState::SetSnapshot(std::unique_ptr<Snapshot> snapshot) {
snapshot_ = std::move(snapshot);
if (snapshot_ && snapshot_->valid()) {
« no previous file with comments | « services/gfx/compositor/renderer_state.h ('k') | services/ui/launcher/launcher_view_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698