6cfce1b7b4
Previously, a function was called using dlsym in skia_launcher. Add a static initializer that changes the setting, and include that for the tools we automate for testing. Also only do va_copy if we actually use it. BUG=skia:2454 Review URL: https://codereview.chromium.org/753543003
25 lines
594 B
C++
25 lines
594 B
C++
/*
|
|
* 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
|