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

Side by Side Diff: cc/trees/layer_tree_host_client.h

Issue 2753843003: Create a new action triggered when a BeginMainFrame is not expected before vsync (Closed)
Patch Set: Add BeginMainFrameNotExpectedUntil to content::CompositorImpl for Android. Created 3 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
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/proxy_impl.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_TREES_LAYER_TREE_HOST_CLIENT_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_CLIENT_H_
6 #define CC_TREES_LAYER_TREE_HOST_CLIENT_H_ 6 #define CC_TREES_LAYER_TREE_HOST_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h"
11 12
12 namespace gfx { 13 namespace gfx {
13 class Vector2dF; 14 class Vector2dF;
14 } 15 }
15 16
16 namespace cc { 17 namespace cc {
17 class CompositorFrameSink; 18 class CompositorFrameSink;
18 struct BeginFrameArgs; 19 struct BeginFrameArgs;
19 20
20 class LayerTreeHostClient { 21 class LayerTreeHostClient {
21 public: 22 public:
22 virtual void WillBeginMainFrame() = 0; 23 virtual void WillBeginMainFrame() = 0;
23 // Marks finishing compositing-related tasks on the main thread. In threaded 24 // Marks finishing compositing-related tasks on the main thread. In threaded
24 // mode, this corresponds to DidCommit(). 25 // mode, this corresponds to DidCommit().
25 virtual void BeginMainFrame(const BeginFrameArgs& args) = 0; 26 virtual void BeginMainFrame(const BeginFrameArgs& args) = 0;
26 virtual void BeginMainFrameNotExpectedSoon() = 0; 27 virtual void BeginMainFrameNotExpectedSoon() = 0;
28 virtual void BeginMainFrameNotExpectedUntil(base::TimeTicks time) = 0;
27 virtual void DidBeginMainFrame() = 0; 29 virtual void DidBeginMainFrame() = 0;
28 // A LayerTreeHost is bound to a LayerTreeHostClient. Visual frame-based 30 // A LayerTreeHost is bound to a LayerTreeHostClient. Visual frame-based
29 // updates to the state of the LayerTreeHost are expected to happen only in 31 // updates to the state of the LayerTreeHost are expected to happen only in
30 // calls to LayerTreeHostClient::UpdateLayerTreeHost, which should 32 // calls to LayerTreeHostClient::UpdateLayerTreeHost, which should
31 // mutate/invalidate the layer tree or other page parameters as appropriate. 33 // mutate/invalidate the layer tree or other page parameters as appropriate.
32 // 34 //
33 // An example of a LayerTreeHostClient is (via additional indirections) Blink, 35 // An example of a LayerTreeHostClient is (via additional indirections) Blink,
34 // which inside of LayerTreeHostClient::UpdateLayerTreeHost will update 36 // which inside of LayerTreeHostClient::UpdateLayerTreeHost will update
35 // (Blink's notions of) style, layout, paint invalidation and compositing 37 // (Blink's notions of) style, layout, paint invalidation and compositing
36 // state. (The "compositing state" will result in a mutated layer tree on the 38 // state. (The "compositing state" will result in a mutated layer tree on the
(...skipping 26 matching lines...) Expand all
63 // that case. 65 // that case.
64 virtual bool IsForSubframe() = 0; 66 virtual bool IsForSubframe() = 0;
65 67
66 protected: 68 protected:
67 virtual ~LayerTreeHostClient() {} 69 virtual ~LayerTreeHostClient() {}
68 }; 70 };
69 71
70 } // namespace cc 72 } // namespace cc
71 73
72 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ 74 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698