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

Unified Diff: src/core/SkImageGenerator.cpp

Issue 1928403002: Enable generating SkImage with the same uniqueID in SkImageGenerator subclass (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: CL description Created 4 years, 8 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 | « include/core/SkImageGenerator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageGenerator.cpp
diff --git a/src/core/SkImageGenerator.cpp b/src/core/SkImageGenerator.cpp
index c8c94c22707fe1dc5a57a8f54da7de24729665bf..84d9c743eb4daaab1238c4101b49429b31acdd93 100644
--- a/src/core/SkImageGenerator.cpp
+++ b/src/core/SkImageGenerator.cpp
@@ -8,9 +8,9 @@
#include "SkImageGenerator.h"
#include "SkNextID.h"
-SkImageGenerator::SkImageGenerator(const SkImageInfo& info)
+SkImageGenerator::SkImageGenerator(const SkImageInfo& info, uint32_t uniqueID)
: fInfo(info)
- , fUniqueID(SkNextID::ImageID())
+ , fUniqueID(kNeedNewImageUniqueID == uniqueID ? SkNextID::ImageID() : uniqueID)
{}
bool SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
« no previous file with comments | « include/core/SkImageGenerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698