blob: b60858a6597c3ce7663b0398aa0bb5a1adb98844 [file] [log] [blame]
zachr@google.comc0a75a82013-06-28 15:34:56 +00001/*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkPMetric_DEFINED
9#define SkPMetric_DEFINED
10
zachr@google.com572b54d2013-06-28 16:27:33 +000011#include "SkTArray.h"
zachr@google.comc0a75a82013-06-28 15:34:56 +000012#include "SkTDArray.h"
13
14#include "SkImageDiffer.h"
15
16/**
17 * An image differ that uses the pdiff image metric to compare images.
18 */
19class SkPMetric : public SkImageDiffer {
20public:
djsollen@google.comefc51b72013-11-12 18:29:17 +000021 virtual const char* getName() const SK_OVERRIDE { return "perceptual"; }
22 virtual bool diff(SkBitmap* baseline, SkBitmap* test, bool computeMask,
23 Result* result) const SK_OVERRIDE;
zachr@google.comc0a75a82013-06-28 15:34:56 +000024
25private:
zachr@google.comc0a75a82013-06-28 15:34:56 +000026 typedef SkImageDiffer INHERITED;
27};
28
29
30#endif