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

Side by Side Diff: dm/DMRecordTask.h

Issue 270543004: DM: Add --skps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: reed 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 unified diff | Download patch
« no previous file with comments | « dm/DMPipeTask.cpp ('k') | dm/DMRecordTask.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef DMRecordTask_DEFINED 1 #ifndef DMRecordTask_DEFINED
2 #define DMRecordTask_DEFINED 2 #define DMRecordTask_DEFINED
3 3
4 #include "DMTask.h" 4 #include "DMTask.h"
5 #include "SkBitmap.h" 5 #include "SkBitmap.h"
6 #include "SkPicture.h"
6 #include "SkString.h" 7 #include "SkString.h"
7 #include "SkTemplates.h" 8 #include "SkTemplates.h"
8 #include "gm.h" 9 #include "gm.h"
9 10
10 // Records a GM through an SkRecord, draws it, and compares against the referenc e bitmap. 11 // Records a GM or SKP through an SkRecord, draws it, and compares against the r eference bitmap.
11 12
12 namespace DM { 13 namespace DM {
13 14
14 class RecordTask : public CpuTask { 15 class RecordTask : public CpuTask {
15 16
16 public: 17 public:
17 RecordTask(const Task& parent, skiagm::GM*, SkBitmap reference, bool optimiz e); 18 enum Mode {
19 kNoOptimize_Mode,
20 kOptimize_Mode,
21 };
22 RecordTask(const Task& parent, skiagm::GM*, SkBitmap reference, Mode);
23 RecordTask(const Task& parent, SkPicture*, SkBitmap reference, Mode);
18 24
19 virtual void draw() SK_OVERRIDE; 25 virtual void draw() SK_OVERRIDE;
20 virtual bool shouldSkip() const SK_OVERRIDE; 26 virtual bool shouldSkip() const SK_OVERRIDE;
21 virtual SkString name() const SK_OVERRIDE { return fName; } 27 virtual SkString name() const SK_OVERRIDE { return fName; }
22 28
23 private: 29 private:
30 bool fOptimize;
24 const SkString fName; 31 const SkString fName;
32 SkAutoTUnref<SkPicture> fPicture;
25 SkAutoTDelete<skiagm::GM> fGM; 33 SkAutoTDelete<skiagm::GM> fGM;
26 const SkBitmap fReference; 34 const SkBitmap fReference;
27 bool fOptimize;
28 }; 35 };
29 36
30 } // namespace DM 37 } // namespace DM
31 38
32 #endif // DMRecordTask_DEFINED 39 #endif // DMRecordTask_DEFINED
OLDNEW
« no previous file with comments | « dm/DMPipeTask.cpp ('k') | dm/DMRecordTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698