aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-15 17:25:46 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-15 17:25:46 +0000
commita5d48414249b7df5387ac572d178a1b6550880a5 (patch)
tree979aa87e5f3bf8fd032c2be48e3a05ed4caa7dbb /bench
parenta87cd2af4c7f46ba8437c2e500805c9deb9e3a40 (diff)
Add information to bench output.
Diffstat (limited to 'bench')
-rw-r--r--bench/benchmain.cpp45
1 files changed, 44 insertions, 1 deletions
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index 34f8a1a9fa..7fce807ce6 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -355,16 +355,59 @@ int main (int argc, char * const argv[]) {
// report our current settings
{
SkString str;
- str.printf("skia bench: alpha=0x%02X antialias=%d filter=%d\n",
+ str.printf("skia bench: alpha=0x%02X antialias=%d filter=%d",
forceAlpha, forceAA, forceFilter);
+ str.appendf(" rotate=%d scale=%d clip=%d",
+ doRotate, doScale, doClip);
+
+ const char * ditherName;
+ switch (forceDither) {
+ case SkTriState::kDefault: ditherName = "default"; break;
+ case SkTriState::kTrue: ditherName = "true"; break;
+ case SkTriState::kFalse: ditherName = "false"; break;
+ default: ditherName = "<invalid>"; break;
+ }
+ str.appendf(" dither=%s", ditherName);
+
+ if (hasStrokeWidth) {
+ str.appendf(" strokeWidth=%f", strokeWidth);
+ } else {
+ str.append(" strokeWidth=none");
+ }
+
+#if defined(SK_SCALAR_IS_FLOAT)
+ str.append(" scalar=float");
+#elif defined(SK_SCALAR_IS_FIXED)
+ str.append(" scalar=fixed");
+#endif
+
+#if defined(SK_BUILD_FOR_WIN32)
+ str.append(" system=WIN32");
+#elif defined(SK_BUILD_FOR_MAC)
+ str.append(" system=MAC");
+#elif defined(SK_BUILD_FOR_ANDROID)
+ str.append(" system=ANDROID");
+#elif defined(SK_BUILD_FOR_UNIX)
+ str.append(" system=UNIX");
+#else
+ str.append(" system=other");
+#endif
+
+#if defined(SK_DEBUG)
+ str.append(" DEBUG");
+#endif
+ str.append("\n");
log_progress(str);
}
GrContext* context = NULL;
+ //Don't do GL when fixed.
+#if !defined(SK_SCALAR_IS_FIXED)
SkEGLContext eglContext;
if (eglContext.init(1024, 1024)) {
context = GrContext::CreateGLShaderContext();
}
+#endif
BenchTimer timer = BenchTimer();