aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 15:42:37 +0000
committerGravatar chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 15:42:37 +0000
commitf32f6e8323d201ede639ba66e1614783428a166d (patch)
treed42ea42fad06b65423d1eb7ce32d328c6863e50c /gm
parent83ca337348c74dede813b2022943c25a337f32eb (diff)
Added annotation for gm's -wp flag
Review URL: https://codereview.appspot.com/6345098 git-svn-id: http://skia.googlecode.com/svn/trunk@4573 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/gmmain.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 0fc278c3ec..9f109f5dc6 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -372,7 +372,7 @@ static void generate_pdf(GM* gm, SkDynamicMemoryWStream& pdf) {
static void generate_xps(GM* gm, SkDynamicMemoryWStream& xps) {
#ifdef SK_SUPPORT_XPS
SkISize size = gm->getISize();
-
+
SkSize trimSize = SkSize::Make(SkIntToScalar(size.width()),
SkIntToScalar(size.height()));
static const SkScalar inchesPerMeter = SkScalarDiv(10000, 254);
@@ -405,7 +405,7 @@ static ErrorBitfield write_reference_image(const ConfigData& gRec,
if (gRec.fBackend == kRaster_Backend ||
gRec.fBackend == kGPU_Backend ||
(gRec.fBackend == kPDF_Backend && CAN_IMAGE_PDF)) {
-
+
path = make_filename(writePath, renderModeDescriptor, name, "png");
success = write_bitmap(path, bitmap);
}
@@ -701,11 +701,11 @@ static void write_picture_serialization(GM* gm, const ConfigData& rec,
SkBitmap::kARGB_8888_Config == rec.fConfig) {
SkAutoTUnref<SkPicture> pict(generate_new_picture(gm));
-
+
const char* pictureSuffix = "skp";
SkString path = make_filename(writePicturePath, "",
SkString(gm->shortName()), pictureSuffix);
-
+
SkFILEWStream stream(path.c_str());
pict->serialize(&stream);
}
@@ -748,6 +748,7 @@ static const ConfigData gRec[] = {
static void usage(const char * argv0) {
SkDebugf("%s\n", argv0);
SkDebugf(" [-w writePath] [-r readPath] [-d diffPath] [-i resourcePath]\n");
+ SkDebugf(" [-wp writePicturePath]\n");
SkDebugf(" [--config ");
for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); ++i) {
if (i > 0) {
@@ -762,6 +763,7 @@ static void usage(const char * argv0) {
" [-h|--help]\n"
);
SkDebugf(" writePath: directory to write rendered images in.\n");
+ SkDebugf(" writePicturePath: directory to write images to in .skp format.\n");
SkDebugf(
" readPath: directory to read reference images from;\n"
" reports if any pixels mismatch between reference and new images\n");
@@ -971,7 +973,7 @@ int main(int argc, char * const argv[]) {
if (readPath) {
fprintf(stderr, "reading from %s\n", readPath);
- }
+ }
if (writePath) {
fprintf(stderr, "writing to %s\n", writePath);
}
@@ -1095,7 +1097,7 @@ int main(int argc, char * const argv[]) {
forwardRenderedBitmap,
readPath, diffPath);
}
-
+
if (!(gmFlags & GM::kSkipPicture_Flag) && writePicturePath) {
write_picture_serialization(gm, config, writePicturePath);
}