Revert "Merged all Chromoting Host code into remoting_core.dll (Windows)."
[chromium-blink-merge.git] / cc / test / pixel_test_utils.h
blob3fa990d6687b6cd6caa554ee9298077e93dac916
1 // Copyright (c) 2012 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.
5 #ifndef CC_TEST_PIXEL_TEST_UTILS_H_
6 #define CC_TEST_PIXEL_TEST_UTILS_H_
8 #include "base/file_path.h"
10 class SkBitmap;
12 namespace cc {
14 // Encodes a bitmap into a PNG and write to disk. Returns true on success. The
15 // parent directory does not have to exist.
16 bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path);
18 // Reads and decodes a PNG image to a bitmap. Returns true on success. The PNG
19 // should have been encoded using |gfx::PNGCodec::Encode|.
20 bool ReadPNGFile(const FilePath& file_path, SkBitmap* bitmap);
22 // Compares with a PNG file on disk, and returns true if it is the same as
23 // the given image. |ref_img_path| is absolute.
24 bool IsSameAsPNGFile(const SkBitmap& gen_bmp, FilePath ref_img_path);
26 } // namespace cc
28 #endif // CC_TEST_PIXEL_TEST_UTILS_H_