diff options
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/analysis_canvas_unittest.cc | 3 | ||||
-rw-r--r-- | skia/ext/pixel_ref_utils_unittest.cc | 34 |
2 files changed, 13 insertions, 24 deletions
diff --git a/skia/ext/analysis_canvas_unittest.cc b/skia/ext/analysis_canvas_unittest.cc index 5436b81..bac22b1 100644 --- a/skia/ext/analysis_canvas_unittest.cc +++ b/skia/ext/analysis_canvas_unittest.cc @@ -345,8 +345,7 @@ TEST(AnalysisCanvasTest, EarlyOutNotSolid) { record_canvas->drawText( text.c_str(), text.length(), point.fX, point.fY, paint); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(recorder.endRecordingAsPicture()); + sk_sp<SkPicture> picture = recorder.finishRecordingAsPicture(); // Draw the picture into the analysis canvas, using the canvas as a callback // as well. diff --git a/skia/ext/pixel_ref_utils_unittest.cc b/skia/ext/pixel_ref_utils_unittest.cc index 7af706b..dc28cfe 100644 --- a/skia/ext/pixel_ref_utils_unittest.cc +++ b/skia/ext/pixel_ref_utils_unittest.cc @@ -58,9 +58,9 @@ SkCanvas* StartRecording(SkPictureRecorder* recorder, gfx::Rect layer_rect) { return canvas; } -SkPicture* StopRecording(SkPictureRecorder* recorder, SkCanvas* canvas) { +sk_sp<SkPicture> StopRecording(SkPictureRecorder* recorder, SkCanvas* canvas) { canvas->restore(); - return recorder->endRecordingAsPicture(); + return recorder->finishRecordingAsPicture(); } } // namespace @@ -104,8 +104,7 @@ TEST(PixelRefUtilsTest, DrawPaint) { canvas->clipRect(SkRect::MakeWH(100, 100)); canvas->drawPaint(third_paint); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); @@ -164,8 +163,7 @@ TEST(PixelRefUtilsTest, DrawPoints) { // (50, 55, 150, 145). canvas->drawPoints(SkCanvas::kPolygon_PointMode, 3, points, third_paint); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); @@ -216,8 +214,7 @@ TEST(PixelRefUtilsTest, DrawRect) { // (20, 20, 100, 100) canvas->drawRect(SkRect::MakeXYWH(0, 0, 100, 100), third_paint); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); @@ -273,8 +270,7 @@ TEST(PixelRefUtilsTest, DrawRRect) { // (20, 20, 100, 100) canvas->drawRRect(rrect, third_paint); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); @@ -329,8 +325,7 @@ TEST(PixelRefUtilsTest, DrawOval) { // (20, 20, 100, 100). canvas->drawRect(SkRect::MakeXYWH(0, 0, 100, 100), third_paint); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); @@ -379,8 +374,7 @@ TEST(PixelRefUtilsTest, DrawPath) { canvas->restore(); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); @@ -422,8 +416,7 @@ TEST(PixelRefUtilsTest, DrawText) { canvas->drawPosText("text", 4, points, first_paint); canvas->drawTextOnPath("text", 4, path, NULL, first_paint); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); @@ -494,8 +487,7 @@ TEST(PixelRefUtilsTest, DrawVertices) { 3, third_paint); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); @@ -563,8 +555,7 @@ TEST(PixelRefUtilsTest, DrawImage) { canvas->restore(); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); @@ -627,8 +618,7 @@ TEST(PixelRefUtilsTest, DrawImageRect) { canvas->restore(); - skia::RefPtr<SkPicture> picture = - skia::AdoptRef(StopRecording(&recorder, canvas)); + sk_sp<SkPicture> picture = StopRecording(&recorder, canvas); std::vector<skia::PixelRefUtils::PositionPixelRef> pixel_refs; skia::PixelRefUtils::GatherDiscardablePixelRefs(picture.get(), &pixel_refs); |