Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / login / screenshot_testing / SkPMetric.h
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // WARNING! This file is copied from third_party/skia/tools/skpdiff and slightly
6 // modified to be compilable outside Skia and suit chromium style. Some comments
7 // can make no sense.
8 // TODO(elizavetai): remove this file and reuse the original one in Skia
9
10 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENSHOT_TESTING_SKPMETRIC_H_
11 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENSHOT_TESTING_SKPMETRIC_H_
12
13 #include "chrome/browser/chromeos/login/screenshot_testing/SkImageDiffer.h"
14 #include "third_party/skia/include/core/SkTArray.h"
15 #include "third_party/skia/include/core/SkTDArray.h"
16
17 /**
18  * An image differ that uses the pdiff image metric to compare images.
19  */
20
21 class SkPMetric {
22  public:
23   virtual bool diff(SkBitmap* baseline,
24                     SkBitmap* test,
25                     const SkImageDiffer::BitmapsToCreate& bitmapsToCreate,
26                     SkImageDiffer::Result* result);
27
28  private:
29   typedef SkImageDiffer INHERITED;
30 };
31
32 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENSHOT_TESTING_SKPMETRIC_H_