diff options
author | mtklein <mtklein@chromium.org> | 2015-01-13 08:40:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-13 08:40:23 -0800 |
commit | 199ba8e19b0cafb37eea3beab162bc4b52728fff (patch) | |
tree | 143928c3d09c28f887ca752978b49cc0662b43f5 /src/utils/win | |
parent | 60f8353f683277f360c5a74e2905c8de987a2dfe (diff) |
namespace {} trick for SK_DECLARE_STATIC_ONCE
Like all our other SK_DECLARE_STATIC_*, it's usually not a thread-safe
thing to put inside a function. Adding namespace {} prevents that
syntactically.
Needs https://codereview.chromium.org/841263004/ to land first.
BUG=chromium:447890
No public API changes.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/806473006
Diffstat (limited to 'src/utils/win')
-rw-r--r-- | src/utils/win/SkDWrite.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/utils/win/SkDWrite.cpp b/src/utils/win/SkDWrite.cpp index 7801059187..363ac438d9 100644 --- a/src/utils/win/SkDWrite.cpp +++ b/src/utils/win/SkDWrite.cpp @@ -41,10 +41,9 @@ static void create_dwrite_factory(IDWriteFactory** factory) { } +SK_DECLARE_STATIC_ONCE(once); IDWriteFactory* sk_get_dwrite_factory() { - SK_DECLARE_STATIC_ONCE(once); SkOnce(&once, create_dwrite_factory, &gDWriteFactory); - return gDWriteFactory; } |