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

Side by Side Diff: ui/compositor/compositor.h

Issue 2411793008: Adds BeginFrameControl via DevTools.
Patch Set: BFC prototype v2 with allow_latency_opts and waiting for BFOs. Created 4 years 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 | « ui/aura/mus/mus_context_factory.h ('k') | ui/compositor/compositor.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_
6 #define UI_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_COMPOSITOR_COMPOSITOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 21 matching lines...) Expand all
32 #include "ui/gfx/gpu_memory_buffer.h" 32 #include "ui/gfx/gpu_memory_buffer.h"
33 #include "ui/gfx/native_widget_types.h" 33 #include "ui/gfx/native_widget_types.h"
34 34
35 namespace base { 35 namespace base {
36 class SingleThreadTaskRunner; 36 class SingleThreadTaskRunner;
37 } 37 }
38 38
39 namespace cc { 39 namespace cc {
40 class AnimationHost; 40 class AnimationHost;
41 class AnimationTimeline; 41 class AnimationTimeline;
42 class BeginFrameSource;
42 class ContextProvider; 43 class ContextProvider;
43 class Layer; 44 class Layer;
44 class LayerTreeDebugState; 45 class LayerTreeDebugState;
45 class LayerTreeHost; 46 class LayerTreeHost;
46 class RendererSettings; 47 class RendererSettings;
47 class SurfaceManager; 48 class SurfaceManager;
48 class TaskGraphRunner; 49 class TaskGraphRunner;
49 } 50 }
50 51
51 namespace gfx { 52 namespace gfx {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 const gfx::ColorSpace& color_space) = 0; 149 const gfx::ColorSpace& color_space) = 0;
149 150
150 virtual void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, 151 virtual void SetAuthoritativeVSyncInterval(ui::Compositor* compositor,
151 base::TimeDelta interval) = 0; 152 base::TimeDelta interval) = 0;
152 // Mac path for transporting vsync parameters to the display. Other platforms 153 // Mac path for transporting vsync parameters to the display. Other platforms
153 // update it via the BrowserCompositorCompositorFrameSink directly. 154 // update it via the BrowserCompositorCompositorFrameSink directly.
154 virtual void SetDisplayVSyncParameters(ui::Compositor* compositor, 155 virtual void SetDisplayVSyncParameters(ui::Compositor* compositor,
155 base::TimeTicks timebase, 156 base::TimeTicks timebase,
156 base::TimeDelta interval) = 0; 157 base::TimeDelta interval) = 0;
157 158
159 virtual void SwapBeginFrameSource(
160 ui::Compositor* compositor,
161 std::unique_ptr<cc::BeginFrameSource>* begin_frame_source) = 0;
162
158 virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0; 163 virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0;
159 164
160 virtual void AddObserver(ContextFactoryObserver* observer) = 0; 165 virtual void AddObserver(ContextFactoryObserver* observer) = 0;
161 166
162 virtual void RemoveObserver(ContextFactoryObserver* observer) = 0; 167 virtual void RemoveObserver(ContextFactoryObserver* observer) = 0;
163 }; 168 };
164 169
165 // This class represents a lock on the compositor, that can be used to prevent 170 // This class represents a lock on the compositor, that can be used to prevent
166 // commits to the compositor tree while we're waiting for an asynchronous 171 // commits to the compositor tree while we're waiting for an asynchronous
167 // event. The typical use case is when waiting for a renderer to produce a frame 172 // event. The typical use case is when waiting for a renderer to produce a frame
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // context. 283 // context.
279 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); 284 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval);
280 285
281 // Most platforms set their vsync info via 286 // Most platforms set their vsync info via
282 // BrowerCompositorCompositorFrameSink's 287 // BrowerCompositorCompositorFrameSink's
283 // OnUpdateVSyncParametersFromGpu, but Mac routes vsync info via the 288 // OnUpdateVSyncParametersFromGpu, but Mac routes vsync info via the
284 // browser compositor instead through this path. 289 // browser compositor instead through this path.
285 void SetDisplayVSyncParameters(base::TimeTicks timebase, 290 void SetDisplayVSyncParameters(base::TimeTicks timebase,
286 base::TimeDelta interval); 291 base::TimeDelta interval);
287 292
293 // See Display::SwapBeginFrameSource.
294 void SwapBeginFrameSource(
295 std::unique_ptr<cc::BeginFrameSource>* begin_frame_source);
296
288 // Sets the widget for the compositor to render into. 297 // Sets the widget for the compositor to render into.
289 void SetAcceleratedWidget(gfx::AcceleratedWidget widget); 298 void SetAcceleratedWidget(gfx::AcceleratedWidget widget);
290 // Releases the widget previously set through SetAcceleratedWidget(). 299 // Releases the widget previously set through SetAcceleratedWidget().
291 // After returning it will not be used for rendering anymore. 300 // After returning it will not be used for rendering anymore.
292 // The compositor must be set to invisible when taking away a widget. 301 // The compositor must be set to invisible when taking away a widget.
293 gfx::AcceleratedWidget ReleaseAcceleratedWidget(); 302 gfx::AcceleratedWidget ReleaseAcceleratedWidget();
294 gfx::AcceleratedWidget widget() const; 303 gfx::AcceleratedWidget widget() const;
295 304
296 #if defined(USE_AURA) 305 #if defined(USE_AURA)
297 // Sets the window for the compositor to render into on mus+ash. 306 // Sets the window for the compositor to render into on mus+ash.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 gfx::ColorSpace color_space_; 438 gfx::ColorSpace color_space_;
430 439
431 base::WeakPtrFactory<Compositor> weak_ptr_factory_; 440 base::WeakPtrFactory<Compositor> weak_ptr_factory_;
432 441
433 DISALLOW_COPY_AND_ASSIGN(Compositor); 442 DISALLOW_COPY_AND_ASSIGN(Compositor);
434 }; 443 };
435 444
436 } // namespace ui 445 } // namespace ui
437 446
438 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 447 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « ui/aura/mus/mus_context_factory.h ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698