AndroidSkDebugToStdOut.cpp 607 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright 2014 Google Inc.
  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. // Need to include SkTypes before checking SK_BUILD_FOR_ANDROID, so it will be
  8. // set in the Android framework build.
  9. #include "include/core/SkTypes.h"
  10. #ifdef SK_BUILD_FOR_ANDROID
  11. extern bool gSkDebugToStdOut;
  12. // Use a static initializer to set gSkDebugToStdOut to true, sending SkDebugf
  13. // to stdout.
  14. class SendToStdOut {
  15. public:
  16. SendToStdOut() {
  17. gSkDebugToStdOut = true;
  18. }
  19. };
  20. static SendToStdOut gSendToStdOut;
  21. #endif // SK_BUILD_FOR_ANDROID