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

Side by Side Diff: tools/image_expectations.h

Issue 274463004: Revert of extract some common code from PictureRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | « tools/PictureRenderer.cpp ('k') | tools/image_expectations.cpp » ('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 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef image_expectations_DEFINED
9 #define image_expectations_DEFINED
10
11 #include "SkBitmap.h"
12 #include "SkJSONCPP.h"
13
14 namespace sk_tools {
15
16 /**
17 * Class for collecting image results (checksums) as we go.
18 */
19 class ImageResultsSummary {
20 public:
21 /**
22 * Adds this image to the summary of results.
23 *
24 * @param sourceName name of the source file that generated this result
25 * @param fileName relative path to the image output file on local disk
26 * @param hash hash to store
27 * @param tileNumber if not NULL, ptr to tile number
28 */
29 void add(const char *sourceName, const char *fileName, uint64_t hash,
30 const int *tileNumber=NULL);
31
32 /**
33 * Adds this image to the summary of results.
34 *
35 * @param sourceName name of the source file that generated this result
36 * @param fileName relative path to the image output file on local disk
37 * @param bitmap bitmap to store the hash of
38 * @param tileNumber if not NULL, ptr to tile number
39 */
40 void add(const char *sourceName, const char *fileName, const SkBitmap& b itmap,
41 const int *tileNumber=NULL);
42
43 /**
44 * Writes the summary (as constructed so far) to a file.
45 *
46 * @param filename path to write the summary to
47 */
48 void writeToFile(const char *filename);
49
50 private:
51 Json::Value fActualResults;
52 };
53
54 } // namespace sk_tools
55
56 #endif // image_expectations_DEFINED
OLDNEW
« no previous file with comments | « tools/PictureRenderer.cpp ('k') | tools/image_expectations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698