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

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

Issue 78883002: Cluster invalidation rectangles into coherent regions to lessen SkPicture re-recording (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final round of nits Created 7 years, 1 month 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 | « cc/resources/picture_pile.cc ('k') | cc/resources/picture_pile_base.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BASE_H_ 5 #ifndef CC_RESOURCES_PICTURE_PILE_BASE_H_
6 #define CC_RESOURCES_PICTURE_PILE_BASE_H_ 6 #define CC_RESOURCES_PICTURE_PILE_BASE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 typedef std::pair<int, int> PictureMapKey; 63 typedef std::pair<int, int> PictureMapKey;
64 typedef base::hash_map<PictureMapKey, PictureInfo> PictureMap; 64 typedef base::hash_map<PictureMapKey, PictureInfo> PictureMap;
65 65
66 virtual ~PicturePileBase(); 66 virtual ~PicturePileBase();
67 67
68 int num_raster_threads() { return num_raster_threads_; } 68 int num_raster_threads() { return num_raster_threads_; }
69 int buffer_pixels() const { return tiling_.border_texels(); } 69 int buffer_pixels() const { return tiling_.border_texels(); }
70 void Clear(); 70 void Clear();
71 71
72 gfx::Rect PaddedRect(const PictureMapKey& key); 72 gfx::Rect PaddedRect(const PictureMapKey& key);
73 gfx::Rect PadRect(gfx::Rect rect);
73 74
74 // A picture pile is a tiled set of pictures. The picture map is a map of tile 75 // A picture pile is a tiled set of pictures. The picture map is a map of tile
75 // indices to picture infos. 76 // indices to picture infos.
76 PictureMap picture_map_; 77 PictureMap picture_map_;
77 TilingData tiling_; 78 TilingData tiling_;
78 Region recorded_region_; 79 Region recorded_region_;
79 float min_contents_scale_; 80 float min_contents_scale_;
80 SkTileGridPicture::TileGridInfo tile_grid_info_; 81 SkTileGridPicture::TileGridInfo tile_grid_info_;
81 SkColor background_color_; 82 SkColor background_color_;
82 int slow_down_raster_scale_factor_for_debug_; 83 int slow_down_raster_scale_factor_for_debug_;
83 bool contents_opaque_; 84 bool contents_opaque_;
84 bool show_debug_picture_borders_; 85 bool show_debug_picture_borders_;
85 bool clear_canvas_with_debug_color_; 86 bool clear_canvas_with_debug_color_;
86 int num_raster_threads_; 87 int num_raster_threads_;
87 88
88 private: 89 private:
89 void SetBufferPixels(int buffer_pixels); 90 void SetBufferPixels(int buffer_pixels);
90 91
91 friend class base::RefCounted<PicturePileBase>; 92 friend class base::RefCounted<PicturePileBase>;
92 DISALLOW_COPY_AND_ASSIGN(PicturePileBase); 93 DISALLOW_COPY_AND_ASSIGN(PicturePileBase);
93 }; 94 };
94 95
95 } // namespace cc 96 } // namespace cc
96 97
97 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_ 98 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_pile.cc ('k') | cc/resources/picture_pile_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698