Debian Codegraph @

src/gpu/ganesh/gl/win/GrGLMakeNativeInterface_win.cpp

raw
1 /*
2 * Copyright 2011 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/core/SkTypes.h"
8
9 #if !defined(SK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE)
10
11 #include "include/gpu/ganesh/gl/GrGLInterface.h"
12 #include "include/gpu/ganesh/gl/win/GrGLMakeWinInterface.h"
13
14 #if defined(_M_ARM64)
15
16 sk_sp<const GrGLInterface> GrGLMakeNativeInterface() { return nullptr; }
17
18 #else
19 /*
20 * Windows makes the GL funcs all be __stdcall instead of __cdecl :(
21 * This implementation will only work if GR_GL_FUNCTION_TYPE is __stdcall.
22 * Otherwise, a springboard would be needed that hides the calling convention.
23 */
24 sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
25 return GrGLInterfaces::MakeWin();
26 }
27
28 #endif // ARM64
29
30 #endif // SK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE