aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-06-23 12:19:41 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-06-23 12:19:41 +0000
commit048522dd2aa45d1b4bf52944527f877b30ea45fd (patch)
tree4547ff538ea7af3d1c5c711459520fd4f5c83929 /samplecode
parent845fdaca174f4675e9acc164b510e3a5ffa9053c (diff)
remove remaining references to porterduff
git-svn-id: http://skia.googlecode.com/svn/trunk@236 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleAll.cpp22
-rw-r--r--samplecode/SampleArc.cpp1
-rw-r--r--samplecode/SampleBitmapRect.cpp1
-rw-r--r--samplecode/SampleCamera.cpp1
-rw-r--r--samplecode/SampleEffects.cpp1
-rw-r--r--samplecode/SampleEncode.cpp1
-rw-r--r--samplecode/SampleFilter2.cpp1
-rw-r--r--samplecode/SampleFuzz.cpp15
-rw-r--r--samplecode/SampleImage.cpp1
-rw-r--r--samplecode/SampleImageDir.cpp1
-rw-r--r--samplecode/SampleLayerMask.cpp5
-rw-r--r--samplecode/SampleLayers.cpp7
-rw-r--r--samplecode/SamplePatch.cpp1
-rw-r--r--samplecode/SamplePath.cpp1
-rw-r--r--samplecode/SamplePathClip.cpp1
-rw-r--r--samplecode/SamplePathEffects.cpp3
-rw-r--r--samplecode/SampleShaders.cpp5
-rw-r--r--samplecode/SampleShapes.cpp1
-rw-r--r--samplecode/SampleStrokeText.cpp4
-rw-r--r--samplecode/SampleTests.cpp1
-rw-r--r--samplecode/SampleTextAlpha.cpp1
-rw-r--r--samplecode/SampleTextEffects.cpp18
-rw-r--r--samplecode/SampleVertices.cpp1
23 files changed, 37 insertions, 57 deletions
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp
index 748c4bccc4..c80ee432a8 100644
--- a/samplecode/SampleAll.cpp
+++ b/samplecode/SampleAll.cpp
@@ -84,7 +84,7 @@ static void r0(SkLayerRasterizer* rast, SkPaint& p)
p.setAlpha(0x11);
p.setStyle(SkPaint::kFill_Style);
- p.setPorterDuffXfermode(SkPorterDuff::kSrc_Mode);
+ p.setXfermode(SkXfermode::kSrc_Mode);
rast->addLayer(p);
}
@@ -93,7 +93,7 @@ static void r1(SkLayerRasterizer* rast, SkPaint& p)
rast->addLayer(p);
p.setAlpha(0x40);
- p.setPorterDuffXfermode(SkPorterDuff::kSrc_Mode);
+ p.setXfermode(SkXfermode::kSrc_Mode);
p.setStyle(SkPaint::kStroke_Style);
p.setStrokeWidth(SK_Scalar1*2);
rast->addLayer(p);
@@ -107,7 +107,7 @@ static void r2(SkLayerRasterizer* rast, SkPaint& p)
p.setStyle(SkPaint::kStroke_Style);
p.setStrokeWidth(SK_Scalar1*3/2);
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p);
}
@@ -119,7 +119,7 @@ static void r3(SkLayerRasterizer* rast, SkPaint& p)
p.setAlpha(0x20);
p.setStyle(SkPaint::kFill_Style);
- p.setPorterDuffXfermode(SkPorterDuff::kSrc_Mode);
+ p.setXfermode(SkXfermode::kSrc_Mode);
rast->addLayer(p);
}
@@ -129,7 +129,7 @@ static void r4(SkLayerRasterizer* rast, SkPaint& p)
rast->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
p.setAlpha(0xFF);
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p, SK_Scalar1*3/2, SK_Scalar1*3/2);
p.setXfermode(NULL);
@@ -141,7 +141,7 @@ static void r5(SkLayerRasterizer* rast, SkPaint& p)
rast->addLayer(p);
p.setPathEffect(new SkDiscretePathEffect(SK_Scalar1*4, SK_Scalar1*3))->unref();
- p.setPorterDuffXfermode(SkPorterDuff::kSrcOut_Mode);
+ p.setXfermode(SkXfermode::kSrcOut_Mode);
rast->addLayer(p);
}
@@ -153,7 +153,7 @@ static void r6(SkLayerRasterizer* rast, SkPaint& p)
SkLayerRasterizer* rast2 = new SkLayerRasterizer;
r5(rast2, p);
p.setRasterizer(rast2)->unref();
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p);
}
@@ -208,7 +208,7 @@ static void r8(SkLayerRasterizer* rast, SkPaint& p)
lattice.setScale(SK_Scalar1*6, SK_Scalar1*6, 0, 0);
lattice.postSkew(SK_Scalar1/3, 0, 0, 0);
p.setPathEffect(new Dot2DPathEffect(SK_Scalar1*2, lattice))->unref();
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p);
p.setPathEffect(NULL);
@@ -278,7 +278,7 @@ static void r9(SkLayerRasterizer* rast, SkPaint& p)
lattice.setScale(SK_Scalar1, SK_Scalar1*6, 0, 0);
lattice.postRotate(SkIntToScalar(30), 0, 0);
p.setPathEffect(new Line2DPathEffect(SK_Scalar1*2, lattice))->unref();
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p);
p.setPathEffect(NULL);
@@ -489,7 +489,7 @@ protected:
SkEmbossMaskFilter* embossFilter = new SkEmbossMaskFilter(light,
radius);
- SkXfermode* xfermode = SkPorterDuff::CreateXfermode(SkPorterDuff::kXor_Mode);
+ SkXfermode* xfermode = SkXfermode::Create(SkXfermode::kXor_Mode);
SkColorFilter* lightingFilter = SkColorFilter::CreateLightingFilter(
0xff89bc45, 0xff112233);
@@ -684,7 +684,7 @@ SkCornerPathEffect.h:28:class SkCornerPathEffect : public SkPathEffect {
SkColor colors2[] = {SK_ColorBLACK, SkColorSetARGB(0x80, 0, 0, 0)};
SkShader* shaderB = SkGradientShader::CreateLinear(pts, colors2, NULL,
2, SkShader::kClamp_TileMode);
- SkXfermode* mode = SkPorterDuff::CreateXfermode(SkPorterDuff::kDstIn_Mode);
+ SkXfermode* mode = SkXfermode::Create(SkXfermode::kDstIn_Mode);
SkShader* result = new SkComposeShader(shaderA, shaderB, mode);
shaderA->unref();
shaderB->unref();
diff --git a/samplecode/SampleArc.cpp b/samplecode/SampleArc.cpp
index 9deec8193a..19bf5f8533 100644
--- a/samplecode/SampleArc.cpp
+++ b/samplecode/SampleArc.cpp
@@ -13,7 +13,6 @@
#include "SkRandom.h"
#include "SkColorPriv.h"
#include "SkColorFilter.h"
-#include "SkPorterDuff.h"
#include "SkLayerRasterizer.h"
#include "SkParsePath.h"
diff --git a/samplecode/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp
index ea6c705283..f59ff94416 100644
--- a/samplecode/SampleBitmapRect.cpp
+++ b/samplecode/SampleBitmapRect.cpp
@@ -5,7 +5,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
diff --git a/samplecode/SampleCamera.cpp b/samplecode/SampleCamera.cpp
index 9a8d1efc8a..4d50b5a6ba 100644
--- a/samplecode/SampleCamera.cpp
+++ b/samplecode/SampleCamera.cpp
@@ -36,7 +36,6 @@ protected:
void drawBG(SkCanvas* canvas)
{
canvas->drawColor(0xFFDDDDDD);
-// canvas->drawColor(0, SkPorterDuff::kClear_Mode);
}
virtual void onDraw(SkCanvas* canvas)
diff --git a/samplecode/SampleEffects.cpp b/samplecode/SampleEffects.cpp
index 507f727228..94f0413942 100644
--- a/samplecode/SampleEffects.cpp
+++ b/samplecode/SampleEffects.cpp
@@ -1,7 +1,6 @@
#include "SampleCode.h"
#include "SkCanvas.h"
#include "SkPaint.h"
-#include "SkPorterDuff.h"
#include "SkView.h"
#include "SkBlurMaskFilter.h"
diff --git a/samplecode/SampleEncode.cpp b/samplecode/SampleEncode.cpp
index 31ddb8b4b3..2730ecef60 100644
--- a/samplecode/SampleEncode.cpp
+++ b/samplecode/SampleEncode.cpp
@@ -6,7 +6,6 @@
#include "SkImageDecoder.h"
#include "SkImageEncoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
diff --git a/samplecode/SampleFilter2.cpp b/samplecode/SampleFilter2.cpp
index e181870fc6..590d3ef01c 100644
--- a/samplecode/SampleFilter2.cpp
+++ b/samplecode/SampleFilter2.cpp
@@ -5,7 +5,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
diff --git a/samplecode/SampleFuzz.cpp b/samplecode/SampleFuzz.cpp
index e42887eaac..309affe02b 100644
--- a/samplecode/SampleFuzz.cpp
+++ b/samplecode/SampleFuzz.cpp
@@ -4,7 +4,6 @@
#include "SkBlurMaskFilter.h"
#include "SkPaint.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkXfermode.h"
#include "SkMatrix.h"
#include "SkColor.h"
@@ -117,13 +116,13 @@ static void do_fuzz(SkCanvas* canvas) {
break;
case 2: {
- SkPorterDuff::Mode mode;
- switch (R(3)) {
- case 0: mode = SkPorterDuff::kSrc_Mode; break;
- case 1: mode = SkPorterDuff::kXor_Mode; break;
- case 2: mode = SkPorterDuff::kSrcOver_Mode; break;
- }
- paint.setXfermode(SkPorterDuff::CreateXfermode(mode))->safeUnref();
+ SkXfermode::Mode mode;
+ switch (R(3)) {
+ case 0: mode = SkXfermode::kSrc_Mode; break;
+ case 1: mode = SkXfermode::kXor_Mode; break;
+ case 2: mode = SkXfermode::kSrcOver_Mode; break;
+ }
+ paint.setXfermode(mode);
}
break;
diff --git a/samplecode/SampleImage.cpp b/samplecode/SampleImage.cpp
index 69cbd794d7..29442991a7 100644
--- a/samplecode/SampleImage.cpp
+++ b/samplecode/SampleImage.cpp
@@ -5,7 +5,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
diff --git a/samplecode/SampleImageDir.cpp b/samplecode/SampleImageDir.cpp
index e221fe187a..8ef59ad77e 100644
--- a/samplecode/SampleImageDir.cpp
+++ b/samplecode/SampleImageDir.cpp
@@ -5,7 +5,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
diff --git a/samplecode/SampleLayerMask.cpp b/samplecode/SampleLayerMask.cpp
index 8cbe76d340..819eb5c0f3 100644
--- a/samplecode/SampleLayerMask.cpp
+++ b/samplecode/SampleLayerMask.cpp
@@ -1,7 +1,6 @@
#include "SampleCode.h"
#include "SkCanvas.h"
#include "SkPaint.h"
-#include "SkPorterDuff.h"
#include "SkView.h"
///////////////////////////////////////////////////////////////////////////////
@@ -36,13 +35,13 @@ protected:
bounds.offset(-bounds.fLeft, -bounds.fTop);
c.drawOval(bounds, paint);
- paint.setPorterDuffXfermode(SkPorterDuff::kDstIn_Mode);
+ paint.setXfermode(SkXfermode::kDstIn_Mode);
canvas->drawBitmap(mask, r.fLeft, r.fTop, &paint);
} else {
SkPath p;
p.addOval(r);
p.setFillType(SkPath::kInverseWinding_FillType);
- paint.setPorterDuffXfermode(SkPorterDuff::kDstOut_Mode);
+ paint.setXfermode(SkXfermode::kDstOut_Mode);
canvas->drawPath(p, paint);
}
}
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp
index e6867bbbb7..5a52d0efd6 100644
--- a/samplecode/SampleLayers.cpp
+++ b/samplecode/SampleLayers.cpp
@@ -17,7 +17,6 @@
#include "SkTypeface.h"
#include "SkUtils.h"
#include "SkKey.h"
-#include "SkPorterDuff.h"
#include "SkXfermode.h"
#include "SkDrawFilter.h"
@@ -27,7 +26,7 @@ static void make_paint(SkPaint* paint) {
SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kClamp_TileMode);
paint->setShader(s)->unref();
- paint->setXfermode(SkPorterDuff::CreateXfermode(SkPorterDuff::kDstIn_Mode))->unref();
+ paint->setXfermode(SkXfermode::kDstIn_Mode);
}
static void dump_layers(const char label[], SkCanvas* canvas) {
@@ -163,7 +162,7 @@ protected:
canvas->saveLayer(&r, &p);
canvas->drawColor(0xFFFF0000);
p.setAlpha(1); // or 0
- p.setPorterDuffXfermode(SkPorterDuff::kSrc_Mode);
+ p.setXfermode(SkXfermode::kSrc_Mode);
canvas->drawOval(r, p);
canvas->restore();
return;
@@ -240,7 +239,7 @@ protected:
canvas->drawOval(r, p);
p.setAlpha(0x80);
- p.setPorterDuffXfermode(SkPorterDuff::kDstIn_Mode);
+ p.setXfermode(SkXfermode::kDstIn_Mode);
canvas->drawRect(bounds, p);
canvas->restore();
diff --git a/samplecode/SamplePatch.cpp b/samplecode/SamplePatch.cpp
index 02b6f92733..4669630237 100644
--- a/samplecode/SamplePatch.cpp
+++ b/samplecode/SamplePatch.cpp
@@ -5,7 +5,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRandom.h"
#include "SkRegion.h"
#include "SkShader.h"
diff --git a/samplecode/SamplePath.cpp b/samplecode/SamplePath.cpp
index 98f1a5b7f9..b39e65c6f5 100644
--- a/samplecode/SamplePath.cpp
+++ b/samplecode/SamplePath.cpp
@@ -5,7 +5,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
diff --git a/samplecode/SamplePathClip.cpp b/samplecode/SamplePathClip.cpp
index c4be2b8965..ece64ae75d 100644
--- a/samplecode/SamplePathClip.cpp
+++ b/samplecode/SamplePathClip.cpp
@@ -5,7 +5,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
diff --git a/samplecode/SamplePathEffects.cpp b/samplecode/SamplePathEffects.cpp
index c974850e3f..1036db611a 100644
--- a/samplecode/SamplePathEffects.cpp
+++ b/samplecode/SamplePathEffects.cpp
@@ -75,7 +75,6 @@ static SkPathEffect* make_warp_pe()
///////////////////////////////////////////////////////////
#include "SkColorFilter.h"
-#include "SkPorterDuff.h"
#include "SkLayerRasterizer.h"
class testrast : public SkLayerRasterizer {
@@ -91,7 +90,7 @@ public:
this->addLayer(paint);
paint.setStrokeWidth(SK_Scalar1*1);
- paint.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ paint.setXfermode(SkXfermode::kClear_Mode);
this->addLayer(paint);
#else
paint.setAlpha(0x66);
diff --git a/samplecode/SampleShaders.cpp b/samplecode/SampleShaders.cpp
index 19f4930389..115f9f5bce 100644
--- a/samplecode/SampleShaders.cpp
+++ b/samplecode/SampleShaders.cpp
@@ -5,7 +5,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
@@ -31,7 +30,7 @@ static SkShader* make_bitmapfade(const SkBitmap& bm)
SkShader* shaderB = SkShader::CreateBitmapShader(bm,
SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
- SkXfermode* mode = SkPorterDuff::CreateXfermode(SkPorterDuff::kDstIn_Mode);
+ SkXfermode* mode = SkXfermode::Create(SkXfermode::kDstIn_Mode);
SkShader* shader = new SkComposeShader(shaderB, shaderA, mode);
shaderA->unref();
@@ -65,7 +64,7 @@ public:
colors[1] = SkColorSetARGB(0x80, 0, 0, 0);
SkShader* shaderB = SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kClamp_TileMode);
- SkXfermode* mode = SkPorterDuff::CreateXfermode(SkPorterDuff::kDstIn_Mode);
+ SkXfermode* mode = SkXfermode::Create(SkXfermode::kDstIn_Mode);
fShader = new SkComposeShader(shaderA, shaderB, mode);
shaderA->unref();
diff --git a/samplecode/SampleShapes.cpp b/samplecode/SampleShapes.cpp
index bee38840ef..8db960cb87 100644
--- a/samplecode/SampleShapes.cpp
+++ b/samplecode/SampleShapes.cpp
@@ -1,7 +1,6 @@
#include "SampleCode.h"
#include "SkCanvas.h"
#include "SkPaint.h"
-#include "SkPorterDuff.h"
#include "SkView.h"
#include "SkRectShape.h"
diff --git a/samplecode/SampleStrokeText.cpp b/samplecode/SampleStrokeText.cpp
index 2743897b8c..e144511d50 100644
--- a/samplecode/SampleStrokeText.cpp
+++ b/samplecode/SampleStrokeText.cpp
@@ -55,7 +55,7 @@ static void lettersToBitmap(SkBitmap* dst, const char chars[],
dst->eraseColor(SK_ColorWHITE);
{
SkCanvas canvas(*dst);
- paint.setPorterDuffXfermode(SkPorterDuff::kDstATop_Mode);
+ paint.setXfermode(SkXfermode::kDstATop_Mode);
canvas.drawBitmap(src, 0, 0, &paint);
paint.setColor(original.getColor());
paint.setStyle(SkPaint::kStroke_Style);
@@ -86,7 +86,7 @@ static void lettersToBitmap2(SkBitmap* dst, const char chars[],
SkPaint paint(original);
paint.setAntiAlias(true);
- paint.setPorterDuffXfermode(SkPorterDuff::kDstATop_Mode);
+ paint.setXfermode(SkXfermode::kDstATop_Mode);
paint.setColor(original.getColor());
paint.setStyle(SkPaint::kStroke_Style);
diff --git a/samplecode/SampleTests.cpp b/samplecode/SampleTests.cpp
index d0216725cf..c05189d0bb 100644
--- a/samplecode/SampleTests.cpp
+++ b/samplecode/SampleTests.cpp
@@ -18,7 +18,6 @@
#include "SkTypeface.h"
#include "SkUtils.h"
#include "SkKey.h"
-#include "SkPorterDuff.h"
#include "SkXfermode.h"
#include "SkDrawFilter.h"
diff --git a/samplecode/SampleTextAlpha.cpp b/samplecode/SampleTextAlpha.cpp
index 629056b3f3..b23af51b0d 100644
--- a/samplecode/SampleTextAlpha.cpp
+++ b/samplecode/SampleTextAlpha.cpp
@@ -6,7 +6,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRandom.h"
#include "SkRegion.h"
#include "SkShader.h"
diff --git a/samplecode/SampleTextEffects.cpp b/samplecode/SampleTextEffects.cpp
index cd18006d97..5f7be1d3b1 100644
--- a/samplecode/SampleTextEffects.cpp
+++ b/samplecode/SampleTextEffects.cpp
@@ -68,7 +68,7 @@ static void r0(SkLayerRasterizer* rast, SkPaint& p)
p.setAlpha(0x11);
p.setStyle(SkPaint::kFill_Style);
- p.setPorterDuffXfermode(SkPorterDuff::kSrc_Mode);
+ p.setXfermode(SkXfermode::kSrc_Mode);
rast->addLayer(p);
}
@@ -77,7 +77,7 @@ static void r1(SkLayerRasterizer* rast, SkPaint& p)
rast->addLayer(p);
p.setAlpha(0x40);
- p.setPorterDuffXfermode(SkPorterDuff::kSrc_Mode);
+ p.setXfermode(SkXfermode::kSrc_Mode);
p.setStyle(SkPaint::kStroke_Style);
p.setStrokeWidth(SK_Scalar1*2);
rast->addLayer(p);
@@ -91,7 +91,7 @@ static void r2(SkLayerRasterizer* rast, SkPaint& p)
p.setStyle(SkPaint::kStroke_Style);
p.setStrokeWidth(SK_Scalar1*3/2);
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p);
}
@@ -103,7 +103,7 @@ static void r3(SkLayerRasterizer* rast, SkPaint& p)
p.setAlpha(0x20);
p.setStyle(SkPaint::kFill_Style);
- p.setPorterDuffXfermode(SkPorterDuff::kSrc_Mode);
+ p.setXfermode(SkXfermode::kSrc_Mode);
rast->addLayer(p);
}
@@ -113,7 +113,7 @@ static void r4(SkLayerRasterizer* rast, SkPaint& p)
rast->addLayer(p, SkIntToScalar(3), SkIntToScalar(3));
p.setAlpha(0xFF);
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p, SK_Scalar1*3/2, SK_Scalar1*3/2);
p.setXfermode(NULL);
@@ -127,7 +127,7 @@ static void r5(SkLayerRasterizer* rast, SkPaint& p)
rast->addLayer(p);
p.setPathEffect(new SkDiscretePathEffect(SK_Scalar1*4, SK_Scalar1*3))->unref();
- p.setPorterDuffXfermode(SkPorterDuff::kSrcOut_Mode);
+ p.setXfermode(SkXfermode::kSrcOut_Mode);
rast->addLayer(p);
}
@@ -139,7 +139,7 @@ static void r6(SkLayerRasterizer* rast, SkPaint& p)
SkLayerRasterizer* rast2 = new SkLayerRasterizer;
r5(rast2, p);
p.setRasterizer(rast2)->unref();
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p);
}
@@ -196,7 +196,7 @@ static void r8(SkLayerRasterizer* rast, SkPaint& p)
lattice.setScale(SK_Scalar1*6, SK_Scalar1*6, 0, 0);
lattice.postSkew(SK_Scalar1/3, 0, 0, 0);
p.setPathEffect(new Dot2DPathEffect(SK_Scalar1*2, lattice))->unref();
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p);
p.setPathEffect(NULL);
@@ -269,7 +269,7 @@ static void r9(SkLayerRasterizer* rast, SkPaint& p)
lattice.setScale(SK_Scalar1, SK_Scalar1*6, 0, 0);
lattice.postRotate(SkIntToScalar(30), 0, 0);
p.setPathEffect(new Line2DPathEffect(SK_Scalar1*2, lattice))->unref();
- p.setPorterDuffXfermode(SkPorterDuff::kClear_Mode);
+ p.setXfermode(SkXfermode::kClear_Mode);
rast->addLayer(p);
p.setPathEffect(NULL);
diff --git a/samplecode/SampleVertices.cpp b/samplecode/SampleVertices.cpp
index 84f1e1254f..96c9849e3f 100644
--- a/samplecode/SampleVertices.cpp
+++ b/samplecode/SampleVertices.cpp
@@ -5,7 +5,6 @@
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkPath.h"
-#include "SkPorterDuff.h"
#include "SkRandom.h"
#include "SkRegion.h"
#include "SkShader.h"