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

Unified Diff: dm/DMPipeTask.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/DMPipeTask.h ('k') | dm/DMRecordTask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMPipeTask.cpp
diff --git a/dm/DMPipeTask.cpp b/dm/DMPipeTask.cpp
index 513594e0ead1a25670357003579e1db27091a679..13636d67d679f9f708a85175c66dfe9b3d83f0a5 100644
--- a/dm/DMPipeTask.cpp
+++ b/dm/DMPipeTask.cpp
@@ -10,14 +10,13 @@ DEFINE_bool(pipe, true, "If true, check several pipe variants against the refere
namespace DM {
-static uint32_t get_flags(bool crossProcess, bool sharedAddressSpace) {
- SkASSERT(!(!crossProcess && sharedAddressSpace));
+static uint32_t get_flags(PipeTask::Mode mode) {
uint32_t flags = 0;
- if (crossProcess) {
+ if (mode != PipeTask::kInProcess_Mode) {
flags |= SkGPipeWriter::kCrossProcess_Flag;
- if (sharedAddressSpace) {
- flags |= SkGPipeWriter::kSharedAddressSpace_Flag;
- }
+ }
+ if (mode == PipeTask::kSharedAddress_Mode) {
+ flags |= SkGPipeWriter::kSharedAddressSpace_Flag;
}
return flags;
}
@@ -25,7 +24,7 @@ static uint32_t get_flags(bool crossProcess, bool sharedAddressSpace) {
static const char* get_name(const uint32_t flags) {
if (flags & SkGPipeWriter::kCrossProcess_Flag &&
flags & SkGPipeWriter::kSharedAddressSpace_Flag) {
- return "cross_process_shared_address_space_pipe";
+ return "shared_address_space_pipe";
} else if (flags & SkGPipeWriter::kCrossProcess_Flag) {
return "cross_process_pipe";
} else {
@@ -36,10 +35,9 @@ static const char* get_name(const uint32_t flags) {
PipeTask::PipeTask(const Task& parent,
skiagm::GM* gm,
SkBitmap reference,
- bool crossProcess,
- bool sharedAddressSpace)
+ Mode mode)
: CpuTask(parent)
- , fFlags(get_flags(crossProcess, sharedAddressSpace))
+ , fFlags(get_flags(mode))
, fName(UnderJoin(parent.name().c_str(), get_name(fFlags)))
, fGM(gm)
, fReference(reference)
« no previous file with comments | « dm/DMPipeTask.h ('k') | dm/DMRecordTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698