forked from RPCS3/rpcs3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
d3d12: Move d3d12 files to separate solution.
It simplify solution configurations.
- Loading branch information
Showing
68 changed files
with
85,737 additions
and
367 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
/*=========================================================================*\ | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
File: D2D1_2Helper.h | ||
Module Name: D2D | ||
Description: Helper files over the D2D interfaces and APIs. | ||
\*=========================================================================*/ | ||
|
||
#ifdef _MSC_VER | ||
#pragma once | ||
#endif // _MSC_VER | ||
|
||
#ifndef _D2D1_2HELPER_H_ | ||
#define _D2D1_2HELPER_H_ | ||
|
||
#if NTDDI_VERSION >= NTDDI_WINBLUE | ||
|
||
#ifndef _D2D1_2_H_ | ||
#include <d2d1_2.h> | ||
#endif // #ifndef _D2D1_2_H_ | ||
|
||
#ifndef D2D_USE_C_DEFINITIONS | ||
|
||
#include <winapifamily.h> | ||
|
||
#pragma region Application Family | ||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) | ||
|
||
namespace D2D1 | ||
{ | ||
COM_DECLSPEC_NOTHROW | ||
D2D1FORCEINLINE | ||
FLOAT | ||
ComputeFlatteningTolerance( | ||
_In_ CONST D2D1_MATRIX_3X2_F &matrix, | ||
FLOAT dpiX = 96.0f, | ||
FLOAT dpiY = 96.0f, | ||
FLOAT maxZoomFactor = 1.0f | ||
) | ||
{ | ||
D2D1_MATRIX_3X2_F dpiDependentTransform = | ||
matrix * D2D1::Matrix3x2F::Scale(dpiX / 96.0f, dpiY / 96.0f); | ||
|
||
FLOAT absMaxZoomFactor = (maxZoomFactor > 0) ? maxZoomFactor : -maxZoomFactor; | ||
|
||
return D2D1_DEFAULT_FLATTENING_TOLERANCE / | ||
(absMaxZoomFactor * D2D1ComputeMaximumScaleFactor(&dpiDependentTransform)); | ||
} | ||
|
||
} // namespace D2D1 | ||
|
||
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ | ||
#pragma endregion | ||
|
||
#endif // #ifndef D2D_USE_C_DEFINITIONS | ||
|
||
#endif // #if NTDDI_VERSION >= NTDDI_WINBLUE | ||
|
||
#endif // #ifndef _D2D1_HELPER_H_ | ||
|
Oops, something went wrong.