Bug 1799258 - Fix constexpr issue on base toolchain builds. r=gfx-reviewers,lsalzman
[gecko.git] / gfx / thebes / AllOfDcomp.h
blob5b43182a5c6d1dc4649009217af4c0f0d019e7b2
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_gfx_AllOfDcomp_h
7 #define mozilla_gfx_AllOfDcomp_h
9 // Getting everything that we need in dcomp.h defined means messing with some defines.
11 #if (_WIN32_WINNT < _WIN32_WINNT_WIN10)
13 # define XSTR(x) STR(x)
14 # define STR(x) #x
15 // clang-format off
17 # pragma message "IDCompositionFilterEffect in dcomp.h requires _WIN32_WINNT >= _WIN32_WINNT_WIN10."
18 // Pedantically, it actually requires _WIN32_WINNT_WINTHRESHOLD, but that's the
19 // same as _WIN32_WINNT_WIN10.
21 # pragma message "Forcing NTDDI_VERSION " XSTR(NTDDI_VERSION) " -> " XSTR(NTDDI_WIN10)
22 # undef NTDDI_VERSION
23 # define NTDDI_VERSION NTDDI_WIN10
25 # pragma message "Forcing _WIN32_WINNT " XSTR(_WIN32_WINNT) " -> " XSTR(_WIN32_WINNT_WIN10)
26 # undef _WIN32_WINNT
27 # define _WIN32_WINNT _WIN32_WINNT_WIN10
29 // clang-format on
30 # undef STR
31 # undef XSTR
33 #endif
35 // -
37 #include <dcomp.h>
39 #endif // mozilla_gfx_AllOfDcomp_h