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

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

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.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 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 "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 20 matching lines...) Expand all
31 virtual void ApplyViewportDeltas( 31 virtual void ApplyViewportDeltas(
32 const gfx::Vector2d& inner_delta, 32 const gfx::Vector2d& inner_delta,
33 const gfx::Vector2d& outer_delta, 33 const gfx::Vector2d& outer_delta,
34 const gfx::Vector2dF& elastic_overscroll_delta, 34 const gfx::Vector2dF& elastic_overscroll_delta,
35 float page_scale, 35 float page_scale,
36 float top_controls_delta) = 0; 36 float top_controls_delta) = 0;
37 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, 37 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
38 float page_scale, 38 float page_scale,
39 float top_controls_delta) = 0; 39 float top_controls_delta) = 0;
40 // Request an OutputSurface from the client. When the client has one it should 40 // Request an OutputSurface from the client. When the client has one it should
41 // call LayerTreeHost::SetOutputSurface. If fallback is true, it should 41 // call LayerTreeHost::SetOutputSurface. This will result in either
42 // attempt to create an OutputSurface that is guaranteed to initialize 42 // DidFailToInitializeOutputSurface or DidInitializeOutputSurface being
43 // correctly. 43 // called.
44 virtual void RequestNewOutputSurface(bool fallback) = 0; 44 virtual void RequestNewOutputSurface() = 0;
45 virtual void DidInitializeOutputSurface() = 0; 45 virtual void DidInitializeOutputSurface() = 0;
46 virtual void DidFailToInitializeOutputSurface() = 0;
46 virtual void WillCommit() = 0; 47 virtual void WillCommit() = 0;
47 virtual void DidCommit() = 0; 48 virtual void DidCommit() = 0;
48 virtual void DidCommitAndDrawFrame() = 0; 49 virtual void DidCommitAndDrawFrame() = 0;
49 virtual void DidCompleteSwapBuffers() = 0; 50 virtual void DidCompleteSwapBuffers() = 0;
50 51
51 // TODO(simonhong): Makes this to pure virtual function when client 52 // TODO(simonhong): Makes this to pure virtual function when client
52 // implementation is ready. 53 // implementation is ready.
53 virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) {} 54 virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) {}
54 55
55 // Requests that the client insert a rate limiting token in the shared main 56 // Requests that the client insert a rate limiting token in the shared main
56 // thread context's command stream that will block if the context gets too far 57 // thread context's command stream that will block if the context gets too far
57 // ahead of the compositor's command stream. Only needed if the tree contains 58 // ahead of the compositor's command stream. Only needed if the tree contains
58 // a TextureLayer that calls SetRateLimitContext(true). 59 // a TextureLayer that calls SetRateLimitContext(true).
59 virtual void RateLimitSharedMainThreadContext() {} 60 virtual void RateLimitSharedMainThreadContext() {}
60 61
61 // This hook is for testing.
62 virtual void DidFailToInitializeOutputSurface() {}
63
64 protected: 62 protected:
65 virtual ~LayerTreeHostClient() {} 63 virtual ~LayerTreeHostClient() {}
66 }; 64 };
67 65
68 } // namespace cc 66 } // namespace cc
69 67
70 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ 68 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698