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

Side by Side Diff: cc/layer_tree_host_impl.h

Issue 11882037: Activate LayerImpl tree with sync+push instead of pointer swap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/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 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_IMPL_H_ 5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_
6 #define CC_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 const RendererCapabilities& rendererCapabilities() const; 162 const RendererCapabilities& rendererCapabilities() const;
163 163
164 bool swapBuffers(); 164 bool swapBuffers();
165 165
166 void readback(void* pixels, const gfx::Rect&); 166 void readback(void* pixels, const gfx::Rect&);
167 167
168 LayerTreeImpl* activeTree() { return m_activeTree.get(); } 168 LayerTreeImpl* activeTree() { return m_activeTree.get(); }
169 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); } 169 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); }
170 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); } 170 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); }
171 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); } 171 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); }
172 const LayerTreeImpl* recycleTree() const { return m_recycleTree.get(); }
172 void createPendingTree(); 173 void createPendingTree();
173 void checkForCompletedTileUploads(); 174 void checkForCompletedTileUploads();
174 virtual void activatePendingTreeIfNeeded(); 175 virtual void activatePendingTreeIfNeeded();
175 176
176 // Shortcuts to layers on the active tree. 177 // Shortcuts to layers on the active tree.
177 LayerImpl* rootLayer() const; 178 LayerImpl* rootLayer() const;
178 LayerImpl* rootScrollLayer() const; 179 LayerImpl* rootScrollLayer() const;
179 LayerImpl* currentlyScrollingLayer() const; 180 LayerImpl* currentlyScrollingLayer() const;
180 181
181 bool visible() const { return m_visible; } 182 bool visible() const { return m_visible; }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 309
309 void dumpRenderSurfaces(std::string*, int indent, const LayerImpl*) const; 310 void dumpRenderSurfaces(std::string*, int indent, const LayerImpl*) const;
310 311
311 static LayerImpl* getNonCompositedContentLayerRecursive(LayerImpl* layer); 312 static LayerImpl* getNonCompositedContentLayerRecursive(LayerImpl* layer);
312 313
313 scoped_ptr<OutputSurface> m_outputSurface; 314 scoped_ptr<OutputSurface> m_outputSurface;
314 scoped_ptr<ResourceProvider> m_resourceProvider; 315 scoped_ptr<ResourceProvider> m_resourceProvider;
315 scoped_ptr<Renderer> m_renderer; 316 scoped_ptr<Renderer> m_renderer;
316 scoped_ptr<TileManager> m_tileManager; 317 scoped_ptr<TileManager> m_tileManager;
317 318
319 // Tree currently being drawn.
320 scoped_ptr<LayerTreeImpl> m_activeTree;
321
322 // In impl-side painting mode, tree with possibly incomplete rasterized
323 // content. May be promoted to active by activatePendingTreeIfNeeded().
318 scoped_ptr<LayerTreeImpl> m_pendingTree; 324 scoped_ptr<LayerTreeImpl> m_pendingTree;
319 scoped_ptr<LayerTreeImpl> m_activeTree; 325
326 // In impl-side painting mode, inert tree with layers that can be recycled
327 // by the next sync from the main thread.
328 scoped_ptr<LayerTreeImpl> m_recycleTree;
320 329
321 bool m_scrollDeltaIsInViewportSpace; 330 bool m_scrollDeltaIsInViewportSpace;
322 LayerTreeSettings m_settings; 331 LayerTreeSettings m_settings;
323 LayerTreeDebugState m_debugState; 332 LayerTreeDebugState m_debugState;
324 gfx::Size m_layoutViewportSize; 333 gfx::Size m_layoutViewportSize;
325 gfx::Size m_deviceViewportSize; 334 gfx::Size m_deviceViewportSize;
326 float m_deviceScaleFactor; 335 float m_deviceScaleFactor;
327 bool m_visible; 336 bool m_visible;
328 ManagedMemoryPolicy m_managedMemoryPolicy; 337 ManagedMemoryPolicy m_managedMemoryPolicy;
329 338
(...skipping 26 matching lines...) Expand all
356 size_t m_lastSentMemoryUseBytes; 365 size_t m_lastSentMemoryUseBytes;
357 366
358 scoped_ptr<AnimationRegistrar> m_animationRegistrar; 367 scoped_ptr<AnimationRegistrar> m_animationRegistrar;
359 368
360 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 369 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
361 }; 370 };
362 371
363 } // namespace cc 372 } // namespace cc
364 373
365 #endif // CC_LAYER_TREE_HOST_IMPL_H_ 374 #endif // CC_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698