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

Unified Diff: dm/DM.cpp

Issue 1681553003: Optionally run RAW images serially (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | dm/DMSrcSink.h » ('j') | dm/DMSrcSink.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]));
mtklein 2016/02/08 21:26:54 This reads weirdly asymmetric now. Let's really r
+ } else {
+ // Use the enclave of the Src.
+ enclaves[srcEnclave].push_back(Task(gSrcs[i], gSinks[j]));
+ }
}
}
« no previous file with comments | « no previous file | dm/DMSrcSink.h » ('j') | dm/DMSrcSink.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698