| 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 #include "PictureRenderer.h" | 8 #include "PictureRenderer.h" |
| 9 #include "picture_utils.h" | 9 #include "picture_utils.h" |
| 10 #include "SamplePipeControllers.h" | 10 #include "SamplePipeControllers.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 return; | 249 return; |
| 250 } | 250 } |
| 251 | 251 |
| 252 // resetState should've already done this | 252 // resetState should've already done this |
| 253 fGrContext->flush(); | 253 fGrContext->flush(); |
| 254 | 254 |
| 255 fGrContext->purgeAllUnlockedResources(); | 255 fGrContext->purgeAllUnlockedResources(); |
| 256 #endif | 256 #endif |
| 257 } | 257 } |
| 258 | 258 |
| 259 uint32_t PictureRenderer::recordFlags() { | |
| 260 return (kNone_BBoxHierarchyType == fBBoxHierarchyType) | |
| 261 ? 0 | |
| 262 : SkPicture::kUsePathBoundsForClip_RecordingFlag; | |
| 263 } | |
| 264 | |
| 265 /** | 259 /** |
| 266 * Write the canvas to an image file and/or JSON summary. | 260 * Write the canvas to an image file and/or JSON summary. |
| 267 * | 261 * |
| 268 * @param canvas Must be non-null. Canvas to be written to a file. | 262 * @param canvas Must be non-null. Canvas to be written to a file. |
| 269 * @param writePath If nonempty, write the binary image to a file within this di
rectory. | 263 * @param writePath If nonempty, write the binary image to a file within this di
rectory. |
| 270 * @param mismatchPath If nonempty, write the binary image to a file within this
directory, | 264 * @param mismatchPath If nonempty, write the binary image to a file within this
directory, |
| 271 * but only if the image does not match expectations. | 265 * but only if the image does not match expectations. |
| 272 * @param inputFilename If we are writing out a binary image, use this to build
its filename. | 266 * @param inputFilename If we are writing out a binary image, use this to build
its filename. |
| 273 * @param jsonSummaryPtr If not null, add image results (checksum) to this summa
ry. | 267 * @param jsonSummaryPtr If not null, add image results (checksum) to this summa
ry. |
| 274 * @param useChecksumBasedFilenames If true, use checksum-based filenames when w
riting to disk. | 268 * @param useChecksumBasedFilenames If true, use checksum-based filenames when w
riting to disk. |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 virtual SkString getConfigNameInternal() SK_OVERRIDE { | 958 virtual SkString getConfigNameInternal() SK_OVERRIDE { |
| 965 return SkString("picture_clone"); | 959 return SkString("picture_clone"); |
| 966 } | 960 } |
| 967 }; | 961 }; |
| 968 | 962 |
| 969 PictureRenderer* CreatePictureCloneRenderer() { | 963 PictureRenderer* CreatePictureCloneRenderer() { |
| 970 return SkNEW(PictureCloneRenderer); | 964 return SkNEW(PictureCloneRenderer); |
| 971 } | 965 } |
| 972 | 966 |
| 973 } // namespace sk_tools | 967 } // namespace sk_tools |
| OLD | NEW |