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

Unified Diff: cc/paint/discardable_image_store.cc

Issue 2873003002: Add stable id to PaintImage. (Closed)
Patch Set: rebase Created 3 years, 7 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/paint/discardable_image_store.h ('k') | cc/paint/paint_image.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/paint/discardable_image_store.cc
diff --git a/cc/paint/discardable_image_store.cc b/cc/paint/discardable_image_store.cc
index 0c77a0c248cedca1504b56b8a2939ce6402ec185..3ec50f2a742b872815d7391fbc4692c45f370d5a 100644
--- a/cc/paint/discardable_image_store.cc
+++ b/cc/paint/discardable_image_store.cc
@@ -75,7 +75,8 @@ DiscardableImageStore::DiscardableImageStore(
base::flat_map<ImageId, gfx::Rect>* image_id_to_rect)
: canvas_(base::MakeUnique<PaintTrackingCanvas>(width, height)),
image_set_(image_set),
- image_id_to_rect_(image_id_to_rect) {}
+ image_id_to_rect_(image_id_to_rect),
+ unknown_stable_id_(PaintImage::GetNextId()) {}
DiscardableImageStore::~DiscardableImageStore() = default;
@@ -182,7 +183,7 @@ void DiscardableImageStore::AddImageFromFlags(const SkRect& rect,
SkShader::TileMode xy[2];
SkImage* image = shader->isAImage(&matrix, xy);
if (image) {
- PaintImage paint_image(sk_ref_sp(image),
+ PaintImage paint_image(unknown_stable_id_, sk_ref_sp(image),
PaintImage::AnimationType::UNKNOWN,
PaintImage::CompletionState::UNKNOWN);
// TODO(ericrk): Handle cases where we only need a sub-rect from the
« no previous file with comments | « cc/paint/discardable_image_store.h ('k') | cc/paint/paint_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698