Index: gm/gmmain.cpp |
=================================================================== |
--- gm/gmmain.cpp (revision 8160) |
+++ gm/gmmain.cpp (working copy) |
@@ -194,6 +194,7 @@ |
// Set default values of member variables, which tool_main() |
// may override. |
fUseFileHierarchy = false; |
+ fSimulatePipePlaybackFailure = false; |
borenet
2013/03/14 18:48:21
I'm not sure I like the technique of baking test c
epoger
2013/03/14 18:57:12
It rubs me the wrong way too, but I couldn't think
borenet
2013/03/14 19:02:21
Yeah, I guess there's not a good way to force this
rmistry
2013/03/14 19:47:34
Sorry, I may have been able to help for Java or Py
epoger
2013/03/14 22:36:26
I'd rather not require a compile-time flag, becaus
borenet
2013/03/15 20:15:53
Fair enough.
|
fMismatchPath = NULL; |
} |
@@ -261,8 +262,9 @@ |
return; |
} |
- FailRec& rec = fFailedTests.push_back(make_name( |
- name.c_str(), renderModeDescriptor)); |
+ SkString completeName = name; |
+ completeName.append(renderModeDescriptor); |
epoger
2013/03/14 17:22:19
fixing a minor discrepancy revealed by this test
|
+ FailRec& rec = fFailedTests.push_back(completeName); |
rec.fIsPixelError = |
(kEmptyErrorBitfield != (errorType & kImageMismatch_ErrorBitmask)); |
} |
@@ -905,7 +907,9 @@ |
SkGPipeWriter writer; |
SkCanvas* pipeCanvas = writer.startRecording( |
&pipeController, gPipeWritingFlagCombos[i].flags); |
- invokeGM(gm, pipeCanvas, false, false); |
+ if (!this->fSimulatePipePlaybackFailure) { |
+ invokeGM(gm, pipeCanvas, false, false); |
+ } |
complete_bitmap(&bitmap); |
writer.endRecording(); |
SkString string("-pipe"); |
@@ -951,6 +955,7 @@ |
// |
bool fUseFileHierarchy; |
+ bool fSimulatePipePlaybackFailure; |
const char* fMismatchPath; |
@@ -1054,6 +1059,7 @@ |
" [--resourcePath|-i <path>]: directory that stores image resources\n" |
" [--nortree]: Do not exercise the R-Tree variant of SkPicture\n" |
" [--noserialize]: do not exercise SkPicture serialization & deserialization\n" |
+" [--simulatePipePlaybackFailure]: simulate a rendering failure in pipe mode only\n" |
" [--tiledPipe]: Exercise tiled SkGPipe replay\n" |
" [--notileGrid]: Do not exercise the tile grid variant of SkPicture\n" |
" [--tileGridReplayScales <scales>]: Comma separated list of floating-point scale\n" |
@@ -1320,6 +1326,8 @@ |
doSerialize = true; |
} else if (strcmp(*argv, "--noserialize") == 0) { |
doSerialize = false; |
+ } else if (strcmp(*argv, "--simulatePipePlaybackFailure") == 0) { |
+ gmmain.fSimulatePipePlaybackFailure = true; |
} else if (strcmp(*argv, "--tiledPipe") == 0) { |
doTiledPipe = true; |
} else if (!strcmp(*argv, "--verbose") || !strcmp(*argv, "-v")) { |