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

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: 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..c8ee76dcd7150047f8bda74d1c4551941aebb804 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,11 @@ 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);
danakj 2016/07/14 21:19:08 Can it be DISALLOW_COPY_AND_ASSIGN?
vmpstr 2016/07/14 21:27:41 No, it's still being copied...
- PrioritizedTile(PrioritizedTile&& other);
~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_; }
@@ -39,14 +35,14 @@ class CC_EXPORT PrioritizedTile {
friend class PictureLayerTiling;
danakj 2016/07/14 21:19:08 can it be gone?
vmpstr 2016/07/14 21:27:41 Done.
PrioritizedTile(Tile* tile,
danakj 2016/07/14 21:19:08 can it be public?
vmpstr 2016/07/14 21:27:40 Done.
- scoped_refptr<RasterSource> raster_source,
+ const PictureLayerTiling* source_tiling,
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