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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
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_H_ 5 #ifndef CC_RESOURCES_PICTURE_PILE_H_
6 #define CC_RESOURCES_PICTURE_PILE_H_ 6 #define CC_RESOURCES_PICTURE_PILE_H_
7 7
8 #include <bitset> 8 #include <bitset>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 21 matching lines...) Expand all
32 int frame_number, 32 int frame_number,
33 Picture::RecordingMode recording_mode) override; 33 Picture::RecordingMode recording_mode) override;
34 scoped_refptr<RasterSource> CreateRasterSource() const override; 34 scoped_refptr<RasterSource> CreateRasterSource() const override;
35 gfx::Size GetSize() const final; 35 gfx::Size GetSize() const final;
36 void SetEmptyBounds() override; 36 void SetEmptyBounds() override;
37 void SetMinContentsScale(float min_contents_scale) override; 37 void SetMinContentsScale(float min_contents_scale) override;
38 void SetSlowdownRasterScaleFactor(int factor) override; 38 void SetSlowdownRasterScaleFactor(int factor) override;
39 bool IsSuitableForGpuRasterization() const override; 39 bool IsSuitableForGpuRasterization() const override;
40 void SetTileGridSize(const gfx::Size& tile_grid_size) override; 40 void SetTileGridSize(const gfx::Size& tile_grid_size) override;
41 void SetUnsuitableForGpuRasterizationForTesting() override; 41 void SetUnsuitableForGpuRasterizationForTesting() override;
42 SkTileGridFactory::TileGridInfo GetTileGridInfoForTesting() const override; 42 gfx::Size GetTileGridSizeForTesting() const override;
43
44 static void ComputeTileGridInfo(const gfx::Size& tile_grid_size,
45 SkTileGridFactory::TileGridInfo* info);
46 43
47 protected: 44 protected:
48 class CC_EXPORT PictureInfo { 45 class CC_EXPORT PictureInfo {
49 public: 46 public:
50 enum { INVALIDATION_FRAMES_TRACKED = 32 }; 47 enum { INVALIDATION_FRAMES_TRACKED = 32 };
51 48
52 PictureInfo(); 49 PictureInfo();
53 ~PictureInfo(); 50 ~PictureInfo();
54 51
55 bool Invalidate(int frame_number); 52 bool Invalidate(int frame_number);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // A picture pile is a tiled set of pictures. The picture map is a map of tile 84 // A picture pile is a tiled set of pictures. The picture map is a map of tile
88 // indices to picture infos. 85 // indices to picture infos.
89 PictureMap picture_map_; 86 PictureMap picture_map_;
90 TilingData tiling_; 87 TilingData tiling_;
91 88
92 // If non-empty, all pictures tiles inside this rect are recorded. There may 89 // If non-empty, all pictures tiles inside this rect are recorded. There may
93 // be recordings outside this rect, but everything inside the rect is 90 // be recordings outside this rect, but everything inside the rect is
94 // recorded. 91 // recorded.
95 gfx::Rect recorded_viewport_; 92 gfx::Rect recorded_viewport_;
96 float min_contents_scale_; 93 float min_contents_scale_;
97 SkTileGridFactory::TileGridInfo tile_grid_info_; 94 gfx::Size tile_grid_size_;
98 int slow_down_raster_scale_factor_for_debug_; 95 int slow_down_raster_scale_factor_for_debug_;
99 bool can_use_lcd_text_; 96 bool can_use_lcd_text_;
100 // A hint about whether there are any recordings. This may be a false 97 // A hint about whether there are any recordings. This may be a false
101 // positive. 98 // positive.
102 bool has_any_recordings_; 99 bool has_any_recordings_;
103 bool is_solid_color_; 100 bool is_solid_color_;
104 SkColor solid_color_; 101 SkColor solid_color_;
105 int pixel_record_distance_; 102 int pixel_record_distance_;
106 103
107 private: 104 private:
(...skipping 16 matching lines...) Expand all
124 void SetBufferPixels(int buffer_pixels); 121 void SetBufferPixels(int buffer_pixels);
125 122
126 bool is_suitable_for_gpu_rasterization_; 123 bool is_suitable_for_gpu_rasterization_;
127 124
128 DISALLOW_COPY_AND_ASSIGN(PicturePile); 125 DISALLOW_COPY_AND_ASSIGN(PicturePile);
129 }; 126 };
130 127
131 } // namespace cc 128 } // namespace cc
132 129
133 #endif // CC_RESOURCES_PICTURE_PILE_H_ 130 #endif // CC_RESOURCES_PICTURE_PILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698