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

Side by Side Diff: cc/tiles/prioritized_tile.h

Issue 2710593003: cc: Fix const value pattern by replacing it by non-const or reference. (Closed)
Patch Set: update rebase Created 3 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
« no previous file with comments | « cc/test/pixel_comparator.h ('k') | cc/tiles/prioritized_tile.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_TILES_PRIORITIZED_TILE_H_ 5 #ifndef CC_TILES_PRIORITIZED_TILE_H_
6 #define CC_TILES_PRIORITIZED_TILE_H_ 6 #define CC_TILES_PRIORITIZED_TILE_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/playback/raster_source.h" 9 #include "cc/playback/raster_source.h"
10 #include "cc/tiles/picture_layer_tiling.h" 10 #include "cc/tiles/picture_layer_tiling.h"
11 #include "cc/tiles/tile.h" 11 #include "cc/tiles/tile.h"
12 #include "cc/tiles/tile_priority.h" 12 #include "cc/tiles/tile_priority.h"
13 13
14 namespace cc { 14 namespace cc {
15 class RasterSource; 15 class RasterSource;
16 class PictureLayerTiling; 16 class PictureLayerTiling;
17 17
18 class CC_EXPORT PrioritizedTile { 18 class CC_EXPORT PrioritizedTile {
19 public: 19 public:
20 // This class is constructed and returned by a |PictureLayerTiling|, and 20 // This class is constructed and returned by a |PictureLayerTiling|, and
21 // represents a tile and its priority. 21 // represents a tile and its priority.
22 PrioritizedTile(); 22 PrioritizedTile();
23 PrioritizedTile(Tile* tile, 23 PrioritizedTile(Tile* tile,
24 const PictureLayerTiling* source_tiling, 24 const PictureLayerTiling* source_tiling,
25 const TilePriority priority, 25 const TilePriority& priority,
26 bool is_occluded, 26 bool is_occluded,
27 bool is_process_for_images_only); 27 bool is_process_for_images_only);
28 ~PrioritizedTile(); 28 ~PrioritizedTile();
29 29
30 Tile* tile() const { return tile_; } 30 Tile* tile() const { return tile_; }
31 const scoped_refptr<RasterSource>& raster_source() const { 31 const scoped_refptr<RasterSource>& raster_source() const {
32 return source_tiling_->raster_source(); 32 return source_tiling_->raster_source();
33 } 33 }
34 const TilePriority& priority() const { return priority_; } 34 const TilePriority& priority() const { return priority_; }
35 bool is_occluded() const { return is_occluded_; } 35 bool is_occluded() const { return is_occluded_; }
36 bool is_process_for_images_only() const { 36 bool is_process_for_images_only() const {
37 return is_process_for_images_only_; 37 return is_process_for_images_only_;
38 } 38 }
39 39
40 void AsValueInto(base::trace_event::TracedValue* value) const; 40 void AsValueInto(base::trace_event::TracedValue* value) const;
41 41
42 private: 42 private:
43 Tile* tile_ = nullptr; 43 Tile* tile_ = nullptr;
44 const PictureLayerTiling* source_tiling_ = nullptr; 44 const PictureLayerTiling* source_tiling_ = nullptr;
45 TilePriority priority_; 45 TilePriority priority_;
46 bool is_occluded_ = false; 46 bool is_occluded_ = false;
47 bool is_process_for_images_only_ = false; 47 bool is_process_for_images_only_ = false;
48 }; 48 };
49 49
50 } // namespace cc 50 } // namespace cc
51 51
52 #endif // CC_TILES_PRIORITIZED_TILE_H_ 52 #endif // CC_TILES_PRIORITIZED_TILE_H_
OLDNEW
« no previous file with comments | « cc/test/pixel_comparator.h ('k') | cc/tiles/prioritized_tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698