Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: cc/test/pixel_test_utils.h

Issue 1535833002: Delete CC. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-5
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/pixel_test_software_output_device.cc ('k') | cc/test/pixel_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #ifndef CC_TEST_PIXEL_TEST_UTILS_H_
6 #define CC_TEST_PIXEL_TEST_UTILS_H_
7
8 #include <string>
9
10 #include "base/files/file_path.h"
11 #include "cc/test/pixel_comparator.h"
12
13 class SkBitmap;
14
15 namespace cc {
16
17 // Encodes a bitmap into a PNG and write to disk. Returns true on success. The
18 // parent directory does not have to exist.
19 bool WritePNGFile(const SkBitmap& bitmap, const base::FilePath& file_path,
20 bool discard_transparency);
21
22 // Reads and decodes a PNG image to a bitmap. Returns true on success. The PNG
23 // should have been encoded using |gfx::PNGCodec::Encode|.
24 bool ReadPNGFile(const base::FilePath& file_path, SkBitmap* bitmap);
25
26 std::string GetPNGDataUrl(const SkBitmap& bitmap);
27
28 // Compares with a PNG file on disk using the given PixelComparator, and returns
29 // true if the comparator returns a match. |ref_img_path| is absolute.
30 bool MatchesPNGFile(const SkBitmap& gen_bmp,
31 base::FilePath ref_img_path,
32 const PixelComparator& comparator);
33
34 } // namespace cc
35
36 #endif // CC_TEST_PIXEL_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « cc/test/pixel_test_software_output_device.cc ('k') | cc/test/pixel_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698