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

Unified Diff: src/effects/SkRectShaderImageFilter.cpp

Issue 503833002: Reimplement deserialization of SkImageFilter's uniqueID. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « src/effects/SkPictureImageFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkRectShaderImageFilter.cpp
diff --git a/src/effects/SkRectShaderImageFilter.cpp b/src/effects/SkRectShaderImageFilter.cpp
index be3c23ce4b411bedf08559f3383be9020d9125fe..fb34ed0007152f124ae557a5567aad4effa3bed5 100644
--- a/src/effects/SkRectShaderImageFilter.cpp
+++ b/src/effects/SkRectShaderImageFilter.cpp
@@ -23,13 +23,14 @@ SkRectShaderImageFilter* SkRectShaderImageFilter::Create(SkShader* s, const SkRe
return SkNEW_ARGS(SkRectShaderImageFilter, (s, &cropRect));
}
-SkRectShaderImageFilter* SkRectShaderImageFilter::Create(SkShader* s, const CropRect* cropRect) {
+SkRectShaderImageFilter* SkRectShaderImageFilter::Create(SkShader* s, const CropRect* cropRect, uint32_t uniqueID) {
SkASSERT(s);
- return SkNEW_ARGS(SkRectShaderImageFilter, (s, cropRect));
+ return SkNEW_ARGS(SkRectShaderImageFilter, (s, cropRect, uniqueID));
}
-SkRectShaderImageFilter::SkRectShaderImageFilter(SkShader* s, const CropRect* cropRect)
- : INHERITED(0, NULL, cropRect)
+SkRectShaderImageFilter::SkRectShaderImageFilter(SkShader* s, const CropRect* cropRect,
+ uint32_t uniqueID)
+ : INHERITED(0, NULL, cropRect, uniqueID)
, fShader(s) {
SkASSERT(s);
s->ref();
@@ -45,7 +46,7 @@ SkRectShaderImageFilter::SkRectShaderImageFilter(SkReadBuffer& buffer)
SkFlattenable* SkRectShaderImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 0);
SkAutoTUnref<SkShader> shader(buffer.readShader());
- return Create(shader.get(), &common.cropRect());
+ return Create(shader.get(), &common.cropRect(), common.uniqueID());
}
void SkRectShaderImageFilter::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/effects/SkPictureImageFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698