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

Side by Side Diff: cc/resources/picture_pile_impl.h

Issue 1127153006: cc: Compute picture pile size at construction time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | cc/resources/picture_pile_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_RESOURCES_PICTURE_PILE_IMPL_H_ 5 #ifndef CC_RESOURCES_PICTURE_PILE_IMPL_H_
6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_ 6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 const SkColor solid_color_; 117 const SkColor solid_color_;
118 const gfx::Rect recorded_viewport_; 118 const gfx::Rect recorded_viewport_;
119 const bool has_any_recordings_; 119 const bool has_any_recordings_;
120 const bool clear_canvas_with_debug_color_; 120 const bool clear_canvas_with_debug_color_;
121 const float min_contents_scale_; 121 const float min_contents_scale_;
122 const int slow_down_raster_scale_factor_for_debug_; 122 const int slow_down_raster_scale_factor_for_debug_;
123 // TODO(enne/vmiura): this has a read/write race between raster and compositor 123 // TODO(enne/vmiura): this has a read/write race between raster and compositor
124 // threads with multi-threaded Ganesh. Make this const or remove it. 124 // threads with multi-threaded Ganesh. Make this const or remove it.
125 bool should_attempt_to_use_distance_field_text_; 125 bool should_attempt_to_use_distance_field_text_;
126 126
127 size_t picture_memory_usage_;
128
127 private: 129 private:
128 typedef std::map<const Picture*, Region> PictureRegionMap; 130 typedef std::map<const Picture*, Region> PictureRegionMap;
129 131
130 // Called when analyzing a tile. We can use AnalysisCanvas as 132 // Called when analyzing a tile. We can use AnalysisCanvas as
131 // SkDrawPictureCallback, which allows us to early out from analysis. 133 // SkDrawPictureCallback, which allows us to early out from analysis.
132 void RasterForAnalysis(skia::AnalysisCanvas* canvas, 134 void RasterForAnalysis(skia::AnalysisCanvas* canvas,
133 const gfx::Rect& canvas_rect, 135 const gfx::Rect& canvas_rect,
134 float contents_scale) const; 136 float contents_scale) const;
135 137
136 void CoalesceRasters(const gfx::Rect& canvas_rect, 138 void CoalesceRasters(const gfx::Rect& canvas_rect,
(...skipping 11 matching lines...) Expand all
148 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; 150 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const;
149 151
150 gfx::Rect PaddedRect(const PictureMapKey& key) const; 152 gfx::Rect PaddedRect(const PictureMapKey& key) const;
151 153
152 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); 154 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl);
153 }; 155 };
154 156
155 } // namespace cc 157 } // namespace cc
156 158
157 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ 159 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/picture_pile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698