aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpmaker.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-15 16:04:45 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-15 16:04:45 +0000
commit7e1a31db6acc4ab70bb58164cd5f451f939e71b6 (patch)
tree42b6a6694ebad4937a71326e494e8480e27fdd7d /tools/skpmaker.cpp
parenta3b0c4fe6394124a4b3e23b83aa51572d4a0b2a5 (diff)
Revert of skpmaker: make the SKP slightly more interesting (add a border) (https://codereview.chromium.org/137993008/)
Reason for revert: broke http://108.170.217.252:10117/builders/Build-Mac10.6-GCC-x86-Debug/builds/2837 Original issue's description: > skpmaker: make the SKP slightly more interesting (add a border) > > This will help with render_pictures self-testing > BUG=skia:1942 > > Committed: http://code.google.com/p/skia/source/detail?r=13086 R=rmistry@google.com TBR=rmistry@google.com NOTREECHECKS=true NOTRY=true BUG=skia:1942 Author: epoger@google.com Review URL: https://codereview.chromium.org/139553002 git-svn-id: http://skia.googlecode.com/svn/trunk@13087 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/skpmaker.cpp')
-rw-r--r--tools/skpmaker.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/skpmaker.cpp b/tools/skpmaker.cpp
index 00082075c7..467f7b42d3 100644
--- a/tools/skpmaker.cpp
+++ b/tools/skpmaker.cpp
@@ -17,25 +17,20 @@
// Flags used by this file, alphabetically:
DEFINE_int32(blue, 128, "Value of blue color channel in image, 0-255.");
-DEFINE_int32(border, 4, "Width of the black border around the image.");
DEFINE_int32(green, 128, "Value of green color channel in image, 0-255.");
DEFINE_int32(height, 200, "Height of canvas to create.");
DEFINE_int32(red, 128, "Value of red color channel in image, 0-255.");
DEFINE_int32(width, 300, "Width of canvas to create.");
DEFINE_string(writePath, "", "Filepath to write the SKP into.");
-static void skpmaker(int width, int height, int border, SkColor color,
+static void skpmaker(int width, int height, SkColor color,
const char *writePath) {
SkPicture pict;
SkCanvas* canvas = pict.beginRecording(width, height);
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(SK_ColorBLACK);
- canvas->drawRectCoords(0, 0, SkIntToScalar(width), SkIntToScalar(height), paint);
paint.setColor(color);
- canvas->drawRectCoords(SkIntToScalar(border), SkIntToScalar(border),
- SkIntToScalar(width - border*2), SkIntToScalar(height - border*2),
- paint);
+ canvas->drawRectCoords(0, 0, SkIntToScalar(width), SkIntToScalar(height), paint);
pict.endRecording();
SkFILEWStream stream(writePath);
pict.serialize(&stream);
@@ -73,7 +68,7 @@ int tool_main(int argc, char** argv) {
}
SkColor color = SkColorSetRGB(FLAGS_red, FLAGS_green, FLAGS_blue);
- skpmaker(FLAGS_width, FLAGS_height, FLAGS_border, color, FLAGS_writePath[0]);
+ skpmaker(FLAGS_width, FLAGS_height, color, FLAGS_writePath[0]);
return 0;
}