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

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

Issue 585063002: Made double-tap zoom work in pinch virtual viewport mode (Chromium-side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another build fix Created 6 years, 2 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/layer_tree_host_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 "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"
11 11
12 namespace gfx { 12 namespace gfx {
13 class Vector2d; 13 class Vector2d;
14 } 14 }
15 15
16 namespace cc { 16 namespace cc {
17 class ContextProvider; 17 class ContextProvider;
18 class InputHandlerClient; 18 class InputHandlerClient;
19 class OutputSurface; 19 class OutputSurface;
20 struct BeginFrameArgs; 20 struct BeginFrameArgs;
21 21
22 class LayerTreeHostClient { 22 class LayerTreeHostClient {
23 public: 23 public:
24 virtual void WillBeginMainFrame(int frame_id) = 0; 24 virtual void WillBeginMainFrame(int frame_id) = 0;
25 // Marks finishing compositing-related tasks on the main thread. In threaded 25 // Marks finishing compositing-related tasks on the main thread. In threaded
26 // mode, this corresponds to DidCommit(). 26 // mode, this corresponds to DidCommit().
27 virtual void BeginMainFrame(const BeginFrameArgs& args) = 0; 27 virtual void BeginMainFrame(const BeginFrameArgs& args) = 0;
28 virtual void DidBeginMainFrame() = 0; 28 virtual void DidBeginMainFrame() = 0;
29 virtual void Layout() = 0; 29 virtual void Layout() = 0;
30 virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
31 const gfx::Vector2d& outer_delta,
32 float page_scale,
33 float top_controls_delta) = 0;
30 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, 34 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
31 float page_scale, 35 float page_scale,
32 float top_controls_delta) = 0; 36 float top_controls_delta) = 0;
33 // Creates an OutputSurface. If fallback is true, it should attempt to 37 // Creates an OutputSurface. If fallback is true, it should attempt to
34 // create an OutputSurface that is guaranteed to initialize correctly. 38 // create an OutputSurface that is guaranteed to initialize correctly.
35 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) = 0; 39 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) = 0;
36 virtual void DidInitializeOutputSurface() = 0; 40 virtual void DidInitializeOutputSurface() = 0;
37 virtual void WillCommit() = 0; 41 virtual void WillCommit() = 0;
38 virtual void DidCommit() = 0; 42 virtual void DidCommit() = 0;
39 virtual void DidCommitAndDrawFrame() = 0; 43 virtual void DidCommitAndDrawFrame() = 0;
40 virtual void DidCompleteSwapBuffers() = 0; 44 virtual void DidCompleteSwapBuffers() = 0;
41 45
42 // Requests that the client insert a rate limiting token in the shared main 46 // Requests that the client insert a rate limiting token in the shared main
43 // thread context's command stream that will block if the context gets too far 47 // thread context's command stream that will block if the context gets too far
44 // ahead of the compositor's command stream. Only needed if the tree contains 48 // ahead of the compositor's command stream. Only needed if the tree contains
45 // a TextureLayer that calls SetRateLimitContext(true). 49 // a TextureLayer that calls SetRateLimitContext(true).
46 virtual void RateLimitSharedMainThreadContext() {} 50 virtual void RateLimitSharedMainThreadContext() {}
47 51
48 // This hook is for testing. 52 // This hook is for testing.
49 virtual void DidFailToInitializeOutputSurface() {} 53 virtual void DidFailToInitializeOutputSurface() {}
50 54
51 protected: 55 protected:
52 virtual ~LayerTreeHostClient() {} 56 virtual ~LayerTreeHostClient() {}
53 }; 57 };
54 58
55 } // namespace cc 59 } // namespace cc
56 60
57 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ 61 #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.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698