Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 638af13b7b5c00f03e34a283b04aa5a3ef1d82c2..31e15741910bcf382a298d97148e9ff449b9b910 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -21,8 +21,6 @@ |
#include "SkImageGenerator.h" |
#include "SkImageGeneratorCG.h" |
#include "SkImageGeneratorWIC.h" |
-#include "SkLiteDL.h" |
-#include "SkLiteRecorder.h" |
#include "SkMallocPixelRef.h" |
#include "SkMultiPictureDraw.h" |
#include "SkNullCanvas.h" |
@@ -1615,18 +1613,15 @@ Error ViaSingletonPictures::draw( |
Error ViaLite::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkString* log) const { |
auto size = src.size(); |
- SkRect bounds = {0,0, (SkScalar)size.width(), (SkScalar)size.height()}; |
return draw_to_canvas(fSink, bitmap, stream, log, size, [&](SkCanvas* canvas) -> Error { |
- sk_sp<SkLiteDL> dl = SkLiteDL::New(bounds); |
- |
- SkLiteRecorder rec; |
- rec.reset(dl.get()); |
- |
- Error err = src.draw(&rec); |
+ SkPictureRecorder_Lite recorder; |
+ Error err = src.draw(recorder.beginRecording(SkIntToScalar(size.width()), |
+ SkIntToScalar(size.height()))); |
if (!err.isEmpty()) { |
return err; |
} |
- dl->draw(canvas); |
+ sk_sp<SkDrawable> dl = recorder.finishRecordingAsDrawable(); |
+ canvas->drawDrawable(dl.get()); |
return check_against_reference(bitmap, src, fSink); |
}); |
} |