Skip to content

Commit

Permalink
Code Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Jun 29, 2016
1 parent bf6413c commit 2be1e3e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Inc/PrimitiveBatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include <d3d11_1.h>
#endif

#include <memory.h>
#include <memory>
#include <utility>
#include <stdint.h>


Expand Down
4 changes: 2 additions & 2 deletions Inc/ScreenGrab.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ namespace DirectX
HRESULT __cdecl SaveDDSTextureToFile(
_In_ ID3D11DeviceContext* pContext,
_In_ ID3D11Resource* pSource,
_In_z_ LPCWSTR fileName);
_In_z_ const wchar_t* fileName);

HRESULT __cdecl SaveWICTextureToFile(
_In_ ID3D11DeviceContext* pContext,
_In_ ID3D11Resource* pSource,
_In_ REFGUID guidContainerFormat,
_In_z_ LPCWSTR fileName,
_In_z_ const wchar_t* fileName,
_In_opt_ const GUID* targetFormat = nullptr,
_In_opt_ std::function<void __cdecl(IPropertyBag2*)> setCustomProps = nullptr);
}
1 change: 1 addition & 0 deletions Inc/SimpleMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#endif

#include <functional>
#include <assert.h>
#include <memory.h>

#include <DirectXMath.h>
Expand Down
5 changes: 5 additions & 0 deletions Src/DDSTextureLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@

using namespace DirectX;

static_assert(DDS_DIMENSION_TEXTURE1D == D3D11_RESOURCE_DIMENSION_TEXTURE1D, "dds mismatch");
static_assert(DDS_DIMENSION_TEXTURE2D == D3D11_RESOURCE_DIMENSION_TEXTURE2D, "dds mismatch");
static_assert(DDS_DIMENSION_TEXTURE3D == D3D11_RESOURCE_DIMENSION_TEXTURE3D, "dds mismatch");
static_assert(DDS_RESOURCE_MISC_TEXTURECUBE == D3D11_RESOURCE_MISC_TEXTURECUBE, "dds mismatch");

namespace
{
//--------------------------------------------------------------------------------------
Expand Down
20 changes: 11 additions & 9 deletions Src/ScreenGrab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ namespace


//--------------------------------------------------------------------------------------
HRESULT DirectX::SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,
_In_ ID3D11Resource* pSource,
_In_z_ LPCWSTR fileName )
_Use_decl_annotations_
HRESULT DirectX::SaveDDSTextureToFile( ID3D11DeviceContext* pContext,
ID3D11Resource* pSource,
const wchar_t* fileName )
{
if ( !fileName )
return E_INVALIDARG;
Expand Down Expand Up @@ -329,12 +330,13 @@ extern bool _IsWIC2();
extern IWICImagingFactory* _GetWIC();
}

HRESULT DirectX::SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
_In_ ID3D11Resource* pSource,
_In_ REFGUID guidContainerFormat,
_In_z_ LPCWSTR fileName,
_In_opt_ const GUID* targetFormat,
_In_opt_ std::function<void(IPropertyBag2*)> setCustomProps )
_Use_decl_annotations_
HRESULT DirectX::SaveWICTextureToFile( ID3D11DeviceContext* pContext,
ID3D11Resource* pSource,
REFGUID guidContainerFormat,
const wchar_t* fileName,
const GUID* targetFormat,
std::function<void(IPropertyBag2*)> setCustomProps )
{
if ( !fileName )
return E_INVALIDARG;
Expand Down
1 change: 1 addition & 0 deletions Src/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>

#include <stdint.h>
Expand Down

0 comments on commit 2be1e3e

Please sign in to comment.