fCurrIndex = findByTitle(*argv);
if (fCurrIndex < 0) {
fprintf(stderr, "Unknown sample \"%s\"\n", *argv);
+ listTitles();
}
}
} else if (strcmp(*argv, "--msaa") == 0) {
if (argv < stop && **argv) {
fMSAASampleCount = atoi(*argv);
}
+ } else if (strcmp(*argv, "--list") == 0) {
+ listTitles();
}
else {
usage(commandName);
return -1;
}
+void SampleWindow::listTitles() {
+ int count = fSamples.count();
+ SkDebugf("All Slides:\n");
+ for (int i = 0; i < count; i++) {
+ SkDebugf(" %s\n", getSampleTitle(i).c_str());
+ }
+}
+
static SkBitmap capture_bitmap(SkCanvas* canvas) {
SkBitmap bm;
const SkBitmap& src = canvas->getDevice()->accessBitmap(false);
void postAnimatingEvent();
void installDrawFilter(SkCanvas*);
int findByTitle(const char*);
+ void listTitles();
typedef SkOSWindow INHERITED;
};