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

Unified Diff: cc/tiles/prioritized_tile.h

Issue 2150473003: cc: Eliminate refcount churn in prioritized tile's raster source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/tiles/picture_layer_tiling.cc ('k') | cc/tiles/prioritized_tile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/prioritized_tile.h
diff --git a/cc/tiles/prioritized_tile.h b/cc/tiles/prioritized_tile.h
index 1d7ad9212db2868c9d68dac14122eb7144c2a752..300cc83e13491631d440def658bcfc6ea6101efa 100644
--- a/cc/tiles/prioritized_tile.h
+++ b/cc/tiles/prioritized_tile.h
@@ -7,6 +7,7 @@
#include "cc/base/cc_export.h"
#include "cc/playback/raster_source.h"
+#include "cc/tiles/picture_layer_tiling.h"
#include "cc/tiles/tile.h"
#include "cc/tiles/tile_priority.h"
@@ -19,16 +20,15 @@ class CC_EXPORT PrioritizedTile {
// This class is constructed and returned by a |PictureLayerTiling|, and
// represents a tile and its priority.
PrioritizedTile();
- PrioritizedTile(const PrioritizedTile& other);
- PrioritizedTile(PrioritizedTile&& other);
+ PrioritizedTile(Tile* tile,
+ const PictureLayerTiling* source_tiling,
+ const TilePriority priority,
+ bool is_occluded);
~PrioritizedTile();
- PrioritizedTile& operator=(const PrioritizedTile& other);
- PrioritizedTile& operator=(PrioritizedTile&& other);
-
Tile* tile() const { return tile_; }
const scoped_refptr<RasterSource>& raster_source() const {
- return raster_source_;
+ return source_tiling_->raster_source();
}
const TilePriority& priority() const { return priority_; }
bool is_occluded() const { return is_occluded_; }
@@ -36,17 +36,10 @@ class CC_EXPORT PrioritizedTile {
void AsValueInto(base::trace_event::TracedValue* value) const;
private:
- friend class PictureLayerTiling;
-
- PrioritizedTile(Tile* tile,
- scoped_refptr<RasterSource> raster_source,
- const TilePriority priority,
- bool is_occluded);
-
- Tile* tile_;
- scoped_refptr<RasterSource> raster_source_;
+ Tile* tile_ = nullptr;
+ const PictureLayerTiling* source_tiling_ = nullptr;
TilePriority priority_;
- bool is_occluded_;
+ bool is_occluded_ = false;
};
} // namespace cc
« no previous file with comments | « cc/tiles/picture_layer_tiling.cc ('k') | cc/tiles/prioritized_tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698