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

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: Rebased 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
« no previous file with comments | « cc/layer_impl_unittest.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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 SkColor backgroundColor() const { return m_backgroundColor; } 243 SkColor backgroundColor() const { return m_backgroundColor; }
244 void setBackgroundColor(SkColor color) { m_backgroundColor = color; } 244 void setBackgroundColor(SkColor color) { m_backgroundColor = color; }
245 245
246 bool hasTransparentBackground() const { return m_hasTransparentBackground; } 246 bool hasTransparentBackground() const { return m_hasTransparentBackground; }
247 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro und = transparent; } 247 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro und = transparent; }
248 248
249 bool needsAnimateLayers() const { return m_needsAnimateLayers; } 249 bool needsAnimateLayers() const { return m_needsAnimateLayers; }
250 void setNeedsAnimateLayers() { m_needsAnimateLayers = true; } 250 void setNeedsAnimateLayers() { m_needsAnimateLayers = true; }
251 251
252 bool needsUpdateDrawProperties() const { return m_needsUpdateDrawProperties; }
253 void setNeedsUpdateDrawProperties() { m_needsUpdateDrawProperties = true; }
254
252 void setNeedsRedraw(); 255 void setNeedsRedraw();
253 256
254 void renderingStats(RenderingStats*) const; 257 void renderingStats(RenderingStats*) const;
255 258
256 void updateRootScrollLayerImplTransform(); 259 void updateRootScrollLayerImplTransform();
257 260
258 void sendManagedMemoryStats( 261 void sendManagedMemoryStats(
259 size_t memoryVisibleBytes, 262 size_t memoryVisibleBytes,
260 size_t memoryVisibleAndNearbyBytes, 263 size_t memoryVisibleAndNearbyBytes,
261 size_t memoryUseBytes); 264 size_t memoryUseBytes);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 300
298 template<typename RenderPassCuller> 301 template<typename RenderPassCuller>
299 static void removeRenderPasses(RenderPassCuller, FrameData&); 302 static void removeRenderPasses(RenderPassCuller, FrameData&);
300 303
301 protected: 304 protected:
302 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy* ); 305 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy* );
303 306
304 void animatePageScale(base::TimeTicks monotonicTime); 307 void animatePageScale(base::TimeTicks monotonicTime);
305 void animateScrollbars(base::TimeTicks monotonicTime); 308 void animateScrollbars(base::TimeTicks monotonicTime);
306 309
310 void updateDrawProperties();
311
307 // Exposed for testing. 312 // Exposed for testing.
308 void calculateRenderSurfaceLayerList(LayerList&); 313 void calculateRenderSurfaceLayerList(LayerList&);
314 void resetNeedsUpdateDrawPropertiesForTesting() { m_needsUpdateDrawPropertie s = false; }
309 315
310 // Virtual for testing. 316 // Virtual for testing.
311 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime); 317 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime);
312 318
313 // Virtual for testing. 319 // Virtual for testing.
314 virtual base::TimeDelta lowFrequencyAnimationInterval() const; 320 virtual base::TimeDelta lowFrequencyAnimationInterval() const;
315 321
316 LayerTreeHostImplClient* m_client; 322 LayerTreeHostImplClient* m_client;
317 Proxy* m_proxy; 323 Proxy* m_proxy;
318 324
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 float m_deviceScaleFactor; 363 float m_deviceScaleFactor;
358 bool m_visible; 364 bool m_visible;
359 bool m_contentsTexturesPurged; 365 bool m_contentsTexturesPurged;
360 ManagedMemoryPolicy m_managedMemoryPolicy; 366 ManagedMemoryPolicy m_managedMemoryPolicy;
361 367
362 SkColor m_backgroundColor; 368 SkColor m_backgroundColor;
363 bool m_hasTransparentBackground; 369 bool m_hasTransparentBackground;
364 370
365 // If this is true, it is necessary to traverse the layer tree ticking the a nimators. 371 // If this is true, it is necessary to traverse the layer tree ticking the a nimators.
366 bool m_needsAnimateLayers; 372 bool m_needsAnimateLayers;
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 size_t m_lastSentMemoryVisibleBytes; 398 size_t m_lastSentMemoryVisibleBytes;
392 size_t m_lastSentMemoryVisibleAndNearbyBytes; 399 size_t m_lastSentMemoryVisibleAndNearbyBytes;
393 size_t m_lastSentMemoryUseBytes; 400 size_t m_lastSentMemoryUseBytes;
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
« no previous file with comments | « cc/layer_impl_unittest.cc ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698