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, |