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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 void setBBoxHierarchyType(BBoxHierarchyType bbhType) { | 212 void setBBoxHierarchyType(BBoxHierarchyType bbhType) { |
213 fBBoxHierarchyType = bbhType; | 213 fBBoxHierarchyType = bbhType; |
214 } | 214 } |
215 | 215 |
216 BBoxHierarchyType getBBoxHierarchyType() { return fBBoxHierarchyType; } | 216 BBoxHierarchyType getBBoxHierarchyType() { return fBBoxHierarchyType; } |
217 | 217 |
218 void setGridSize(int width, int height) { | 218 void setGridSize(int width, int height) { |
219 fGridInfo.fTileInterval.set(width, height); | 219 fGridInfo.fTileInterval.set(width, height); |
220 } | 220 } |
221 | 221 |
222 void setJsonSummaryPtr(ImageResultsSummary* jsonSummaryPtr) { | 222 void setJsonSummaryPtr(ImageResultsAndExpectations* jsonSummaryPtr) { |
223 fJsonSummaryPtr = jsonSummaryPtr; | 223 fJsonSummaryPtr = jsonSummaryPtr; |
224 } | 224 } |
225 | 225 |
226 bool isUsingBitmapDevice() { | 226 bool isUsingBitmapDevice() { |
227 return kBitmap_DeviceType == fDeviceType; | 227 return kBitmap_DeviceType == fDeviceType; |
228 } | 228 } |
229 | 229 |
230 virtual SkString getPerIterTimeFormat() { return SkString("%.2f"); } | 230 virtual SkString getPerIterTimeFormat() { return SkString("%.2f"); } |
231 | 231 |
232 virtual SkString getNormalTimeFormat() { return SkString("%6.2f"); } | 232 virtual SkString getNormalTimeFormat() { return SkString("%6.2f"); } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 #if SK_SUPPORT_GPU | 358 #if SK_SUPPORT_GPU |
359 virtual ~PictureRenderer() { | 359 virtual ~PictureRenderer() { |
360 SkSafeUnref(fGrContext); | 360 SkSafeUnref(fGrContext); |
361 } | 361 } |
362 #endif | 362 #endif |
363 | 363 |
364 protected: | 364 protected: |
365 SkAutoTUnref<SkCanvas> fCanvas; | 365 SkAutoTUnref<SkCanvas> fCanvas; |
366 SkAutoTUnref<SkPicture> fPicture; | 366 SkAutoTUnref<SkPicture> fPicture; |
367 bool fUseChecksumBasedFilenames; | 367 bool fUseChecksumBasedFilenames; |
368 ImageResultsSummary* fJsonSummaryPtr; | 368 ImageResultsAndExpectations* fJsonSummaryPtr; |
369 SkDeviceTypes fDeviceType; | 369 SkDeviceTypes fDeviceType; |
370 BBoxHierarchyType fBBoxHierarchyType; | 370 BBoxHierarchyType fBBoxHierarchyType; |
371 DrawFilterFlags fDrawFilters[SkDrawFilter::kTypeCount]; | 371 DrawFilterFlags fDrawFilters[SkDrawFilter::kTypeCount]; |
372 SkString fDrawFiltersConfig; | 372 SkString fDrawFiltersConfig; |
373 SkString fOutputDir; | 373 SkString fOutputDir; |
374 SkString fInputFilename; | 374 SkString fInputFilename; |
375 SkTileGridFactory::TileGridInfo fGridInfo; // used when fBBoxHierarchyType i
s TileGrid | 375 SkTileGridFactory::TileGridInfo fGridInfo; // used when fBBoxHierarchyType i
s TileGrid |
376 | 376 |
377 void buildBBoxHierarchy(); | 377 void buildBBoxHierarchy(); |
378 | 378 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 | 633 |
634 typedef PictureRenderer INHERITED; | 634 typedef PictureRenderer INHERITED; |
635 }; | 635 }; |
636 | 636 |
637 extern PictureRenderer* CreateGatherPixelRefsRenderer(); | 637 extern PictureRenderer* CreateGatherPixelRefsRenderer(); |
638 extern PictureRenderer* CreatePictureCloneRenderer(); | 638 extern PictureRenderer* CreatePictureCloneRenderer(); |
639 | 639 |
640 } | 640 } |
641 | 641 |
642 #endif // PictureRenderer_DEFINED | 642 #endif // PictureRenderer_DEFINED |
OLD | NEW |