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

Unified Diff: tools/skpmaker.cpp

Issue 139553002: Revert of skpmaker: make the SKP slightly more interesting (add a border) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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 | tools/tests/render_pictures_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpmaker.cpp
diff --git a/tools/skpmaker.cpp b/tools/skpmaker.cpp
index 00082075c72ab33535980dc82ff106c8e9c48594..467f7b42d39d1f19a5ae5e17deb2d8089f83b6c5 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);
+ paint.setColor(color);
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);
pict.endRecording();
SkFILEWStream stream(writePath);
pict.serialize(&stream);
@@ -73,7 +68,7 @@
}
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;
}
« no previous file with comments | « no previous file | tools/tests/render_pictures_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698