Index: dm/DMRecordTask.cpp |
diff --git a/dm/DMRecordTask.cpp b/dm/DMRecordTask.cpp |
index fb0e4e6898570fab2710773535f15f66290db998..95a8bbd217cc781c7357660a703a1043164e92d4 100644 |
--- a/dm/DMRecordTask.cpp |
+++ b/dm/DMRecordTask.cpp |
@@ -2,8 +2,7 @@ |
#include "DMUtil.h" |
#include "DMWriteTask.h" |
#include "SkCommandLineFlags.h" |
-#include "SkRecordDraw.h" |
-#include "SkRecorder.h" |
+#include "SkRecording.h" |
DEFINE_bool(skr, false, "If true, run SKR tests."); |
@@ -17,19 +16,19 @@ RecordTask::RecordTask(const Task& parent, skiagm::GM* gm, SkBitmap reference) |
{} |
void RecordTask::draw() { |
+ using EXPERIMENTAL::SkRecording; |
+ using EXPERIMENTAL::SkPlayback; |
+ |
// Record the GM into an SkRecord. |
- SkRecord record; |
- SkRecorder canvas(SkRecorder::kWriteOnly_Mode, &record, |
- fReference.width(), fReference.height()); |
- canvas.concat(fGM->getInitialTransform()); |
- fGM->draw(&canvas); |
+ SkRecording* recording = SkRecording::Create(fReference.width(), fReference.height()); |
+ fGM->draw(recording->canvas()); |
+ SkAutoTDelete<const SkPlayback> playback(SkRecording::Delete(recording)); |
// Draw the SkRecord back into a bitmap. |
SkBitmap bitmap; |
SetupBitmap(fReference.colorType(), fGM.get(), &bitmap); |
SkCanvas target(bitmap); |
- |
- SkRecordDraw(record, &target); |
+ playback->draw(&target); |
if (!BitmapsEqual(bitmap, fReference)) { |
this->fail(); |