aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMPipeTask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dm/DMPipeTask.cpp')
-rw-r--r--dm/DMPipeTask.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/dm/DMPipeTask.cpp b/dm/DMPipeTask.cpp
index 513594e0ea..13636d67d6 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)