diff options
Diffstat (limited to 'gfx/skia/skia/src/base/SkThreadID.cpp')
-rw-r--r-- | gfx/skia/skia/src/base/SkThreadID.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gfx/skia/skia/src/base/SkThreadID.cpp b/gfx/skia/skia/src/base/SkThreadID.cpp new file mode 100644 index 0000000000..e5b7a06c7c --- /dev/null +++ b/gfx/skia/skia/src/base/SkThreadID.cpp @@ -0,0 +1,16 @@ +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/private/base/SkThreadID.h" + +#ifdef SK_BUILD_FOR_WIN + #include "src/base/SkLeanWindows.h" + SkThreadID SkGetThreadID() { return GetCurrentThreadId(); } +#else + #include <pthread.h> + SkThreadID SkGetThreadID() { return (int64_t)pthread_self(); } +#endif |