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

Side by Side Diff: cc/CCLayerTreeHostImpl.h

Issue 11099040: [cc] Store CCLayerImpls as scoped_ptrs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix cc unit tests Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCLayerTreeHostCommonTest.cpp ('k') | cc/CCLayerTreeHostImpl.cpp » ('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 CCLayerTreeHostImpl_h 5 #ifndef CCLayerTreeHostImpl_h
6 #define CCLayerTreeHostImpl_h 6 #define CCLayerTreeHostImpl_h
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "CCAnimationEvents.h" 10 #include "CCAnimationEvents.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 bool initializeRenderer(scoped_ptr<CCGraphicsContext>); 168 bool initializeRenderer(scoped_ptr<CCGraphicsContext>);
169 bool isContextLost(); 169 bool isContextLost();
170 CCRenderer* renderer() { return m_renderer.get(); } 170 CCRenderer* renderer() { return m_renderer.get(); }
171 const RendererCapabilities& rendererCapabilities() const; 171 const RendererCapabilities& rendererCapabilities() const;
172 172
173 bool swapBuffers(); 173 bool swapBuffers();
174 174
175 void readback(void* pixels, const IntRect&); 175 void readback(void* pixels, const IntRect&);
176 176
177 void setRootLayer(PassOwnPtr<CCLayerImpl>); 177 void setRootLayer(scoped_ptr<CCLayerImpl>);
178 CCLayerImpl* rootLayer() { return m_rootLayerImpl.get(); } 178 CCLayerImpl* rootLayer() { return m_rootLayerImpl.get(); }
179 179
180 void setHudLayer(CCHeadsUpDisplayLayerImpl* layerImpl) { m_hudLayerImpl = la yerImpl; } 180 void setHudLayer(CCHeadsUpDisplayLayerImpl* layerImpl) { m_hudLayerImpl = la yerImpl; }
181 CCHeadsUpDisplayLayerImpl* hudLayer() { return m_hudLayerImpl; } 181 CCHeadsUpDisplayLayerImpl* hudLayer() { return m_hudLayerImpl; }
182 182
183 // Release ownership of the current layer tree and replace it with an empty 183 // Release ownership of the current layer tree and replace it with an empty
184 // tree. Returns the root layer of the detached tree. 184 // tree. Returns the root layer of the detached tree.
185 PassOwnPtr<CCLayerImpl> detachLayerTree(); 185 scoped_ptr<CCLayerImpl> detachLayerTree();
186 186
187 CCLayerImpl* rootScrollLayer() const { return m_rootScrollLayerImpl; } 187 CCLayerImpl* rootScrollLayer() const { return m_rootScrollLayerImpl; }
188 188
189 bool visible() const { return m_visible; } 189 bool visible() const { return m_visible; }
190 void setVisible(bool); 190 void setVisible(bool);
191 191
192 int sourceFrameNumber() const { return m_sourceFrameNumber; } 192 int sourceFrameNumber() const { return m_sourceFrameNumber; }
193 void setSourceFrameNumber(int frameNumber) { m_sourceFrameNumber = frameNumb er; } 193 void setSourceFrameNumber(int frameNumber) { m_sourceFrameNumber = frameNumb er; }
194 194
195 bool contentsTexturesPurged() const { return m_contentsTexturesPurged; } 195 bool contentsTexturesPurged() const { return m_contentsTexturesPurged; }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 bool ensureRenderSurfaceLayerList(); 300 bool ensureRenderSurfaceLayerList();
301 void clearCurrentlyScrollingLayer(); 301 void clearCurrentlyScrollingLayer();
302 302
303 void animateScrollbarsRecursive(CCLayerImpl*, double monotonicTime); 303 void animateScrollbarsRecursive(CCLayerImpl*, double monotonicTime);
304 304
305 void dumpRenderSurfaces(std::string*, int indent, const CCLayerImpl*) const; 305 void dumpRenderSurfaces(std::string*, int indent, const CCLayerImpl*) const;
306 306
307 scoped_ptr<CCGraphicsContext> m_context; 307 scoped_ptr<CCGraphicsContext> m_context;
308 OwnPtr<CCResourceProvider> m_resourceProvider; 308 OwnPtr<CCResourceProvider> m_resourceProvider;
309 OwnPtr<CCRenderer> m_renderer; 309 OwnPtr<CCRenderer> m_renderer;
310 OwnPtr<CCLayerImpl> m_rootLayerImpl; 310 scoped_ptr<CCLayerImpl> m_rootLayerImpl;
311 CCLayerImpl* m_rootScrollLayerImpl; 311 CCLayerImpl* m_rootScrollLayerImpl;
312 CCLayerImpl* m_currentlyScrollingLayerImpl; 312 CCLayerImpl* m_currentlyScrollingLayerImpl;
313 CCHeadsUpDisplayLayerImpl* m_hudLayerImpl; 313 CCHeadsUpDisplayLayerImpl* m_hudLayerImpl;
314 int m_scrollingLayerIdFromPreviousTree; 314 int m_scrollingLayerIdFromPreviousTree;
315 bool m_scrollDeltaIsInScreenSpace; 315 bool m_scrollDeltaIsInScreenSpace;
316 CCLayerTreeSettings m_settings; 316 CCLayerTreeSettings m_settings;
317 IntSize m_layoutViewportSize; 317 IntSize m_layoutViewportSize;
318 IntSize m_deviceViewportSize; 318 IntSize m_deviceViewportSize;
319 float m_deviceScaleFactor; 319 float m_deviceScaleFactor;
320 bool m_visible; 320 bool m_visible;
(...skipping 26 matching lines...) Expand all
347 347
348 size_t m_numImplThreadScrolls; 348 size_t m_numImplThreadScrolls;
349 size_t m_numMainThreadScrolls; 349 size_t m_numMainThreadScrolls;
350 350
351 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHostImpl); 351 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHostImpl);
352 }; 352 };
353 353
354 }; 354 };
355 355
356 #endif 356 #endif
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHostCommonTest.cpp ('k') | cc/CCLayerTreeHostImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698