Chromium Code Reviews| Index: dm/DM.cpp |
| diff --git a/dm/DM.cpp b/dm/DM.cpp |
| index 456c6abf6f0cee33744ee72ddd536bee60815fd3..f485c712330d7a050342ce0ba68d84eaf61ac2b0 100644 |
| --- a/dm/DM.cpp |
| +++ b/dm/DM.cpp |
| @@ -583,12 +583,7 @@ static bool gather_srcs() { |
| for (auto image : images) { |
| push_codec_srcs(image); |
| - const char* ext = ""; |
| - int index = image.findLastOf('.'); |
| - if (index >= 0 && (size_t) ++index < image.size()) { |
| - ext = &image.c_str()[index]; |
| - } |
| - if (brd_supported(ext)) { |
| + if (brd_supported(SkStringExtension(image))) { |
| push_brd_srcs(image); |
| } |
| } |
| @@ -1159,7 +1154,14 @@ int dm_main() { |
| for (int j = 0; j < gSinks.count(); j++) { |
| SkTArray<Task>& tasks = enclaves[gSinks[j]->enclave()]; |
| for (int i = 0; i < gSrcs.count(); i++) { |
| - tasks.push_back(Task(gSrcs[i], gSinks[j])); |
| + const int srcEnclave = gSrcs[i]->enclave(); |
| + if (srcEnclave == kAnyThread_Enclave) { |
| + // Use the enclave of the Sink. |
| + tasks.push_back(Task(gSrcs[i], gSinks[j])); |
| + } else { |
| + // Use the enclave of the Src. |
|
scroggo
2016/02/08 20:08:12
Actually, this is problematic. We'll end up runnin
msarett
2016/02/08 20:16:19
This seems reasonable to me, but I'm not sure I un
scroggo
2016/02/08 21:09:30
We went a different direction (Mike submitted crre
|
| + enclaves[srcEnclave].push_back(Task(gSrcs[i], gSinks[j])); |
| + } |
| } |
| } |