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

Side by Side Diff: cc/layer_tree_host.h

Issue 11550035: Implement pinch-zoom scaling for main-frame scrollbars and pinch-zoom overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revision as per comments, animate scrollbars, fix slow-path PZ scrolling. Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_LAYER_TREE_HOST_H_ 5 #ifndef CC_LAYER_TREE_HOST_H_
6 #define CC_LAYER_TREE_HOST_H_ 6 #define CC_LAYER_TREE_HOST_H_
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 class AnimationRegistrar; 46 class AnimationRegistrar;
47 class HeadsUpDisplayLayer; 47 class HeadsUpDisplayLayer;
48 class Layer; 48 class Layer;
49 class LayerTreeHostImpl; 49 class LayerTreeHostImpl;
50 class LayerTreeHostImplClient; 50 class LayerTreeHostImplClient;
51 class PrioritizedResourceManager; 51 class PrioritizedResourceManager;
52 class PrioritizedResource; 52 class PrioritizedResource;
53 class Region; 53 class Region;
54 class ResourceProvider; 54 class ResourceProvider;
55 class ResourceUpdateQueue; 55 class ResourceUpdateQueue;
56 class ScrollbarLayer;
56 class TopControlsManager; 57 class TopControlsManager;
57 struct ScrollAndScaleSet; 58 struct ScrollAndScaleSet;
58 59
59 60
60 // Provides information on an Impl's rendering capabilities back to the LayerTre eHost 61 // Provides information on an Impl's rendering capabilities back to the LayerTre eHost
61 struct CC_EXPORT RendererCapabilities { 62 struct CC_EXPORT RendererCapabilities {
62 RendererCapabilities(); 63 RendererCapabilities();
63 ~RendererCapabilities(); 64 ~RendererCapabilities();
64 65
65 unsigned bestTextureFormat; 66 unsigned bestTextureFormat;
(...skipping 24 matching lines...) Expand all
90 bool needsOffscreenContext() const { return m_needsFilterContext || settings ().acceleratePainting; } 91 bool needsOffscreenContext() const { return m_needsFilterContext || settings ().acceleratePainting; }
91 92
92 // LayerTreeHost interface to Proxy. 93 // LayerTreeHost interface to Proxy.
93 void willBeginFrame() { m_client->willBeginFrame(); } 94 void willBeginFrame() { m_client->willBeginFrame(); }
94 void didBeginFrame(); 95 void didBeginFrame();
95 void updateAnimations(base::TimeTicks monotonicFrameBeginTime); 96 void updateAnimations(base::TimeTicks monotonicFrameBeginTime);
96 void didStopFlinging(); 97 void didStopFlinging();
97 void layout(); 98 void layout();
98 void beginCommitOnImplThread(LayerTreeHostImpl*); 99 void beginCommitOnImplThread(LayerTreeHostImpl*);
99 void finishCommitOnImplThread(LayerTreeHostImpl*); 100 void finishCommitOnImplThread(LayerTreeHostImpl*);
101 void setPinchZoomScrollbarsBoundsAndPosition();
102 void createAndAddPinchZoomScrollbars();
100 void willCommit(); 103 void willCommit();
101 void commitComplete(); 104 void commitComplete();
102 scoped_ptr<OutputSurface> createOutputSurface(); 105 scoped_ptr<OutputSurface> createOutputSurface();
103 scoped_ptr<InputHandler> createInputHandler(); 106 scoped_ptr<InputHandler> createInputHandler();
104 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI mplClient*); 107 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI mplClient*);
105 void didLoseOutputSurface(); 108 void didLoseOutputSurface();
106 enum RecreateResult { 109 enum RecreateResult {
107 RecreateSucceeded, 110 RecreateSucceeded,
108 RecreateFailedButTryAgain, 111 RecreateFailedButTryAgain,
109 RecreateFailedAndGaveUp, 112 RecreateFailedAndGaveUp,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void setNeedsAnimate(); 148 void setNeedsAnimate();
146 // virtual for testing 149 // virtual for testing
147 virtual void setNeedsCommit(); 150 virtual void setNeedsCommit();
148 virtual void setNeedsFullTreeSync(); 151 virtual void setNeedsFullTreeSync();
149 void setNeedsRedraw(); 152 void setNeedsRedraw();
150 bool commitRequested() const; 153 bool commitRequested() const;
151 154
152 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl ockTime); 155 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl ockTime);
153 156
154 Layer* rootLayer() { return m_rootLayer.get(); } 157 Layer* rootLayer() { return m_rootLayer.get(); }
158 Layer* rootScrollLayer() const;
jamesr 2013/03/02 03:19:14 Do you still need this?
wjmaclean 2013/03/04 15:53:10 Yes, I believe so. In order for a PZ scrollbar to
159
155 const Layer* rootLayer() const { return m_rootLayer.get(); } 160 const Layer* rootLayer() const { return m_rootLayer.get(); }
156 void setRootLayer(scoped_refptr<Layer>); 161 void setRootLayer(scoped_refptr<Layer>);
157 162
158 const LayerTreeSettings& settings() const { return m_settings; } 163 const LayerTreeSettings& settings() const { return m_settings; }
159 164
160 void setDebugState(const LayerTreeDebugState& debugState); 165 void setDebugState(const LayerTreeDebugState& debugState);
161 const LayerTreeDebugState& debugState() const { return m_debugState; } 166 const LayerTreeDebugState& debugState() const { return m_debugState; }
162 167
163 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d eviceViewportSize); 168 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d eviceViewportSize);
164 169
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 251
247 int m_commitNumber; 252 int m_commitNumber;
248 RenderingStats m_renderingStats; 253 RenderingStats m_renderingStats;
249 254
250 bool m_rendererInitialized; 255 bool m_rendererInitialized;
251 bool m_outputSurfaceLost; 256 bool m_outputSurfaceLost;
252 int m_numFailedRecreateAttempts; 257 int m_numFailedRecreateAttempts;
253 258
254 scoped_refptr<Layer> m_rootLayer; 259 scoped_refptr<Layer> m_rootLayer;
255 scoped_refptr<HeadsUpDisplayLayer> m_hudLayer; 260 scoped_refptr<HeadsUpDisplayLayer> m_hudLayer;
261 scoped_refptr<ScrollbarLayer> m_pinchZoomScrollbarHorizontal;
262 scoped_refptr<ScrollbarLayer> m_pinchZoomScrollbarVertical;
256 263
257 scoped_ptr<PrioritizedResourceManager> m_contentsTextureManager; 264 scoped_ptr<PrioritizedResourceManager> m_contentsTextureManager;
258 scoped_ptr<PrioritizedResource> m_surfaceMemoryPlaceholder; 265 scoped_ptr<PrioritizedResource> m_surfaceMemoryPlaceholder;
259 266
260 base::WeakPtr<TopControlsManager> m_topControlsManagerWeakPtr; 267 base::WeakPtr<TopControlsManager> m_topControlsManagerWeakPtr;
261 268
262 LayerTreeSettings m_settings; 269 LayerTreeSettings m_settings;
263 LayerTreeDebugState m_debugState; 270 LayerTreeDebugState m_debugState;
264 271
265 gfx::Size m_layoutViewportSize; 272 gfx::Size m_layoutViewportSize;
(...skipping 17 matching lines...) Expand all
283 size_t m_partialTextureUpdateRequests; 290 size_t m_partialTextureUpdateRequests;
284 291
285 scoped_ptr<AnimationRegistrar> m_animationRegistrar; 292 scoped_ptr<AnimationRegistrar> m_animationRegistrar;
286 293
287 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 294 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
288 }; 295 };
289 296
290 } // namespace cc 297 } // namespace cc
291 298
292 #endif // CC_LAYER_TREE_HOST_H_ 299 #endif // CC_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/layer_animation_controller.cc ('k') | cc/layer_tree_host.cc » ('j') | cc/layer_tree_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698