OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef PictureRenderer_DEFINED | 8 #ifndef PictureRenderer_DEFINED |
9 #define PictureRenderer_DEFINED | 9 #define PictureRenderer_DEFINED |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 namespace sk_tools { | 37 namespace sk_tools { |
38 | 38 |
39 class TiledPictureRenderer; | 39 class TiledPictureRenderer; |
40 | 40 |
41 /** | 41 /** |
42 * Class for collecting image results (checksums) as we go. | 42 * Class for collecting image results (checksums) as we go. |
43 */ | 43 */ |
44 class ImageResultsSummary { | 44 class ImageResultsSummary { |
45 public: | 45 public: |
46 /** | 46 /** |
47 * Adds this bitmap hash to the summary of results. | 47 * Adds this image to the summary of results. |
48 * | 48 * |
49 * @param testName name of the test | 49 * @param sourceName name of the source file that generated this result |
| 50 * @param fileName relative path to the image output file on local disk |
50 * @param hash hash to store | 51 * @param hash hash to store |
| 52 * @param tileNumber if not NULL, ptr to tile number |
51 */ | 53 */ |
52 void add(const char *testName, uint64_t hash); | 54 void add(const char *sourceName, const char *fileName, uint64_t hash, |
| 55 const int *tileNumber=NULL); |
53 | 56 |
54 /** | 57 /** |
55 * Adds this bitmap's hash to the summary of results. | 58 * Adds this image to the summary of results. |
56 * | 59 * |
57 * @param testName name of the test | 60 * @param sourceName name of the source file that generated this result |
| 61 * @param fileName relative path to the image output file on local disk |
58 * @param bitmap bitmap to store the hash of | 62 * @param bitmap bitmap to store the hash of |
| 63 * @param tileNumber if not NULL, ptr to tile number |
59 */ | 64 */ |
60 void add(const char *testName, const SkBitmap& bitmap); | 65 void add(const char *sourceName, const char *fileName, const SkBitmap& bitma
p, |
| 66 const int *tileNumber=NULL); |
61 | 67 |
62 /** | 68 /** |
63 * Writes the summary (as constructed so far) to a file. | 69 * Writes the summary (as constructed so far) to a file. |
64 * | 70 * |
65 * @param filename path to write the summary to | 71 * @param filename path to write the summary to |
66 */ | 72 */ |
67 void writeToFile(const char *filename); | 73 void writeToFile(const char *filename); |
68 | 74 |
69 private: | 75 private: |
70 Json::Value fActualResultsNoComparison; | 76 Json::Value fActualResults; |
71 }; | 77 }; |
72 | 78 |
73 class PictureRenderer : public SkRefCnt { | 79 class PictureRenderer : public SkRefCnt { |
74 | 80 |
75 public: | 81 public: |
76 enum SkDeviceTypes { | 82 enum SkDeviceTypes { |
77 #if SK_ANGLE | 83 #if SK_ANGLE |
78 kAngle_DeviceType, | 84 kAngle_DeviceType, |
79 #endif | 85 #endif |
80 #if SK_MESA | 86 #if SK_MESA |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 | 671 |
666 typedef PictureRenderer INHERITED; | 672 typedef PictureRenderer INHERITED; |
667 }; | 673 }; |
668 | 674 |
669 extern PictureRenderer* CreateGatherPixelRefsRenderer(); | 675 extern PictureRenderer* CreateGatherPixelRefsRenderer(); |
670 extern PictureRenderer* CreatePictureCloneRenderer(); | 676 extern PictureRenderer* CreatePictureCloneRenderer(); |
671 | 677 |
672 } | 678 } |
673 | 679 |
674 #endif // PictureRenderer_DEFINED | 680 #endif // PictureRenderer_DEFINED |
OLD | NEW |