SkFontConfigInterface_direct_factory.cpp 474 B

12345678910111213141516
  1. /*
  2. * Copyright 2009-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/SkOnce.h"
  8. #include "src/ports/SkFontConfigInterface_direct.h"
  9. SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface() {
  10. static SkFontConfigInterface* singleton;
  11. static SkOnce once;
  12. once([]{ singleton = new SkFontConfigInterfaceDirect(); });
  13. return singleton;
  14. }