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

Side by Side Diff: services/gfx/compositor/renderer_state.h

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 unified diff | Download patch
« no previous file with comments | « services/gfx/compositor/renderer_impl.cc ('k') | services/gfx/compositor/renderer_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_GFX_COMPOSITOR_RENDERER_STATE_H_ 5 #ifndef SERVICES_GFX_COMPOSITOR_RENDERER_STATE_H_
6 #define SERVICES_GFX_COMPOSITOR_RENDERER_STATE_H_ 6 #define SERVICES_GFX_COMPOSITOR_RENDERER_STATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 SceneState* root_scene() { return root_scene_; } 46 SceneState* root_scene() { return root_scene_; }
47 uint32_t root_scene_version() { return root_scene_version_; } 47 uint32_t root_scene_version() { return root_scene_version_; }
48 const mojo::Rect& root_scene_viewport() { return root_scene_viewport_; } 48 const mojo::Rect& root_scene_viewport() { return root_scene_viewport_; }
49 49
50 // Sets the root scene and clears the current frame and cached dependencies. 50 // Sets the root scene and clears the current frame and cached dependencies.
51 // If different, invalidates the snapshot and returns true. 51 // If different, invalidates the snapshot and returns true.
52 bool SetRootScene(SceneState* scene, 52 bool SetRootScene(SceneState* scene,
53 uint32_t version, 53 uint32_t version,
54 const mojo::Rect& viewport); 54 const mojo::Rect& viewport);
55 55
56 // Resets the root scene and clears the current frame and cached dependencies.
57 // If different, invalidates the snapshot and returns true.
58 bool ResetRootScene();
59
56 // The currently composited frame, may be null if none. 60 // The currently composited frame, may be null if none.
57 const std::shared_ptr<RenderFrame>& frame() { return frame_; } 61 const std::shared_ptr<RenderFrame>& frame() { return frame_; }
58 62
59 // The current scene graph snapshot, may be null if none. 63 // The current scene graph snapshot, may be null if none.
60 const std::unique_ptr<Snapshot>& snapshot() { return snapshot_; } 64 const std::unique_ptr<Snapshot>& snapshot() { return snapshot_; }
61 65
62 // Returns true if the renderer has a snapshot and it is valid. 66 // Returns true if the renderer has a snapshot and it is valid.
63 // This implies that |frame()| is also non-null. 67 // This implies that |frame()| is also non-null.
64 bool valid() { return snapshot_ && snapshot_->valid(); } 68 bool valid() { return snapshot_ && snapshot_->valid(); }
65 69
(...skipping 24 matching lines...) Expand all
90 base::WeakPtrFactory<RendererState> weak_factory_; 94 base::WeakPtrFactory<RendererState> weak_factory_;
91 95
92 DISALLOW_COPY_AND_ASSIGN(RendererState); 96 DISALLOW_COPY_AND_ASSIGN(RendererState);
93 }; 97 };
94 98
95 std::ostream& operator<<(std::ostream& os, RendererState* renderer_state); 99 std::ostream& operator<<(std::ostream& os, RendererState* renderer_state);
96 100
97 } // namespace compositor 101 } // namespace compositor
98 102
99 #endif // SERVICES_GFX_COMPOSITOR_RENDERER_STATE_H_ 103 #endif // SERVICES_GFX_COMPOSITOR_RENDERER_STATE_H_
OLDNEW
« no previous file with comments | « services/gfx/compositor/renderer_impl.cc ('k') | services/gfx/compositor/renderer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698