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

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

Issue 547463002: cc: Don't make tiles for mask layers that are too big for a texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hugemasks: rebase-past-mask-analysis Created 6 years, 3 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 | « cc/resources/picture_layer_tiling.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 <bitset> 8 #include <bitset>
9 #include <list> 9 #include <list>
10 #include <utility> 10 #include <utility>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 gfx::Rect tile_bounds(int x, int y) const { return tiling_.TileBounds(x, y); } 44 gfx::Rect tile_bounds(int x, int y) const { return tiling_.TileBounds(x, y); }
45 bool HasRecordingAt(int x, int y); 45 bool HasRecordingAt(int x, int y);
46 bool CanRaster(float contents_scale, const gfx::Rect& content_rect); 46 bool CanRaster(float contents_scale, const gfx::Rect& content_rect);
47 47
48 // If this pile contains any valid recordings. May have false positives. 48 // If this pile contains any valid recordings. May have false positives.
49 bool HasRecordings() const { return has_any_recordings_; } 49 bool HasRecordings() const { return has_any_recordings_; }
50 50
51 // If this pile has ever contained any recordings with text. 51 // If this pile has ever contained any recordings with text.
52 bool has_text() const { return has_text_; } 52 bool has_text() const { return has_text_; }
53 53
54 void set_is_mask(bool is_mask) { is_mask_ = is_mask; }
55 bool is_mask() const { return is_mask_; }
56
54 static void ComputeTileGridInfo(const gfx::Size& tile_grid_size, 57 static void ComputeTileGridInfo(const gfx::Size& tile_grid_size,
55 SkTileGridFactory::TileGridInfo* info); 58 SkTileGridFactory::TileGridInfo* info);
56 59
57 void SetTileGridSize(const gfx::Size& tile_grid_size); 60 void SetTileGridSize(const gfx::Size& tile_grid_size);
58 TilingData& tiling() { return tiling_; } 61 TilingData& tiling() { return tiling_; }
59 62
60 void AsValueInto(base::debug::TracedValue* array) const; 63 void AsValueInto(base::debug::TracedValue* array) const;
61 64
62 protected: 65 protected:
63 class CC_EXPORT PictureInfo { 66 class CC_EXPORT PictureInfo {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 SkColor background_color_; 115 SkColor background_color_;
113 int slow_down_raster_scale_factor_for_debug_; 116 int slow_down_raster_scale_factor_for_debug_;
114 bool contents_opaque_; 117 bool contents_opaque_;
115 bool contents_fill_bounds_completely_; 118 bool contents_fill_bounds_completely_;
116 bool show_debug_picture_borders_; 119 bool show_debug_picture_borders_;
117 bool clear_canvas_with_debug_color_; 120 bool clear_canvas_with_debug_color_;
118 // A hint about whether there are any recordings. This may be a false 121 // A hint about whether there are any recordings. This may be a false
119 // positive. 122 // positive.
120 bool has_any_recordings_; 123 bool has_any_recordings_;
121 bool has_text_; 124 bool has_text_;
125 bool is_mask_;
122 126
123 private: 127 private:
124 void SetBufferPixels(int buffer_pixels); 128 void SetBufferPixels(int buffer_pixels);
125 129
126 friend class base::RefCounted<PicturePileBase>; 130 friend class base::RefCounted<PicturePileBase>;
127 DISALLOW_COPY_AND_ASSIGN(PicturePileBase); 131 DISALLOW_COPY_AND_ASSIGN(PicturePileBase);
128 }; 132 };
129 133
130 } // namespace cc 134 } // namespace cc
131 135
132 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_ 136 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/picture_pile_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698