Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Unified Diff: dm/DMSKPTask.cpp

Issue 270543004: DM: Add --skps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix and verbatim Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dm/DMSKPTask.cpp
diff --git a/dm/DMSKPTask.cpp b/dm/DMSKPTask.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2ce67b80a236d5b2c8aed816c240c9ee93689b9d
--- /dev/null
+++ b/dm/DMSKPTask.cpp
@@ -0,0 +1,21 @@
+#include "DMRecordTask.h"
+#include "DMSKPTask.h"
+#include "DMUtil.h"
+#include "DMWriteTask.h"
+
+namespace DM {
+
+SKPTask::SKPTask(Reporter* r, TaskRunner* tr, SkPicture* pic, SkString name)
+ : CpuTask(r, tr), fPicture(SkRef(pic)), fName(name) {}
+
+void SKPTask::draw() {
+ SkBitmap bitmap;
+ SetupBitmap(kN32_SkColorType, *fPicture, &bitmap);
+ DrawPicture(fPicture, &bitmap);
+
+ this->spawnChild(SkNEW_ARGS(RecordTask, (*this, fPicture, bitmap, false)));
+ this->spawnChild(SkNEW_ARGS(RecordTask, (*this, fPicture, bitmap, true)));
+ this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap, true)));
+}
+
+} // namespace DM

Powered by Google App Engine
This is Rietveld 408576698