aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-14 20:33:05 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-14 20:33:05 +0000
commitb17a24fedbec365827b92eb3b4021fd251ba9cb1 (patch)
tree3328eaea76d77932bb36da33cc811c834bf3526e /dm
parent06aca01c23344a6ed3640c59f425f2459b86ef85 (diff)
SkRecord: turn on cull annotation pass in public API.
Also, switch Skia internal tools over to use the public headers where possible. Where it's not, the tools -Isrc/record explicitly now, and if it's not obvious, note why they don't use SkRecording.h. BUG=skia:2378 R=reed@google.com, mtklein@google.com, fmalita@chromium.org Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/231853006 git-svn-id: http://skia.googlecode.com/svn/trunk@14191 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'dm')
-rw-r--r--dm/DMRecordTask.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/dm/DMRecordTask.cpp b/dm/DMRecordTask.cpp
index fb0e4e6898..95a8bbd217 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();