diff options
author | José Fonseca <jfonseca@vmware.com> | 2014-06-18 15:15:12 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2014-06-18 15:16:30 +0100 |
commit | f660b655e03db57a5e2bb0509e049a9e69df1b16 (patch) | |
tree | b0c5b4f16b85c17eeafeb629debadd0b3cfa1505 | |
parent | 1f2a2c50b4814e84f861bf10e0a986395aa87526 (diff) |
d2d1trace: Don't provide d2d1.dll/dwrite.dll stubs.
Just like done for DXGI.
-rw-r--r-- | cli/cli_trace.cpp | 7 | ||||
-rw-r--r-- | common/trace_api.hpp | 1 | ||||
-rw-r--r-- | wrappers/CMakeLists.txt | 25 | ||||
-rw-r--r-- | wrappers/d2d1trace.def (renamed from wrappers/d2d1.def) | 0 | ||||
-rw-r--r-- | wrappers/dwrite.def | 4 | ||||
-rw-r--r-- | wrappers/dwritetrace.cpp | 6 |
6 files changed, 12 insertions, 31 deletions
diff --git a/cli/cli_trace.cpp b/cli/cli_trace.cpp index e5b0cfdc..ac89636e 100644 --- a/cli/cli_trace.cpp +++ b/cli/cli_trace.cpp @@ -122,6 +122,10 @@ traceProgram(trace::API api, wrapperFilename = "dxgitrace.dll"; useInject = true; break; + case trace::API_D2D1: + wrapperFilename = "d2d1trace.dll"; + useInject = true; + break; #endif default: std::cerr << "error: unsupported API\n"; @@ -326,6 +330,9 @@ command(int argc, char *argv[]) strcmp(optarg, "d3d11") == 0 || strcmp(optarg, "d3d11_1") == 0) { api = trace::API_DXGI; + } else if (strcmp(optarg, "d2d") == 0 || + strcmp(optarg, "d2d1") == 0) { + api = trace::API_D2D1; } else { std::cerr << "error: unknown API `" << optarg << "`\n"; usage(); diff --git a/common/trace_api.hpp b/common/trace_api.hpp index 3d491fe1..3ddda7ef 100644 --- a/common/trace_api.hpp +++ b/common/trace_api.hpp @@ -49,6 +49,7 @@ enum API { API_D3D8, API_D3D9, API_DXGI, // D3D10.x, D3D11.x + API_D2D1, // Direct2D }; diff --git a/wrappers/CMakeLists.txt b/wrappers/CMakeLists.txt index 9e998fc9..bc44f4ae 100644 --- a/wrappers/CMakeLists.txt +++ b/wrappers/CMakeLists.txt @@ -155,7 +155,7 @@ if (WIN32) ${CMAKE_SOURCE_DIR}/specs/winapi.py ${CMAKE_SOURCE_DIR}/specs/stdapi.py ) - add_library (dxgitrace SHARED + add_library (dxgitrace MODULE ${DXGITRACE_DEF} dxgitrace.cpp d3dcommonshader.cpp @@ -169,10 +169,7 @@ if (WIN32) set_target_properties (dxgitrace PROPERTIES PREFIX "" ) - install (TARGETS dxgitrace - RUNTIME DESTINATION ${WRAPPER_INSTALL_DIR} COMPONENT RUNTIME - LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR} COMPONENT RUNTIME - ) + install (TARGETS dxgitrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR}) endif () # d2d1.dll, dwrite.dll @@ -197,7 +194,7 @@ if (WIN32) ${CMAKE_SOURCE_DIR}/specs/winapi.py ${CMAKE_SOURCE_DIR}/specs/stdapi.py ) - add_library (d2d1trace SHARED d2d1.def d2d1trace.cpp) + add_library (d2d1trace MODULE d2d1trace.def d2d1trace.cpp) target_link_libraries (d2d1trace common ${ZLIB_LIBRARIES} @@ -205,22 +202,8 @@ if (WIN32) ) set_target_properties (d2d1trace PROPERTIES PREFIX "" - OUTPUT_NAME d2d1 - ) - # http://www.cmake.org/pipermail/cmake/2009-March/028221.html - install (TARGETS d2d1trace - RUNTIME DESTINATION ${WRAPPER_INSTALL_DIR} COMPONENT RUNTIME - LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR} COMPONENT RUNTIME - ) - - # dwrite.dll is just an empty stub for d2d1.dll - add_library (dwritetrace MODULE dwrite.def dwritetrace.cpp) - target_link_libraries (dwritetrace d2d1trace) - set_target_properties (dwritetrace - PROPERTIES PREFIX "" - OUTPUT_NAME dwrite ) - install (TARGETS dwritetrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR}) + install (TARGETS d2d1trace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR}) endif (DirectX_D2D1_INCLUDE_DIR) # opengl32.dll diff --git a/wrappers/d2d1.def b/wrappers/d2d1trace.def index a897bf9d..a897bf9d 100644 --- a/wrappers/d2d1.def +++ b/wrappers/d2d1trace.def diff --git a/wrappers/dwrite.def b/wrappers/dwrite.def deleted file mode 100644 index 4dcdba1d..00000000 --- a/wrappers/dwrite.def +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY "d2d1" - -EXPORTS - DWriteCreateFactory diff --git a/wrappers/dwritetrace.cpp b/wrappers/dwritetrace.cpp deleted file mode 100644 index 9ca69d63..00000000 --- a/wrappers/dwritetrace.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <windows.h> - -EXTERN_C BOOL WINAPI -DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - return TRUE; -} |