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

Side by Side Diff: cc/tiled_layer.h

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 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/tile_manager.cc ('k') | cc/tiled_layer.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_TILED_LAYER_H_ 5 #ifndef CC_TILED_LAYER_H_
6 #define CC_TILED_LAYER_H_ 6 #define CC_TILED_LAYER_H_
7 7
8 #include "cc/cc_export.h" 8 #include "cc/cc_export.h"
9 #include "cc/contents_scaling_layer.h" 9 #include "cc/contents_scaling_layer.h"
10 #include "cc/layer_tiling_data.h" 10 #include "cc/layer_tiling_data.h"
(...skipping 17 matching lines...) Expand all
28 virtual bool drawsContent() const OVERRIDE; 28 virtual bool drawsContent() const OVERRIDE;
29 29
30 virtual void setNeedsDisplayRect(const gfx::RectF&) OVERRIDE; 30 virtual void setNeedsDisplayRect(const gfx::RectF&) OVERRIDE;
31 31
32 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE; 32 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE;
33 33
34 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE; 34 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE;
35 35
36 virtual Region visibleContentOpaqueRegion() const OVERRIDE; 36 virtual Region visibleContentOpaqueRegion() const OVERRIDE;
37 37
38 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats&) OVERRIDE; 38 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats*) OVERRIDE;
39 39
40 protected: 40 protected:
41 TiledLayer(); 41 TiledLayer();
42 virtual ~TiledLayer(); 42 virtual ~TiledLayer();
43 43
44 void updateTileSizeAndTilingOption(); 44 void updateTileSizeAndTilingOption();
45 void updateBounds(); 45 void updateBounds();
46 46
47 // Exposed to subclasses for testing. 47 // Exposed to subclasses for testing.
48 void setTileSize(const gfx::Size&); 48 void setTileSize(const gfx::Size&);
(...skipping 25 matching lines...) Expand all
74 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR IDE; 74 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR IDE;
75 75
76 void createTilerIfNeeded(); 76 void createTilerIfNeeded();
77 void setTilingOption(TilingOption); 77 void setTilingOption(TilingOption);
78 78
79 bool tileOnlyNeedsPartialUpdate(UpdatableTile*); 79 bool tileOnlyNeedsPartialUpdate(UpdatableTile*);
80 bool tileNeedsBufferedUpdate(UpdatableTile*); 80 bool tileNeedsBufferedUpdate(UpdatableTile*);
81 81
82 void markOcclusionsAndRequestTextures(int left, int top, int right, int bott om, const OcclusionTracker*); 82 void markOcclusionsAndRequestTextures(int left, int top, int right, int bott om, const OcclusionTracker*);
83 83
84 bool updateTiles(int left, int top, int right, int bottom, ResourceUpdateQue ue&, const OcclusionTracker*, RenderingStats&, bool& didPaint); 84 bool updateTiles(int left, int top, int right, int bottom, ResourceUpdateQue ue&, const OcclusionTracker*, RenderingStats*, bool& didPaint);
85 bool haveTexturesForTiles(int left, int top, int right, int bottom, bool ign oreOcclusions); 85 bool haveTexturesForTiles(int left, int top, int right, int bottom, bool ign oreOcclusions);
86 gfx::Rect markTilesForUpdate(int left, int top, int right, int bottom, bool ignoreOcclusions); 86 gfx::Rect markTilesForUpdate(int left, int top, int right, int bottom, bool ignoreOcclusions);
87 void updateTileTextures(const gfx::Rect& paintRect, int left, int top, int r ight, int bottom, ResourceUpdateQueue&, const OcclusionTracker*, RenderingStats& ); 87 void updateTileTextures(const gfx::Rect& paintRect, int left, int top, int r ight, int bottom, ResourceUpdateQueue&, const OcclusionTracker*, RenderingStats* );
88 void updateScrollPrediction(); 88 void updateScrollPrediction();
89 89
90 UpdatableTile* tileAt(int, int) const; 90 UpdatableTile* tileAt(int, int) const;
91 UpdatableTile* createTile(int, int); 91 UpdatableTile* createTile(int, int);
92 92
93 bool isSmallAnimatedLayer() const; 93 bool isSmallAnimatedLayer() const;
94 94
95 unsigned m_textureFormat; 95 unsigned m_textureFormat;
96 bool m_skipsDraw; 96 bool m_skipsDraw;
97 bool m_failedUpdate; 97 bool m_failedUpdate;
98 98
99 // Used for predictive painting. 99 // Used for predictive painting.
100 gfx::Vector2d m_predictedScroll; 100 gfx::Vector2d m_predictedScroll;
101 gfx::Rect m_predictedVisibleRect; 101 gfx::Rect m_predictedVisibleRect;
102 gfx::Rect m_previousVisibleRect; 102 gfx::Rect m_previousVisibleRect;
103 gfx::Size m_previousContentBounds; 103 gfx::Size m_previousContentBounds;
104 104
105 TilingOption m_tilingOption; 105 TilingOption m_tilingOption;
106 scoped_ptr<LayerTilingData> m_tiler; 106 scoped_ptr<LayerTilingData> m_tiler;
107 }; 107 };
108 108
109 } 109 }
110 #endif // CC_TILED_LAYER_H_ 110 #endif // CC_TILED_LAYER_H_
OLDNEW
« no previous file with comments | « cc/tile_manager.cc ('k') | cc/tiled_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698