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

Unified Diff: src/effects/SkColorFilterImageFilter.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/SkBlurImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorFilterImageFilter.cpp
diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp
index 0087627ce9e232b576d12ad174228f73a3362acb..7c3e9e884e289d74477b440baf84db0d517be0de 100755
--- a/src/effects/SkColorFilterImageFilter.cpp
+++ b/src/effects/SkColorFilterImageFilter.cpp
@@ -58,7 +58,7 @@ bool matrix_needs_clamping(SkScalar matrix[20]) {
};
SkColorFilterImageFilter* SkColorFilterImageFilter::Create(SkColorFilter* cf,
- SkImageFilter* input, const CropRect* cropRect) {
+ SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID) {
SkASSERT(cf);
SkScalar colorMatrix[20], inputMatrix[20];
SkColorFilter* inputColorFilter;
@@ -70,15 +70,15 @@ SkColorFilterImageFilter* SkColorFilterImageFilter::Create(SkColorFilter* cf,
SkScalar combinedMatrix[20];
mult_color_matrix(colorMatrix, inputMatrix, combinedMatrix);
SkAutoTUnref<SkColorFilter> newCF(SkColorMatrixFilter::Create(combinedMatrix));
- return SkNEW_ARGS(SkColorFilterImageFilter, (newCF, input->getInput(0), cropRect));
+ return SkNEW_ARGS(SkColorFilterImageFilter, (newCF, input->getInput(0), cropRect, 0));
}
}
- return SkNEW_ARGS(SkColorFilterImageFilter, (cf, input, cropRect));
+ return SkNEW_ARGS(SkColorFilterImageFilter, (cf, input, cropRect, uniqueID));
}
SkColorFilterImageFilter::SkColorFilterImageFilter(SkColorFilter* cf,
- SkImageFilter* input, const CropRect* cropRect)
- : INHERITED(1, &input, cropRect), fColorFilter(cf) {
+ SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID)
+ : INHERITED(1, &input, cropRect, uniqueID), fColorFilter(cf) {
SkASSERT(cf);
SkSafeRef(cf);
}
@@ -93,7 +93,7 @@ SkColorFilterImageFilter::SkColorFilterImageFilter(SkReadBuffer& buffer)
SkFlattenable* SkColorFilterImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
SkAutoTUnref<SkColorFilter> cf(buffer.readColorFilter());
- return Create(cf, common.getInput(0), &common.cropRect());
+ return Create(cf, common.getInput(0), &common.cropRect(), common.uniqueID());
}
void SkColorFilterImageFilter::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698