2013-06-28 15:34:56 +00:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
|
2013-06-28 16:27:33 +00:00
|
|
|
#include "SkTArray.h"
|
2013-06-28 15:34:56 +00:00
|
|
|
#include "SkTDArray.h"
|
|
|
|
|
|
|
|
#include "SkImageDiffer.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An image differ that uses the pdiff image metric to compare images.
|
|
|
|
*/
|
|
|
|
class SkPMetric : public SkImageDiffer {
|
|
|
|
public:
|
2015-03-26 01:17:31 +00:00
|
|
|
const char* getName() const override { return "perceptual"; }
|
2014-07-02 14:43:04 +00:00
|
|
|
virtual bool diff(SkBitmap* baseline, SkBitmap* test, const BitmapsToCreate& bitmapsToCreate,
|
2015-03-26 01:17:31 +00:00
|
|
|
Result* result) const override;
|
2013-06-28 15:34:56 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
typedef SkImageDiffer INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|