blob: 8f7aa6a05b1a4ac06229cde47a0bb9dac1594f7b [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:
mtklein72c9faa2015-01-09 10:06:39 -080021 const char* getName() const SK_OVERRIDE { return "perceptual"; }
epoger54f1ad82014-07-02 07:43:04 -070022 virtual bool diff(SkBitmap* baseline, SkBitmap* test, const BitmapsToCreate& bitmapsToCreate,
djsollen@google.comefc51b72013-11-12 18:29:17 +000023 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