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

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

Issue 1997513002: Mozart: Generalize frame scheduling. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-jank2
Patch Set: add comments 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 unified diff | Download patch
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_COMPOSITOR_H_ 5 #ifndef SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_
6 #define SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_ 6 #define SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void Update(SceneState* scene_state, 50 void Update(SceneState* scene_state,
51 mojo::gfx::composition::SceneUpdatePtr update); 51 mojo::gfx::composition::SceneUpdatePtr update);
52 52
53 // Publishes a scene. 53 // Publishes a scene.
54 // Destroys |scene_state| if an error occurs. 54 // Destroys |scene_state| if an error occurs.
55 void Publish(SceneState* scene_state, 55 void Publish(SceneState* scene_state,
56 mojo::gfx::composition::SceneMetadataPtr metadata); 56 mojo::gfx::composition::SceneMetadataPtr metadata);
57 57
58 // Schedules a frame callback. 58 // Schedules a frame callback.
59 void ScheduleFrame(SceneState* scene_state, 59 void ScheduleFrame(SceneState* scene_state,
60 const SceneFrameCallback& callback); 60 const FrameCallback& callback);
61 61
62 // RENDERER REQUESTS 62 // RENDERER REQUESTS
63 63
64 // Sets the root scene. 64 // Sets the root scene.
65 // Destroys |renderer_state| if an error occurs. 65 // Destroys |renderer_state| if an error occurs.
66 void SetRootScene(RendererState* renderer_state, 66 void SetRootScene(RendererState* renderer_state,
67 mojo::gfx::composition::SceneTokenPtr scene_token, 67 mojo::gfx::composition::SceneTokenPtr scene_token,
68 uint32 scene_version, 68 uint32 scene_version,
69 mojo::RectPtr viewport); 69 mojo::RectPtr viewport);
70 70
71 // Removes the root scene. 71 // Removes the root scene.
72 // Destroys |renderer_state| if an error occurs. 72 // Destroys |renderer_state| if an error occurs.
73 void ClearRootScene(RendererState* renderer_state); 73 void ClearRootScene(RendererState* renderer_state);
74 74
75 // Schedules a frame callback.
76 void ScheduleFrame(RendererState* renderer_state,
77 const FrameCallback& callback);
78
75 // Performs a hit test. 79 // Performs a hit test.
76 void HitTest( 80 void HitTest(
77 RendererState* renderer_state, 81 RendererState* renderer_state,
78 mojo::PointFPtr point, 82 mojo::PointFPtr point,
79 const mojo::gfx::composition::HitTester::HitTestCallback& callback); 83 const mojo::gfx::composition::HitTester::HitTestCallback& callback);
80 84
81 private: 85 private:
82 void OnSceneConnectionError(SceneState* scene_state); 86 void OnSceneConnectionError(SceneState* scene_state);
83 void DestroyScene(SceneState* scene_state); 87 void DestroyScene(SceneState* scene_state);
84 88
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 Universe universe_; 141 Universe universe_;
138 142
139 base::WeakPtrFactory<CompositorEngine> weak_factory_; 143 base::WeakPtrFactory<CompositorEngine> weak_factory_;
140 144
141 DISALLOW_COPY_AND_ASSIGN(CompositorEngine); 145 DISALLOW_COPY_AND_ASSIGN(CompositorEngine);
142 }; 146 };
143 147
144 } // namespace compositor 148 } // namespace compositor
145 149
146 #endif // SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_ 150 #endif // SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « services/gfx/compositor/backend/gpu_output.cc ('k') | services/gfx/compositor/compositor_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698