OLD | NEW |
---|---|
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 RecordTask(const Task& parent, skiagm::GM*, SkBitmap reference, bool optimiz e); |
reed1
2014/05/14 12:40:11
nit: why isn't this parameter const SkBitmap& ?
mtklein
2014/05/14 17:47:18
It could be, but we've got to make the copy either
| |
19 RecordTask(const Task& parent, SkPicture*, SkBitmap reference, bool optimiz e); | |
18 | 20 |
19 virtual void draw() SK_OVERRIDE; | 21 virtual void draw() SK_OVERRIDE; |
20 virtual bool shouldSkip() const SK_OVERRIDE; | 22 virtual bool shouldSkip() const SK_OVERRIDE; |
21 virtual SkString name() const SK_OVERRIDE { return fName; } | 23 virtual SkString name() const SK_OVERRIDE { return fName; } |
22 | 24 |
23 private: | 25 private: |
24 const SkString fName; | 26 const SkString fName; |
27 SkAutoTUnref<SkPicture> fPicture; | |
25 SkAutoTDelete<skiagm::GM> fGM; | 28 SkAutoTDelete<skiagm::GM> fGM; |
26 const SkBitmap fReference; | 29 const SkBitmap fReference; |
27 bool fOptimize; | 30 bool fOptimize; |
28 }; | 31 }; |
29 | 32 |
30 } // namespace DM | 33 } // namespace DM |
31 | 34 |
32 #endif // DMRecordTask_DEFINED | 35 #endif // DMRecordTask_DEFINED |
OLD | NEW |