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

Side by Side Diff: dm/DMSKPTask.cpp

Issue 377373003: Merge Replay and Quilt tasks, adding in all BBH implementations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « dm/DMReplayTask.cpp ('k') | gm/gm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "DMSKPTask.h" 1 #include "DMSKPTask.h"
2 #include "DMUtil.h" 2 #include "DMUtil.h"
3 #include "DMWriteTask.h" 3 #include "DMWriteTask.h"
4 4
5 #include "SkCommandLineFlags.h" 5 #include "SkCommandLineFlags.h"
6 #include "SkPictureRecorder.h" 6 #include "SkPictureRecorder.h"
7 7
8 DECLARE_bool(skr); // in DMReplayTask.cpp 8 DEFINE_bool(skr, true, "Test that SKPs draw the same when re-recorded with SkRec ord backend.");
9 9
10 namespace DM { 10 namespace DM {
11 11
12 // Test that an SkPicture plays back the same when re-recorded into an 12 // Test that an SkPicture plays back the same when re-recorded into an
13 // SkPicture backed by SkRecord. 13 // SkPicture backed by SkRecord.
14 class SkrComparisonTask : public CpuTask { 14 class SkrComparisonTask : public CpuTask {
15 public: 15 public:
16 SkrComparisonTask(const Task& parent, const SkPicture* picture, SkBitmap ref erence) 16 SkrComparisonTask(const Task& parent, const SkPicture* picture, SkBitmap ref erence)
17 : CpuTask(parent) 17 : CpuTask(parent)
18 , fPicture(picture) 18 , fPicture(picture)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void SKPTask::draw() { 50 void SKPTask::draw() {
51 SkBitmap bitmap; 51 SkBitmap bitmap;
52 AllocatePixels(kN32_SkColorType, fPicture->width(), fPicture->height(), &bit map); 52 AllocatePixels(kN32_SkColorType, fPicture->width(), fPicture->height(), &bit map);
53 DrawPicture(*fPicture, &bitmap); 53 DrawPicture(*fPicture, &bitmap);
54 54
55 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap))); 55 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap)));
56 this->spawnChild(SkNEW_ARGS(SkrComparisonTask, (*this, fPicture.get(), bitma p))); 56 this->spawnChild(SkNEW_ARGS(SkrComparisonTask, (*this, fPicture.get(), bitma p)));
57 } 57 }
58 58
59 } // namespace DM 59 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMReplayTask.cpp ('k') | gm/gm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698