2 * Copyright 2013 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef SkDifferentPixelsMetric_DEFINED
9 #define SkDifferentPixelsMetric_DEFINED
11 #include "SkTDArray.h"
14 #include "SkCLImageDiffer.h"
16 #include "SkImageDiffer.h"
20 * A differ that measures the percentage of different corresponding pixels. If the two images are
21 * not the same size or have no pixels, the result will always be zero.
23 class SkDifferentPixelsMetric :
25 public SkCLImageDiffer {
27 public SkImageDiffer {
30 const char* getName() const override;
31 virtual bool diff(SkBitmap* baseline, SkBitmap* test,
32 const BitmapsToCreate& bitmapsToCreate,
33 Result* result) const override;
37 bool onInit() override;
44 typedef SkCLImageDiffer INHERITED;
46 typedef SkImageDiffer INHERITED;