aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/SkImageFilter.cpp16
-rw-r--r--src/effects/SkBlurImageFilter.cpp7
-rwxr-xr-xsrc/effects/SkColorFilterImageFilter.cpp12
-rw-r--r--src/effects/SkDisplacementMapEffect.cpp11
-rw-r--r--src/effects/SkDropShadowImageFilter.cpp6
-rw-r--r--src/effects/SkLightingImageFilter.cpp36
-rw-r--r--src/effects/SkMatrixConvolutionImageFilter.cpp12
-rw-r--r--src/effects/SkMatrixImageFilter.cpp12
-rwxr-xr-xsrc/effects/SkMergeImageFilter.cpp9
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp9
-rw-r--r--src/effects/SkOffsetImageFilter.cpp6
-rw-r--r--src/effects/SkPictureImageFilter.cpp8
-rw-r--r--src/effects/SkRectShaderImageFilter.cpp11
-rw-r--r--src/effects/SkTileImageFilter.cpp6
-rw-r--r--src/effects/SkXfermodeImageFilter.cpp7
15 files changed, 79 insertions, 89 deletions
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 2837b7c84e..0cb954ceff 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -100,18 +100,20 @@ bool SkImageFilter::Common::unflatten(SkReadBuffer& buffer, int expectedCount) {
uint32_t flags = buffer.readUInt();
fCropRect = CropRect(rect, flags);
- fUniqueID = buffer.readUInt();
+ // FIXME: this is now unused; and should be made conditional on the next SkPicture version bump.
+ // See skbug.com/3559.
+ (void) buffer.readUInt();
return buffer.isValid();
}
///////////////////////////////////////////////////////////////////////////////////////////////////
-SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRect, uint32_t uniqueID)
+SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRect)
: fInputCount(inputCount),
fInputs(new SkImageFilter*[inputCount]),
fUsesSrcInput(false),
fCropRect(cropRect ? *cropRect : CropRect(SkRect(), 0x0)),
- fUniqueID(uniqueID ? uniqueID : next_image_filter_unique_id()) {
+ fUniqueID(next_image_filter_unique_id()) {
for (int i = 0; i < inputCount; ++i) {
if (NULL == inputs[i] || inputs[i]->usesSrcInput()) {
fUsesSrcInput = true;
@@ -129,7 +131,8 @@ SkImageFilter::~SkImageFilter() {
}
SkImageFilter::SkImageFilter(int inputCount, SkReadBuffer& buffer)
- : fUsesSrcInput(false) {
+ : fUsesSrcInput(false)
+ , fUniqueID(next_image_filter_unique_id()) {
Common common;
if (common.unflatten(buffer, inputCount)) {
fCropRect = common.cropRect();
@@ -141,7 +144,6 @@ SkImageFilter::SkImageFilter(int inputCount, SkReadBuffer& buffer)
fUsesSrcInput = true;
}
}
- fUniqueID = buffer.isCrossProcess() ? next_image_filter_unique_id() : common.uniqueID();
} else {
fInputCount = 0;
fInputs = NULL;
@@ -159,7 +161,9 @@ void SkImageFilter::flatten(SkWriteBuffer& buffer) const {
}
buffer.writeRect(fCropRect.rect());
buffer.writeUInt(fCropRect.flags());
- buffer.writeUInt(fUniqueID);
+ // FIXME: this is now unused; and should be removed on the next SkPicture version bump.
+ // See skbug.com/3559.
+ buffer.writeUInt(0);
}
bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index 4dcc05e904..01eeddd9ca 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -34,16 +34,15 @@ static SkVector mapSigma(const SkSize& localSigma, const SkMatrix& ctm) {
SkBlurImageFilter::SkBlurImageFilter(SkScalar sigmaX,
SkScalar sigmaY,
SkImageFilter* input,
- const CropRect* cropRect,
- uint32_t uniqueID)
- : INHERITED(1, &input, cropRect, uniqueID), fSigma(SkSize::Make(sigmaX, sigmaY)) {
+ const CropRect* cropRect)
+ : INHERITED(1, &input, cropRect), fSigma(SkSize::Make(sigmaX, sigmaY)) {
}
SkFlattenable* SkBlurImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
SkScalar sigmaX = buffer.readScalar();
SkScalar sigmaY = buffer.readScalar();
- return Create(sigmaX, sigmaY, common.getInput(0), &common.cropRect(), common.uniqueID());
+ return Create(sigmaX, sigmaY, common.getInput(0), &common.cropRect());
}
void SkBlurImageFilter::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp
index 210fb57b98..2eb720e5c4 100755
--- a/src/effects/SkColorFilterImageFilter.cpp
+++ b/src/effects/SkColorFilterImageFilter.cpp
@@ -16,7 +16,7 @@
#include "SkWriteBuffer.h"
SkColorFilterImageFilter* SkColorFilterImageFilter::Create(SkColorFilter* cf,
- SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID) {
+ SkImageFilter* input, const CropRect* cropRect) {
if (NULL == cf) {
return NULL;
}
@@ -28,22 +28,22 @@ SkColorFilterImageFilter* SkColorFilterImageFilter::Create(SkColorFilter* cf,
SkAutoUnref autoUnref(inputCF);
SkAutoTUnref<SkColorFilter> newCF(SkColorFilter::CreateComposeFilter(cf, inputCF));
if (newCF) {
- return SkNEW_ARGS(SkColorFilterImageFilter, (newCF, input->getInput(0), cropRect, 0));
+ return SkNEW_ARGS(SkColorFilterImageFilter, (newCF, input->getInput(0), cropRect));
}
}
- return SkNEW_ARGS(SkColorFilterImageFilter, (cf, input, cropRect, uniqueID));
+ return SkNEW_ARGS(SkColorFilterImageFilter, (cf, input, cropRect));
}
SkColorFilterImageFilter::SkColorFilterImageFilter(SkColorFilter* cf,
- SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID)
- : INHERITED(1, &input, cropRect, uniqueID), fColorFilter(SkRef(cf)) {
+ SkImageFilter* input, const CropRect* cropRect)
+ : INHERITED(1, &input, cropRect), fColorFilter(SkRef(cf)) {
}
SkFlattenable* SkColorFilterImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
SkAutoTUnref<SkColorFilter> cf(buffer.readColorFilter());
- return Create(cf, common.getInput(0), &common.cropRect(), common.uniqueID());
+ return Create(cf, common.getInput(0), &common.cropRect());
}
void SkColorFilterImageFilter::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 25339e613c..e280817e38 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -164,7 +164,7 @@ SkDisplacementMapEffect* SkDisplacementMapEffect::Create(ChannelSelectorType xCh
SkScalar scale,
SkImageFilter* displacement,
SkImageFilter* color,
- const CropRect* cropRect, uint32_t uniqueID) {
+ const CropRect* cropRect) {
if (!channel_selector_type_is_valid(xChannelSelector) ||
!channel_selector_type_is_valid(yChannelSelector)) {
return NULL;
@@ -172,16 +172,15 @@ SkDisplacementMapEffect* SkDisplacementMapEffect::Create(ChannelSelectorType xCh
SkImageFilter* inputs[2] = { displacement, color };
return SkNEW_ARGS(SkDisplacementMapEffect, (xChannelSelector, yChannelSelector, scale,
- inputs, cropRect, uniqueID));
+ inputs, cropRect));
}
SkDisplacementMapEffect::SkDisplacementMapEffect(ChannelSelectorType xChannelSelector,
ChannelSelectorType yChannelSelector,
SkScalar scale,
SkImageFilter* inputs[2],
- const CropRect* cropRect,
- uint32_t uniqueID)
- : INHERITED(2, inputs, cropRect, uniqueID)
+ const CropRect* cropRect)
+ : INHERITED(2, inputs, cropRect)
, fXChannelSelector(xChannelSelector)
, fYChannelSelector(yChannelSelector)
, fScale(scale)
@@ -196,7 +195,7 @@ SkFlattenable* SkDisplacementMapEffect::CreateProc(SkReadBuffer& buffer) {
ChannelSelectorType xsel = (ChannelSelectorType)buffer.readInt();
ChannelSelectorType ysel = (ChannelSelectorType)buffer.readInt();
SkScalar scale = buffer.readScalar();
- return Create(xsel, ysel, scale, common.getInput(0), common.getInput(1), &common.cropRect(), common.uniqueID());
+ return Create(xsel, ysel, scale, common.getInput(0), common.getInput(1), &common.cropRect());
}
void SkDisplacementMapEffect::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkDropShadowImageFilter.cpp b/src/effects/SkDropShadowImageFilter.cpp
index 22bee9dade..c453411d80 100644
--- a/src/effects/SkDropShadowImageFilter.cpp
+++ b/src/effects/SkDropShadowImageFilter.cpp
@@ -18,8 +18,8 @@
SkDropShadowImageFilter::SkDropShadowImageFilter(SkScalar dx, SkScalar dy,
SkScalar sigmaX, SkScalar sigmaY, SkColor color,
ShadowMode shadowMode, SkImageFilter* input,
- const CropRect* cropRect, uint32_t uniqueID)
- : INHERITED(1, &input, cropRect, uniqueID)
+ const CropRect* cropRect)
+ : INHERITED(1, &input, cropRect)
, fDx(dx)
, fDy(dy)
, fSigmaX(sigmaX)
@@ -40,7 +40,7 @@ SkFlattenable* SkDropShadowImageFilter::CreateProc(SkReadBuffer& buffer) {
kDrawShadowAndForeground_ShadowMode :
static_cast<ShadowMode>(buffer.readInt());
return Create(dx, dy, sigmaX, sigmaY, color, shadowMode, common.getInput(0),
- &common.cropRect(), common.uniqueID());
+ &common.cropRect());
}
void SkDropShadowImageFilter::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 2454dc1b36..115776707d 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -280,7 +280,7 @@ void writePoint3(const SkPoint3& point, SkWriteBuffer& buffer) {
class SkDiffuseLightingImageFilter : public SkLightingImageFilter {
public:
static SkImageFilter* Create(SkLight* light, SkScalar surfaceScale, SkScalar kd, SkImageFilter*,
- const CropRect*, uint32_t uniqueID = 0);
+ const CropRect*);
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDiffuseLightingImageFilter)
@@ -288,8 +288,7 @@ public:
protected:
SkDiffuseLightingImageFilter(SkLight* light, SkScalar surfaceScale,
- SkScalar kd, SkImageFilter* input, const CropRect* cropRect,
- uint32_t uniqueID);
+ SkScalar kd, SkImageFilter* input, const CropRect* cropRect);
void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
@@ -307,8 +306,7 @@ private:
class SkSpecularLightingImageFilter : public SkLightingImageFilter {
public:
static SkImageFilter* Create(SkLight* light, SkScalar surfaceScale,
- SkScalar ks, SkScalar shininess, SkImageFilter*, const CropRect*,
- uint32_t uniqueID = 0);
+ SkScalar ks, SkScalar shininess, SkImageFilter*, const CropRect*);
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSpecularLightingImageFilter)
@@ -318,8 +316,7 @@ public:
protected:
SkSpecularLightingImageFilter(SkLight* light, SkScalar surfaceScale, SkScalar ks,
- SkScalar shininess, SkImageFilter* input, const CropRect*,
- uint32_t uniqueID);
+ SkScalar shininess, SkImageFilter* input, const CropRect*);
void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
@@ -860,9 +857,8 @@ void SkLight::flattenLight(SkWriteBuffer& buffer) const {
///////////////////////////////////////////////////////////////////////////////
SkLightingImageFilter::SkLightingImageFilter(SkLight* light, SkScalar surfaceScale,
- SkImageFilter* input, const CropRect* cropRect,
- uint32_t uniqueID)
- : INHERITED(1, &input, cropRect, uniqueID)
+ SkImageFilter* input, const CropRect* cropRect)
+ : INHERITED(1, &input, cropRect)
, fLight(SkRef(light))
, fSurfaceScale(surfaceScale / 255)
{}
@@ -949,7 +945,7 @@ void SkLightingImageFilter::flatten(SkWriteBuffer& buffer) const {
///////////////////////////////////////////////////////////////////////////////
SkImageFilter* SkDiffuseLightingImageFilter::Create(SkLight* light, SkScalar surfaceScale,
- SkScalar kd, SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID) {
+ SkScalar kd, SkImageFilter* input, const CropRect* cropRect) {
if (NULL == light) {
return NULL;
}
@@ -961,11 +957,11 @@ SkImageFilter* SkDiffuseLightingImageFilter::Create(SkLight* light, SkScalar sur
if (kd < 0) {
return NULL;
}
- return SkNEW_ARGS(SkDiffuseLightingImageFilter, (light, surfaceScale, kd, input, cropRect, uniqueID));
+ return SkNEW_ARGS(SkDiffuseLightingImageFilter, (light, surfaceScale, kd, input, cropRect));
}
-SkDiffuseLightingImageFilter::SkDiffuseLightingImageFilter(SkLight* light, SkScalar surfaceScale, SkScalar kd, SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID)
- : SkLightingImageFilter(light, surfaceScale, input, cropRect, uniqueID),
+SkDiffuseLightingImageFilter::SkDiffuseLightingImageFilter(SkLight* light, SkScalar surfaceScale, SkScalar kd, SkImageFilter* input, const CropRect* cropRect)
+ : SkLightingImageFilter(light, surfaceScale, input, cropRect),
fKD(kd)
{
}
@@ -975,7 +971,7 @@ SkFlattenable* SkDiffuseLightingImageFilter::CreateProc(SkReadBuffer& buffer) {
SkAutoTUnref<SkLight> light(SkLight::UnflattenLight(buffer));
SkScalar surfaceScale = buffer.readScalar();
SkScalar kd = buffer.readScalar();
- return Create(light, surfaceScale, kd, common.getInput(0), &common.cropRect(), common.uniqueID());
+ return Create(light, surfaceScale, kd, common.getInput(0), &common.cropRect());
}
void SkDiffuseLightingImageFilter::flatten(SkWriteBuffer& buffer) const {
@@ -1061,7 +1057,7 @@ bool SkDiffuseLightingImageFilter::asFragmentProcessor(GrFragmentProcessor** fp,
///////////////////////////////////////////////////////////////////////////////
SkImageFilter* SkSpecularLightingImageFilter::Create(SkLight* light, SkScalar surfaceScale,
- SkScalar ks, SkScalar shininess, SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID) {
+ SkScalar ks, SkScalar shininess, SkImageFilter* input, const CropRect* cropRect) {
if (NULL == light) {
return NULL;
}
@@ -1074,11 +1070,11 @@ SkImageFilter* SkSpecularLightingImageFilter::Create(SkLight* light, SkScalar su
return NULL;
}
return SkNEW_ARGS(SkSpecularLightingImageFilter,
- (light, surfaceScale, ks, shininess, input, cropRect, uniqueID));
+ (light, surfaceScale, ks, shininess, input, cropRect));
}
-SkSpecularLightingImageFilter::SkSpecularLightingImageFilter(SkLight* light, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID)
- : SkLightingImageFilter(light, surfaceScale, input, cropRect, uniqueID),
+SkSpecularLightingImageFilter::SkSpecularLightingImageFilter(SkLight* light, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, SkImageFilter* input, const CropRect* cropRect)
+ : SkLightingImageFilter(light, surfaceScale, input, cropRect),
fKS(ks),
fShininess(shininess)
{
@@ -1090,7 +1086,7 @@ SkFlattenable* SkSpecularLightingImageFilter::CreateProc(SkReadBuffer& buffer) {
SkScalar surfaceScale = buffer.readScalar();
SkScalar ks = buffer.readScalar();
SkScalar shine = buffer.readScalar();
- return Create(light, surfaceScale, ks, shine, common.getInput(0), &common.cropRect(), common.uniqueID());
+ return Create(light, surfaceScale, ks, shine, common.getInput(0), &common.cropRect());
}
void SkSpecularLightingImageFilter::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index e9dd87852f..4cba043e99 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
@@ -30,9 +30,8 @@ SkMatrixConvolutionImageFilter::SkMatrixConvolutionImageFilter(
TileMode tileMode,
bool convolveAlpha,
SkImageFilter* input,
- const CropRect* cropRect,
- uint32_t uniqueID)
- : INHERITED(1, &input, cropRect, uniqueID),
+ const CropRect* cropRect)
+ : INHERITED(1, &input, cropRect),
fKernelSize(kernelSize),
fGain(gain),
fBias(bias),
@@ -56,8 +55,7 @@ SkMatrixConvolutionImageFilter* SkMatrixConvolutionImageFilter::Create(
TileMode tileMode,
bool convolveAlpha,
SkImageFilter* input,
- const CropRect* cropRect,
- uint32_t uniqueID) {
+ const CropRect* cropRect) {
if (kernelSize.width() < 1 || kernelSize.height() < 1) {
return NULL;
}
@@ -73,7 +71,7 @@ SkMatrixConvolutionImageFilter* SkMatrixConvolutionImageFilter::Create(
}
return SkNEW_ARGS(SkMatrixConvolutionImageFilter, (kernelSize, kernel, gain, bias,
kernelOffset, tileMode, convolveAlpha,
- input, cropRect, uniqueID));
+ input, cropRect));
}
SkFlattenable* SkMatrixConvolutionImageFilter::CreateProc(SkReadBuffer& buffer) {
@@ -99,7 +97,7 @@ SkFlattenable* SkMatrixConvolutionImageFilter::CreateProc(SkReadBuffer& buffer)
TileMode tileMode = (TileMode)buffer.readInt();
bool convolveAlpha = buffer.readBool();
return Create(kernelSize, kernel.get(), gain, bias, kernelOffset, tileMode, convolveAlpha,
- common.getInput(0), &common.cropRect(), common.uniqueID());
+ common.getInput(0), &common.cropRect());
}
void SkMatrixConvolutionImageFilter::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkMatrixImageFilter.cpp b/src/effects/SkMatrixImageFilter.cpp
index 54caca6dc3..a61867e041 100644
--- a/src/effects/SkMatrixImageFilter.cpp
+++ b/src/effects/SkMatrixImageFilter.cpp
@@ -17,18 +17,16 @@
SkMatrixImageFilter::SkMatrixImageFilter(const SkMatrix& transform,
SkFilterQuality filterQuality,
- SkImageFilter* input,
- uint32_t uniqueID)
- : INHERITED(1, &input, NULL, uniqueID),
+ SkImageFilter* input)
+ : INHERITED(1, &input),
fTransform(transform),
fFilterQuality(filterQuality) {
}
SkMatrixImageFilter* SkMatrixImageFilter::Create(const SkMatrix& transform,
SkFilterQuality filterQuality,
- SkImageFilter* input,
- uint32_t uniqueID) {
- return SkNEW_ARGS(SkMatrixImageFilter, (transform, filterQuality, input, uniqueID));
+ SkImageFilter* input) {
+ return SkNEW_ARGS(SkMatrixImageFilter, (transform, filterQuality, input));
}
SkFlattenable* SkMatrixImageFilter::CreateProc(SkReadBuffer& buffer) {
@@ -36,7 +34,7 @@ SkFlattenable* SkMatrixImageFilter::CreateProc(SkReadBuffer& buffer) {
SkMatrix matrix;
buffer.readMatrix(&matrix);
SkFilterQuality quality = static_cast<SkFilterQuality>(buffer.readInt());
- return Create(matrix, quality, common.getInput(0), common.uniqueID());
+ return Create(matrix, quality, common.getInput(0));
}
void SkMatrixImageFilter::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp
index 7034e158e5..f68d913378 100755
--- a/src/effects/SkMergeImageFilter.cpp
+++ b/src/effects/SkMergeImageFilter.cpp
@@ -42,9 +42,8 @@ void SkMergeImageFilter::initModes(const SkXfermode::Mode modes[]) {
SkMergeImageFilter::SkMergeImageFilter(SkImageFilter* filters[], int count,
const SkXfermode::Mode modes[],
- const CropRect* cropRect,
- uint32_t uniqueID)
- : INHERITED(count, filters, cropRect, uniqueID) {
+ const CropRect* cropRect)
+ : INHERITED(count, filters, cropRect) {
SkASSERT(count >= 0);
this->initModes(modes);
}
@@ -128,9 +127,9 @@ SkFlattenable* SkMergeImageFilter::CreateProc(SkReadBuffer& buffer) {
if (!buffer.isValid()) {
return NULL;
}
- return Create(common.inputs(), count, modes.get(), &common.cropRect(), common.uniqueID());
+ return Create(common.inputs(), count, modes.get(), &common.cropRect());
}
- return Create(common.inputs(), count, NULL, &common.cropRect(), common.uniqueID());
+ return Create(common.inputs(), count, NULL, &common.cropRect());
}
void SkMergeImageFilter::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index d2ec036ba7..32d525a42a 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -24,9 +24,8 @@
SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX,
int radiusY,
SkImageFilter* input,
- const CropRect* cropRect,
- uint32_t uniqueID)
- : INHERITED(1, &input, cropRect, uniqueID), fRadius(SkISize::Make(radiusX, radiusY)) {
+ const CropRect* cropRect)
+ : INHERITED(1, &input, cropRect), fRadius(SkISize::Make(radiusX, radiusY)) {
}
void SkMorphologyImageFilter::flatten(SkWriteBuffer& buffer) const {
@@ -254,14 +253,14 @@ SkFlattenable* SkErodeImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
const int width = buffer.readInt();
const int height = buffer.readInt();
- return Create(width, height, common.getInput(0), &common.cropRect(), common.uniqueID());
+ return Create(width, height, common.getInput(0), &common.cropRect());
}
SkFlattenable* SkDilateImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
const int width = buffer.readInt();
const int height = buffer.readInt();
- return Create(width, height, common.getInput(0), &common.cropRect(), common.uniqueID());
+ return Create(width, height, common.getInput(0), &common.cropRect());
}
#ifndef SK_IGNORE_TO_STRING
diff --git a/src/effects/SkOffsetImageFilter.cpp b/src/effects/SkOffsetImageFilter.cpp
index 8a17ce34ec..1944e58922 100644
--- a/src/effects/SkOffsetImageFilter.cpp
+++ b/src/effects/SkOffsetImageFilter.cpp
@@ -95,7 +95,7 @@ SkFlattenable* SkOffsetImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
SkPoint offset;
buffer.readPoint(&offset);
- return Create(offset.x(), offset.y(), common.getInput(0), &common.cropRect(), common.uniqueID());
+ return Create(offset.x(), offset.y(), common.getInput(0), &common.cropRect());
}
void SkOffsetImageFilter::flatten(SkWriteBuffer& buffer) const {
@@ -104,8 +104,8 @@ void SkOffsetImageFilter::flatten(SkWriteBuffer& buffer) const {
}
SkOffsetImageFilter::SkOffsetImageFilter(SkScalar dx, SkScalar dy, SkImageFilter* input,
- const CropRect* cropRect, uint32_t uniqueID)
- : INHERITED(1, &input, cropRect, uniqueID) {
+ const CropRect* cropRect)
+ : INHERITED(1, &input, cropRect) {
fOffset.set(dx, dy);
}
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp
index d3bc15ce23..baae6f8c67 100644
--- a/src/effects/SkPictureImageFilter.cpp
+++ b/src/effects/SkPictureImageFilter.cpp
@@ -13,8 +13,8 @@
#include "SkWriteBuffer.h"
#include "SkValidationUtils.h"
-SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, uint32_t uniqueID)
- : INHERITED(0, 0, NULL, uniqueID)
+SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture)
+ : INHERITED(0, 0, NULL)
, fPicture(SkSafeRef(picture))
, fCropRect(picture ? picture->cullRect() : SkRect::MakeEmpty())
, fPictureResolution(kDeviceSpace_PictureResolution)
@@ -22,9 +22,9 @@ SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, uint32_t un
}
SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect,
- uint32_t uniqueID, PictureResolution pictureResolution,
+ PictureResolution pictureResolution,
SkFilterQuality filterQuality)
- : INHERITED(0, 0, NULL, uniqueID)
+ : INHERITED(0, 0, NULL)
, fPicture(SkSafeRef(picture))
, fCropRect(cropRect)
, fPictureResolution(pictureResolution)
diff --git a/src/effects/SkRectShaderImageFilter.cpp b/src/effects/SkRectShaderImageFilter.cpp
index a00994e75b..cdf03131c1 100644
--- a/src/effects/SkRectShaderImageFilter.cpp
+++ b/src/effects/SkRectShaderImageFilter.cpp
@@ -23,21 +23,20 @@ SkRectShaderImageFilter* SkRectShaderImageFilter::Create(SkShader* s, const SkRe
return s ? SkNEW_ARGS(SkRectShaderImageFilter, (s, &cropRect)) : NULL;
}
-SkRectShaderImageFilter* SkRectShaderImageFilter::Create(SkShader* s, const CropRect* cropRect, uint32_t uniqueID) {
+SkRectShaderImageFilter* SkRectShaderImageFilter::Create(SkShader* s, const CropRect* cropRect) {
SkASSERT(s);
- return s ? SkNEW_ARGS(SkRectShaderImageFilter, (s, cropRect, uniqueID)) : NULL;
+ return s ? SkNEW_ARGS(SkRectShaderImageFilter, (s, cropRect)) : NULL;
}
-SkRectShaderImageFilter::SkRectShaderImageFilter(SkShader* s, const CropRect* cropRect,
- uint32_t uniqueID)
- : INHERITED(0, NULL, cropRect, uniqueID)
+SkRectShaderImageFilter::SkRectShaderImageFilter(SkShader* s, const CropRect* cropRect)
+ : INHERITED(0, NULL, cropRect)
, fShader(SkRef(s)) {
}
SkFlattenable* SkRectShaderImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 0);
SkAutoTUnref<SkShader> shader(buffer.readShader());
- return Create(shader.get(), &common.cropRect(), common.uniqueID());
+ return Create(shader.get(), &common.cropRect());
}
void SkRectShaderImageFilter::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkTileImageFilter.cpp b/src/effects/SkTileImageFilter.cpp
index 669c234d95..c5cf51871d 100644
--- a/src/effects/SkTileImageFilter.cpp
+++ b/src/effects/SkTileImageFilter.cpp
@@ -17,11 +17,11 @@
#include "SkValidationUtils.h"
SkTileImageFilter* SkTileImageFilter::Create(const SkRect& srcRect, const SkRect& dstRect,
- SkImageFilter* input, uint32_t uniqueID) {
+ SkImageFilter* input) {
if (!SkIsValidRect(srcRect) || !SkIsValidRect(dstRect)) {
return NULL;
}
- return SkNEW_ARGS(SkTileImageFilter, (srcRect, dstRect, input, uniqueID));
+ return SkNEW_ARGS(SkTileImageFilter, (srcRect, dstRect, input));
}
bool SkTileImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src,
@@ -98,7 +98,7 @@ SkFlattenable* SkTileImageFilter::CreateProc(SkReadBuffer& buffer) {
SkRect src, dst;
buffer.readRect(&src);
buffer.readRect(&dst);
- return Create(src, dst, common.getInput(0), common.uniqueID());
+ return Create(src, dst, common.getInput(0));
}
void SkTileImageFilter::flatten(SkWriteBuffer& buffer) const {
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index 2ba5ec5160..c3f8487ab6 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -22,9 +22,8 @@
SkXfermodeImageFilter::SkXfermodeImageFilter(SkXfermode* mode,
SkImageFilter* inputs[2],
- const CropRect* cropRect,
- uint32_t uniqueID)
- : INHERITED(2, inputs, cropRect, uniqueID), fMode(mode) {
+ const CropRect* cropRect)
+ : INHERITED(2, inputs, cropRect), fMode(mode) {
SkSafeRef(fMode);
}
@@ -35,7 +34,7 @@ SkXfermodeImageFilter::~SkXfermodeImageFilter() {
SkFlattenable* SkXfermodeImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2);
SkAutoTUnref<SkXfermode> mode(buffer.readXfermode());
- return Create(mode, common.getInput(0), common.getInput(1), &common.cropRect(), common.uniqueID());
+ return Create(mode, common.getInput(0), common.getInput(1), &common.cropRect());
}
void SkXfermodeImageFilter::flatten(SkWriteBuffer& buffer) const {