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

Side by Side Diff: dm/DMRecordTask.h

Issue 345553003: Support serialization in SkRecord-backed SkPictures. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: robert Created 6 years, 6 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/DMCpuGMTask.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
(Empty)
1 #ifndef DMRecordTask_DEFINED
2 #define DMRecordTask_DEFINED
3
4 #include "DMTask.h"
5 #include "SkBitmap.h"
6 #include "SkPicture.h"
7 #include "SkString.h"
8 #include "SkTemplates.h"
9 #include "gm.h"
10
11 // Records a GM or SKP through an SkRecord, draws it, and compares against the r eference bitmap.
12
13 namespace DM {
14
15 class RecordTask : public CpuTask {
16
17 public:
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);
24
25 virtual void draw() SK_OVERRIDE;
26 virtual bool shouldSkip() const SK_OVERRIDE;
27 virtual SkString name() const SK_OVERRIDE { return fName; }
28
29 private:
30 bool fOptimize;
31 const SkString fName;
32 SkAutoTUnref<SkPicture> fPicture;
33 SkAutoTDelete<skiagm::GM> fGM;
34 const SkBitmap fReference;
35 };
36
37 } // namespace DM
38
39 #endif // DMRecordTask_DEFINED
OLDNEW
« no previous file with comments | « dm/DMCpuGMTask.cpp ('k') | dm/DMRecordTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698