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

Unified Diff: gm/gmmain.cpp

Issue 13650002: gm: report ExpectationsMismatch and RenderModeMismatch results separately (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gm/tests/outputs/pipe-playback-failure/output-expected/command_line » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
===================================================================
--- gm/gmmain.cpp (revision 8534)
+++ gm/gmmain.cpp (working copy)
@@ -272,7 +272,8 @@
}
// Things to do only if there is some error condition.
- SkString fullName = make_name(name.c_str(), renderModeDescriptor);
+ SkString fullName = name;
+ fullName.append(renderModeDescriptor);
for (int typeInt = 0; typeInt <= kLast_ErrorType; typeInt++) {
ErrorType type = static_cast<ErrorType>(typeInt);
if (errorCombination.includes(type)) {
@@ -996,9 +997,8 @@
return kEmpty_ErrorCombination;
}
- ErrorCombination test_pipe_playback(GM* gm,
- const ConfigData& gRec,
- const SkBitmap& referenceBitmap) {
+ ErrorCombination test_pipe_playback(GM* gm, const ConfigData& gRec,
+ const SkBitmap& referenceBitmap, bool simulateFailure) {
ErrorCombination errors;
for (size_t i = 0; i < SK_ARRAY_COUNT(gPipeWritingFlagCombos); ++i) {
SkBitmap bitmap;
@@ -1010,7 +1010,9 @@
SkGPipeWriter writer;
SkCanvas* pipeCanvas = writer.startRecording(
&pipeController, gPipeWritingFlagCombos[i].flags);
- invokeGM(gm, pipeCanvas, false, false);
+ if (!simulateFailure) {
+ invokeGM(gm, pipeCanvas, false, false);
+ }
complete_bitmap(&bitmap);
writer.endRecording();
SkString string("-pipe");
@@ -1177,6 +1179,7 @@
DEFINE_string2(resourcePath, i, "", "Directory that stores image resources.");
DEFINE_bool(rtree, true, "Exercise the R-Tree variant of SkPicture test pass.");
DEFINE_bool(serialize, true, "Exercise the SkPicture serialization & deserialization test pass.");
+DEFINE_bool(simulatePipePlaybackFailure, false, "Simulate a rendering failure in pipe mode only.");
DEFINE_bool(tiledPipe, false, "Exercise tiled SkGPipe replay.");
DEFINE_bool(tileGrid, true, "Exercise the tile grid variant of SkPicture.");
DEFINE_string(tileGridReplayScales, "", "Space separated list of floating-point scale "
@@ -1459,7 +1462,8 @@
ErrorCombination pipeErrors;
if (FLAGS_pipe) {
- pipeErrors.add(gmmain.test_pipe_playback(gm, compareConfig, comparisonBitmap));
+ pipeErrors.add(gmmain.test_pipe_playback(gm, compareConfig, comparisonBitmap,
+ FLAGS_simulatePipePlaybackFailure));
}
if ((pipeErrors.isEmpty()) &&
« no previous file with comments | « no previous file | gm/tests/outputs/pipe-playback-failure/output-expected/command_line » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698