| Index: experimental/skpdiff/SkPMetric.h
|
| diff --git a/experimental/skpdiff/SkPMetric.h b/experimental/skpdiff/SkPMetric.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fb32db5568c2aaded363296c6fd81243380ba187
|
| --- /dev/null
|
| +++ b/experimental/skpdiff/SkPMetric.h
|
| @@ -0,0 +1,37 @@
|
| +/*
|
| + * Copyright 2013 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#ifndef SkPMetric_DEFINED
|
| +#define SkPMetric_DEFINED
|
| +
|
| +#include "SkTDArray.h"
|
| +
|
| +#include "SkImageDiffer.h"
|
| +
|
| +/**
|
| + * An image differ that uses the pdiff image metric to compare images.
|
| + */
|
| +class SkPMetric : public SkImageDiffer {
|
| +public:
|
| + virtual const char* getName() SK_OVERRIDE;
|
| + virtual int queueDiff(SkBitmap* baseline, SkBitmap* test) SK_OVERRIDE;
|
| + virtual bool isFinished(int id) SK_OVERRIDE;
|
| + virtual double getResult(int id) SK_OVERRIDE;
|
| +
|
| +private:
|
| + struct QueuedDiff {
|
| + bool finished;
|
| + double result;
|
| + };
|
| +
|
| + SkTDArray<QueuedDiff> fQueuedDiffs;
|
| +
|
| + typedef SkImageDiffer INHERITED;
|
| +};
|
| +
|
| +
|
| +#endif
|
|
|