Index: samplecode/SampleFatBits.cpp |
diff --git a/samplecode/SampleFatBits.cpp b/samplecode/SampleFatBits.cpp |
index 4b15e370e496ed092e43f01cedcadc76fed3c8ad..dd588816a06e74168cb6cd49a7102fbf272644a2 100644 |
--- a/samplecode/SampleFatBits.cpp |
+++ b/samplecode/SampleFatBits.cpp |
@@ -91,9 +91,9 @@ public: |
fShader = sk_tool_utils::create_checkerboard_shader(0xFFCCCCCC, 0xFFFFFFFF, zoom); |
SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); |
- fMinSurface.reset(SkSurface::NewRaster(info)); |
+ fMinSurface = SkSurface::MakeRaster(info); |
info = info.makeWH(width * zoom, height * zoom); |
- fMaxSurface.reset(SkSurface::NewRaster(info)); |
+ fMaxSurface = SkSurface::MakeRaster(info); |
} |
void drawBG(SkCanvas*); |
@@ -111,8 +111,8 @@ private: |
SkMatrix fMatrix, fInverse; |
SkRect fBounds, fClipRect; |
sk_sp<SkShader> fShader; |
- SkAutoTUnref<SkSurface> fMinSurface; |
- SkAutoTUnref<SkSurface> fMaxSurface; |
+ sk_sp<SkSurface> fMinSurface; |
+ sk_sp<SkSurface> fMaxSurface; |
void setupPaint(SkPaint* paint) { |
bool aa = this->getAA(); |
@@ -162,7 +162,7 @@ private: |
} |
void copyMinToMax() { |
- erase(fMaxSurface); |
+ erase(fMaxSurface.get()); |
SkCanvas* canvas = fMaxSurface->getCanvas(); |
canvas->save(); |
canvas->concat(fMatrix); |
@@ -275,7 +275,7 @@ void FatBits::drawLine(SkCanvas* canvas, SkPoint pts[]) { |
apply_grid(pts, 2); |
} |
- erase(fMinSurface); |
+ erase(fMinSurface.get()); |
this->setupPaint(&paint); |
paint.setColor(FAT_PIXEL_COLOR); |
if (fUseClip) { |
@@ -310,7 +310,7 @@ void FatBits::drawRect(SkCanvas* canvas, SkPoint pts[2]) { |
SkRect r; |
r.set(pts, 2); |
- erase(fMinSurface); |
+ erase(fMinSurface.get()); |
this->setupPaint(&paint); |
paint.setColor(FAT_PIXEL_COLOR); |
{ |
@@ -356,7 +356,7 @@ void FatBits::drawTriangle(SkCanvas* canvas, SkPoint pts[3]) { |
path.lineTo(pts[2]); |
path.close(); |
- erase(fMinSurface); |
+ erase(fMinSurface.get()); |
this->setupPaint(&paint); |
paint.setColor(FAT_PIXEL_COLOR); |
fMinSurface->getCanvas()->drawPath(path, paint); |