diff --git a/gfx/layers/composite/PaintCounter.cpp b/gfx/layers/composite/PaintCounter.cpp index 56e57aab45a3..a8f619fed9c3 100644 --- a/gfx/layers/composite/PaintCounter.cpp +++ b/gfx/layers/composite/PaintCounter.cpp @@ -29,9 +29,9 @@ PaintCounter::PaintCounter() mSurface = Factory::CreateDataSourceSurface(mRect.Size(), mFormat); mStride = mSurface->Stride(); - mCanvas.reset( - SkCanvas::NewRasterDirect(MakeSkiaImageInfo(mRect.Size(), mFormat), - mSurface->GetData(), mStride)); + mCanvas = + SkCanvas::MakeRasterDirect(MakeSkiaImageInfo(mRect.Size(), mFormat), + mSurface->GetData(), mStride); mCanvas->clear(SK_ColorWHITE); } diff --git a/gfx/layers/composite/PaintCounter.h b/gfx/layers/composite/PaintCounter.h index b5296939fc2f..c4429d409de4 100644 --- a/gfx/layers/composite/PaintCounter.h +++ b/gfx/layers/composite/PaintCounter.h @@ -33,7 +33,7 @@ private: virtual ~PaintCounter(); SurfaceFormat mFormat; - sk_sp mCanvas; + std::unique_ptr mCanvas; IntSize mSize; int mStride;