clean up printf usage in gm
BUG=
R=reed@google.com
Review URL: https://codereview.chromium.org/20373002
git-svn-id: http://skia.googlecode.com/svn/trunk@10370 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/filterbitmap.cpp b/gm/filterbitmap.cpp
index 4a1b89e..1ec6c8f 100644
--- a/gm/filterbitmap.cpp
+++ b/gm/filterbitmap.cpp
@@ -64,10 +64,6 @@
this->setBGColor(0xFFDDDDDD);
}
- void setName(const char name[]) {
- fName.set(name);
- }
-
protected:
virtual SkString onShortName() SK_OVERRIDE {
return fName;
@@ -102,9 +98,7 @@
FilterBitmapTextGM(float textSize)
: fTextSize(textSize)
{
- char name[1024];
- sprintf(name, "filterbitmap_text_%.2fpt", fTextSize);
- setName(name);
+ fName.printf("filterbitmap_text_%.2fpt", fTextSize);
}
protected:
@@ -143,9 +137,7 @@
FilterBitmapCheckerboardGM(int size, int num_checks)
: fSize(size), fNumChecks(num_checks)
{
- char name[1024];
- sprintf(name, "filterbitmap_checkerboard_%d_%d", fSize, fNumChecks);
- setName(name);
+ fName.printf("filterbitmap_checkerboard_%d_%d", fSize, fNumChecks);
}
protected:
@@ -182,9 +174,7 @@
FilterBitmapImageGM(const char filename[])
: fFilename(filename)
{
- char name[1024];
- sprintf(name, "filterbitmap_image_%s", filename);
- setName(name);
+ fName.printf("filterbitmap_image_%s", filename);
}
protected: