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

Side by Side Diff: dm/DMSerializeTask.cpp

Issue 492023002: Install a hook to swap between SkPicture backends with a single define. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment Created 6 years, 4 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/DMSKPTask.cpp ('k') | dm/DMUtil.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 #include "DMSerializeTask.h" 1 #include "DMSerializeTask.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 "SkPicture.h" 6 #include "SkPicture.h"
7 #include "SkPixelRef.h" 7 #include "SkPixelRef.h"
8 8
9 DEFINE_bool(serialize, true, "If true, run picture serialization tests."); 9 DEFINE_bool(serialize, true, "If true, run picture serialization tests via S kPictureData.");
10 DECLARE_bool(skr); // in DMReplayTask.cpp 10 DEFINE_bool(serialize_skr, true, "If true, run picture serialization tests via S kRecord.");
11 11
12 static const char* kSuffixes[] = { "serialize", "serialize_skr" }; 12 static const char* kSuffixes[] = { "serialize", "serialize_skr" };
13 static const bool* kEnabled[] = { &FLAGS_serialize, &FLAGS_skr }; 13 static const bool* kEnabled[] = { &FLAGS_serialize, &FLAGS_serialize_skr };
14 14
15 namespace DM { 15 namespace DM {
16 16
17 SerializeTask::SerializeTask(const Task& parent, 17 SerializeTask::SerializeTask(const Task& parent,
18 skiagm::GM* gm, 18 skiagm::GM* gm,
19 SkBitmap reference, 19 SkBitmap reference,
20 SerializeTask::Mode mode) 20 SerializeTask::Mode mode)
21 : CpuTask(parent) 21 : CpuTask(parent)
22 , fMode(mode) 22 , fMode(mode)
23 , fName(UnderJoin(parent.name().c_str(), kSuffixes[mode])) 23 , fName(UnderJoin(parent.name().c_str(), kSuffixes[mode]))
(...skipping 20 matching lines...) Expand all
44 } 44 }
45 45
46 bool SerializeTask::shouldSkip() const { 46 bool SerializeTask::shouldSkip() const {
47 if (fGM->getFlags() & skiagm::GM::kSkipPicture_Flag) { 47 if (fGM->getFlags() & skiagm::GM::kSkipPicture_Flag) {
48 return true; 48 return true;
49 } 49 }
50 return !*kEnabled[fMode]; 50 return !*kEnabled[fMode];
51 } 51 }
52 52
53 } // namespace DM 53 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMSKPTask.cpp ('k') | dm/DMUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698