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

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

Issue 11474050: cc: Unify namespaces for all test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/pixel_test_output_surface.h ('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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_PIXEL_TEST_UTILS_H_
6 #define CC_TEST_PIXEL_TEST_UTILS_H_
7
5 #include "base/file_path.h" 8 #include "base/file_path.h"
6 9
7 class SkBitmap; 10 class SkBitmap;
8 11
9 namespace cc { 12 namespace cc {
10 namespace test {
11 13
12 // Encodes a bitmap into a PNG and write to disk. Returns true on success. The 14 // Encodes a bitmap into a PNG and write to disk. Returns true on success. The
13 // parent directory does not have to exist. 15 // parent directory does not have to exist.
14 bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path); 16 bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path);
15 17
16 // Reads and decodes a PNG image to a bitmap. Returns true on success. The PNG 18 // Reads and decodes a PNG image to a bitmap. Returns true on success. The PNG
17 // should have been encoded using |gfx::PNGCodec::Encode|. 19 // should have been encoded using |gfx::PNGCodec::Encode|.
18 bool ReadPNGFile(const FilePath& file_path, SkBitmap* bitmap); 20 bool ReadPNGFile(const FilePath& file_path, SkBitmap* bitmap);
19 21
20 // Compares with a PNG file on disk, and returns true if it is the same as 22 // 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. 23 // the given image. |ref_img_path| is absolute.
22 bool IsSameAsPNGFile(const SkBitmap& gen_bmp, FilePath ref_img_path); 24 bool IsSameAsPNGFile(const SkBitmap& gen_bmp, FilePath ref_img_path);
23 25
24 } // namespace test
25 } // namespace cc 26 } // namespace cc
27
28 #endif // CC_TEST_PIXEL_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « cc/test/pixel_test_output_surface.h ('k') | cc/test/pixel_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698