SkThreadID.cpp 419 B

12345678910111213141516
  1. /*
  2. * Copyright 2015 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. #include "include/private/SkThreadID.h"
  8. #ifdef SK_BUILD_FOR_WIN
  9. #include "src/core/SkLeanWindows.h"
  10. SkThreadID SkGetThreadID() { return GetCurrentThreadId(); }
  11. #else
  12. #include <pthread.h>
  13. SkThreadID SkGetThreadID() { return (int64_t)pthread_self(); }
  14. #endif