Edit

kc3-lang/angle/util/system_utils.h

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2016-05-17 13:43:17
    Hash : 776a75b4
    Message : Make Platform errors trigger test failures. This can be useful in the Vulkan back-end to make validation layer errors cause test cases to fail. BUG=angleproject:1319 Change-Id: I523f3c874e892a2646600e4c5c554319ed8d770c Reviewed-on: https://chromium-review.googlesource.com/342050 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>

  • util/system_utils.h
  • //
    // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    // system_utils.h: declaration of OS-specific utility functions
    
    #ifndef UTIL_SYSTEM_UTILS_H_
    #define UTIL_SYSTEM_UTILS_H_
    
    #include <string>
    
    #include "common/angleutils.h"
    
    namespace angle
    {
    
    std::string GetExecutablePath();
    std::string GetExecutableDirectory();
    std::string GetSharedLibraryExtension();
    
    // Cross platform equivalent of the Windows Sleep function
    void Sleep(unsigned int milliseconds);
    
    void SetLowPriorityProcess();
    
    // Write a debug message, either to a standard output or Debug window.
    void WriteDebugMessage(const char *format, ...);
    
    class Library : angle::NonCopyable
    {
      public:
        virtual ~Library() {}
        virtual void *getSymbol(const std::string &symbolName) = 0;
    };
    
    Library *loadLibrary(const std::string &libraryName);
    
    } // namespace angle
    
    #endif  // UTIL_SYSTEM_UTILS_H_