Flutter Engine
The Flutter Engine
SkDebug_android.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2006 The Android Open Source Project
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
10
11#if defined(SK_BUILD_FOR_ANDROID)
12
13#include <stdio.h>
14
15#ifdef LOG_TAG
16 #undef LOG_TAG
17#endif
18#define LOG_TAG "skia"
19#include <android/log.h>
20
21// Print debug output to stdout as well. This is useful for command line
22// applications
23bool gSkDebugToStdOut = false;
24
25void SkDebugf(const char format[], ...) {
26 va_list args1, args2;
27 va_start(args1, format);
28
29 if (gSkDebugToStdOut) {
30 va_copy(args2, args1);
31 vprintf(format, args2);
32 va_end(args2);
33 fflush(stdout);
34 }
35
36 __android_log_vprint(ANDROID_LOG_DEBUG, LOG_TAG, format, args1);
37
38 va_end(args1);
39}
40
41#endif // defined(SK_BUILD_FOR_ANDROID)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
uint32_t uint32_t * format
va_start(args, format)
va_end(args)
#define LOG_TAG
Definition: logging.h:11