skia2/tools/skpdiff/SkDifferentPixelsMetric.h
mtklein 72c9faab45 Fix up all the easy virtual ... SK_OVERRIDE cases.
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases.  We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -08:00

51 lines
1.1 KiB
C++

/*
* 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 SkDifferentPixelsMetric_DEFINED
#define SkDifferentPixelsMetric_DEFINED
#include "SkTDArray.h"
#if SK_SUPPORT_OPENCL
#include "SkCLImageDiffer.h"
#else
#include "SkImageDiffer.h"
#endif
/**
* A differ that measures the percentage of different corresponding pixels. If the two images are
* not the same size or have no pixels, the result will always be zero.
*/
class SkDifferentPixelsMetric :
#if SK_SUPPORT_OPENCL
public SkCLImageDiffer {
#else
public SkImageDiffer {
#endif
public:
const char* getName() const SK_OVERRIDE;
virtual bool diff(SkBitmap* baseline, SkBitmap* test,
const BitmapsToCreate& bitmapsToCreate,
Result* result) const SK_OVERRIDE;
protected:
#if SK_SUPPORT_OPENCL
bool onInit() SK_OVERRIDE;
#endif
private:
#if SK_SUPPORT_OPENCL
cl_kernel fKernel;
typedef SkCLImageDiffer INHERITED;
#else
typedef SkImageDiffer INHERITED;
#endif
};
#endif