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

Side by Side Diff: cc/layer_tree_host_impl.h

Issue 11447028: cc: Split out calcDrawEtc from drawLayers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TODO comment about animations Created 8 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 | 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_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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 void startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAnchor, flo at scale, base::TimeDelta duration); 242 void startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAnchor, flo at scale, base::TimeDelta duration);
243 243
244 SkColor backgroundColor() const { return m_backgroundColor; } 244 SkColor backgroundColor() const { return m_backgroundColor; }
245 void setBackgroundColor(SkColor color) { m_backgroundColor = color; } 245 void setBackgroundColor(SkColor color) { m_backgroundColor = color; }
246 246
247 bool hasTransparentBackground() const { return m_hasTransparentBackground; } 247 bool hasTransparentBackground() const { return m_hasTransparentBackground; }
248 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro und = transparent; } 248 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro und = transparent; }
249 bool needsAnimateLayers() const { return !m_activeAnimationControllers.empty (); } 249 bool needsAnimateLayers() const { return !m_activeAnimationControllers.empty (); }
250 250
251 bool needsUpdateDrawProperties() const { return m_needsUpdateDrawProperties; }
252 void setNeedsUpdateDrawProperties() { m_needsUpdateDrawProperties = true; }
253
251 void setNeedsRedraw(); 254 void setNeedsRedraw();
252 255
253 void renderingStats(RenderingStats*) const; 256 void renderingStats(RenderingStats*) const;
254 257
255 void updateRootScrollLayerImplTransform(); 258 void updateRootScrollLayerImplTransform();
256 259
257 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); } 260 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); }
258 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get() ; } 261 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get() ; }
259 ResourceProvider* resourceProvider() const { return m_resourceProvider.get() ; } 262 ResourceProvider* resourceProvider() const { return m_resourceProvider.get() ; }
260 Proxy* proxy() const { return m_proxy; } 263 Proxy* proxy() const { return m_proxy; }
(...skipping 30 matching lines...) Expand all
291 294
292 template<typename RenderPassCuller> 295 template<typename RenderPassCuller>
293 static void removeRenderPasses(RenderPassCuller, FrameData&); 296 static void removeRenderPasses(RenderPassCuller, FrameData&);
294 297
295 protected: 298 protected:
296 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy* ); 299 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy* );
297 300
298 void animatePageScale(base::TimeTicks monotonicTime); 301 void animatePageScale(base::TimeTicks monotonicTime);
299 void animateScrollbars(base::TimeTicks monotonicTime); 302 void animateScrollbars(base::TimeTicks monotonicTime);
300 303
304 void updateDrawProperties();
305
301 // Exposed for testing. 306 // Exposed for testing.
302 void calculateRenderSurfaceLayerList(LayerList&); 307 void calculateRenderSurfaceLayerList(LayerList&);
308 void resetNeedsUpdateDrawProperties() { m_needsUpdateDrawProperties = false; }
danakj 2012/12/07 21:14:02 Should we get in the habit of adding ForTesting to
enne (OOO) 2012/12/07 23:03:00 Done.
303 309
304 // Virtual for testing. 310 // Virtual for testing.
305 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime); 311 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime);
306 312
307 // Virtual for testing. 313 // Virtual for testing.
308 virtual base::TimeDelta lowFrequencyAnimationInterval() const; 314 virtual base::TimeDelta lowFrequencyAnimationInterval() const;
309 315
310 LayerTreeHostImplClient* m_client; 316 LayerTreeHostImplClient* m_client;
311 Proxy* m_proxy; 317 Proxy* m_proxy;
312 318
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 gfx::Size m_deviceViewportSize; 363 gfx::Size m_deviceViewportSize;
358 float m_deviceScaleFactor; 364 float m_deviceScaleFactor;
359 bool m_visible; 365 bool m_visible;
360 bool m_contentsTexturesPurged; 366 bool m_contentsTexturesPurged;
361 ManagedMemoryPolicy m_managedMemoryPolicy; 367 ManagedMemoryPolicy m_managedMemoryPolicy;
362 368
363 SkColor m_backgroundColor; 369 SkColor m_backgroundColor;
364 bool m_hasTransparentBackground; 370 bool m_hasTransparentBackground;
365 371
366 // If this is true, it is necessary to traverse the layer tree ticking the a nimators. 372 // If this is true, it is necessary to traverse the layer tree ticking the a nimators.
373 bool m_needsUpdateDrawProperties;
367 bool m_pinchGestureActive; 374 bool m_pinchGestureActive;
368 gfx::Point m_previousPinchAnchor; 375 gfx::Point m_previousPinchAnchor;
369 376
370 scoped_ptr<PageScaleAnimation> m_pageScaleAnimation; 377 scoped_ptr<PageScaleAnimation> m_pageScaleAnimation;
371 378
372 // This is used for ticking animations slowly when hidden. 379 // This is used for ticking animations slowly when hidden.
373 scoped_ptr<LayerTreeHostImplTimeSourceAdapter> m_timeSourceClientAdapter; 380 scoped_ptr<LayerTreeHostImplTimeSourceAdapter> m_timeSourceClientAdapter;
374 381
375 // List of visible layers for the most recently prepared frame. Used for 382 // List of visible layers for the most recently prepared frame. Used for
376 // rendering and input event hit testing. 383 // rendering and input event hit testing.
(...skipping 14 matching lines...) Expand all
391 #if !defined(NDEBUG) 398 #if !defined(NDEBUG)
392 AnimationControllerSet m_allAnimationControllers; 399 AnimationControllerSet m_allAnimationControllers;
393 #endif 400 #endif
394 401
395 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 402 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
396 }; 403 };
397 404
398 } // namespace cc 405 } // namespace cc
399 406
400 #endif // CC_LAYER_TREE_HOST_IMPL_H_ 407 #endif // CC_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698