aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-11-18 19:01:12 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-18 19:01:12 -0800
commitf045d600fc5c17f8a3537401baf45043e7617368 (patch)
treee575898435e9d6e5cd1becb8ecd5c8a7f448be6e /tools
parent9b341146d92b53d8f1b357924eab097a2e1eabca (diff)
Make block size a template parameter of SkTLList
Diffstat (limited to 'tools')
-rw-r--r--tools/skpdiff/SkDiffContext.cpp6
-rw-r--r--tools/skpdiff/SkDiffContext.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/tools/skpdiff/SkDiffContext.cpp b/tools/skpdiff/SkDiffContext.cpp
index e76237a86a..33904bfc93 100644
--- a/tools/skpdiff/SkDiffContext.cpp
+++ b/tools/skpdiff/SkDiffContext.cpp
@@ -261,7 +261,7 @@ void SkDiffContext::diffPatterns(const char baselinePattern[], const char testPa
}
void SkDiffContext::outputRecords(SkWStream& stream, bool useJSONP) {
- SkTLList<DiffRecord>::Iter iter(fRecords, SkTLList<DiffRecord>::Iter::kHead_IterStart);
+ RecordList::Iter iter(fRecords, RecordList::Iter::kHead_IterStart);
DiffRecord* currentRecord = iter.get();
if (useJSONP) {
@@ -373,7 +373,7 @@ void SkDiffContext::outputCsv(SkWStream& stream) {
stream.writeText("key");
- SkTLList<DiffRecord>::Iter iter(fRecords, SkTLList<DiffRecord>::Iter::kHead_IterStart);
+ RecordList::Iter iter(fRecords, RecordList::Iter::kHead_IterStart);
DiffRecord* currentRecord = iter.get();
// Write CSV header and create a dictionary of all columns.
@@ -394,7 +394,7 @@ void SkDiffContext::outputCsv(SkWStream& stream) {
double values[100];
SkASSERT(cntColumns < 100); // Make the array larger, if we ever have so many diff types.
- SkTLList<DiffRecord>::Iter iter2(fRecords, SkTLList<DiffRecord>::Iter::kHead_IterStart);
+ RecordList::Iter iter2(fRecords, RecordList::Iter::kHead_IterStart);
currentRecord = iter2.get();
while (currentRecord) {
for (int i = 0; i < cntColumns; i++) {
diff --git a/tools/skpdiff/SkDiffContext.h b/tools/skpdiff/SkDiffContext.h
index 4a878b872d..863eadedfb 100644
--- a/tools/skpdiff/SkDiffContext.h
+++ b/tools/skpdiff/SkDiffContext.h
@@ -188,7 +188,8 @@ private:
// We use linked list for the records so that their pointers remain stable. A resizable array
// might change its pointers, which would make it harder for async diffs to record their
// results.
- SkTLList<DiffRecord> fRecords;
+ typedef SkTLList<DiffRecord, 1> RecordList;
+ RecordList fRecords;
SkImageDiffer** fDiffers;
int fDifferCount;