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

Unified Diff: tools/AndroidSkDebugToStdOut.cpp

Issue 753543003: Change how SkDebugf is sent to stdout on Android. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comment. Created 6 years 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 | « src/ports/SkDebug_android.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/AndroidSkDebugToStdOut.cpp
diff --git a/tools/AndroidSkDebugToStdOut.cpp b/tools/AndroidSkDebugToStdOut.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..9dc991164dfb9cba101a4b7157f5dc8cad2f7b8f
--- /dev/null
+++ b/tools/AndroidSkDebugToStdOut.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+// Need to include SkTypes before checking SK_BUILD_FOR_ANDROID, so it will be
+// set in the Android framework build.
+#include "SkTypes.h"
+#ifdef SK_BUILD_FOR_ANDROID
+extern bool gSkDebugToStdOut;
+
+// Use a static initializer to set gSkDebugToStdOut to true, sending SkDebugf
+// to stdout.
+class SendToStdOut {
+public:
+ SendToStdOut() {
+ gSkDebugToStdOut = true;
+ }
+};
+
+static SendToStdOut gSendToStdOut;
+#endif // SK_BUILD_FOR_ANDROID
« no previous file with comments | « src/ports/SkDebug_android.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698