Edit

kc3-lang/angle/src/libANGLE/Platform.cpp

Branch :

  • Show log

    Commit

  • Author : Jacek Caban
    Date : 2015-10-07 12:12:02
    Hash : 464bfc86
    Message : Use .def file to export functions using dllexport. BUG=angleproject:1183 This is a reland of part of commit 566273222683314dfc8ac1cdb9bf6deb5d2b4c65. The original commit caused warnings on 64-bit MSVC linker. This version removes declspec(dllexport) from exported ANGLE APIs (for which we need a new ANGLE_PLATFORM_EXPORT macro). It also makes those APIs stdcall on Windows builds. Change-Id: Iee2ab7e43ef0b98924f5759b5e1b333307052235 Reviewed-on: https://chromium-review.googlesource.com/304501 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>

  • src/libANGLE/Platform.cpp
  • //
    // Copyright 2015 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.
    //
    
    // Platform.cpp: Implementation methods for angle::Platform.
    
    #include <platform/Platform.h>
    
    #include "common/debug.h"
    
    namespace
    {
    angle::Platform *currentPlatform = nullptr;
    }
    
    // static
    angle::Platform *ANGLE_APIENTRY ANGLEPlatformCurrent()
    {
        return currentPlatform;
    }
    
    // static
    void ANGLE_APIENTRY ANGLEPlatformInitialize(angle::Platform *platformImpl)
    {
        ASSERT(platformImpl != nullptr);
        currentPlatform = platformImpl;
    }
    
    // static
    void ANGLE_APIENTRY ANGLEPlatformShutdown()
    {
        currentPlatform = nullptr;
    }