1 //
2 // Copyright 2015 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 // Platform.cpp: Implementation methods for angle::Platform.
8 
9 #include <platform/Platform.h>
10 
11 #include "common/debug.h"
12 
13 namespace
14 {
15 angle::Platform *currentPlatform = nullptr;
16 }
17 
18 // static
ANGLEPlatformCurrent()19 angle::Platform *ANGLE_APIENTRY ANGLEPlatformCurrent()
20 {
21     return currentPlatform;
22 }
23 
24 // static
ANGLEPlatformInitialize(angle::Platform * platformImpl)25 void ANGLE_APIENTRY ANGLEPlatformInitialize(angle::Platform *platformImpl)
26 {
27     ASSERT(platformImpl != nullptr);
28     currentPlatform = platformImpl;
29 }
30 
31 // static
ANGLEPlatformShutdown()32 void ANGLE_APIENTRY ANGLEPlatformShutdown()
33 {
34     currentPlatform = nullptr;
35 }
36