OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #include "base/file_path.h" | |
6 | |
7 class SkBitmap; | |
8 | |
9 namespace cc { | |
10 namespace test { | |
11 | |
12 // Encodes a bitmap into a PNG and write to disk. Returns true on success. The | |
13 // parent directory does not have to exist. | |
14 bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path); | |
15 | |
16 // Reads and decodes a PNG image to a bitmap. Returns true on success. The PNG | |
17 // should have been encoded using |gfx::PNGCodec::Encode|. | |
18 bool ReadPNGFile(const FilePath& file_path, SkBitmap* bitmap); | |
19 | |
20 // Compares with a PNG file on disk, and returns true if it is the same as | |
21 // the given image. |ref_img_path| is absolute. | |
22 bool IsSameAsPNGFile(const SkBitmap& gen_bmp, FilePath ref_img_path); | |
23 | |
24 } // namespace test | |
25 } // namespace cc | |
OLD | NEW |