| 365 | } |
| 366 | |
| 367 | HRESULT IDXGISurface_Wrapper::Map(DXGI_MAPPED_RECT* pLockedRect, UINT MapFlags) |
| 368 | { |
| 369 | HRESULT result = {}; |
| 370 | auto& ctx = Context::GetInstance(); |
| 371 | auto callScope = ctx.IncrementCallScope(); |
| 372 | if (callScope == 1) |
| 373 | { |
| 374 | bool skipCall = PreCall<API_IDXGISURFACE_MAP>::Run(result, this, pLockedRect, MapFlags); |
| 375 | if (skipCall) |
| 376 | { |
| 377 | ctx.DecrementCallScope(); |
| 378 | return result; |
| 379 | } |
| 380 | |
| 381 | result = GetWrappedObjectAs<IDXGISurface>()->Map( |
| 382 | pLockedRect, |
| 383 | MapFlags |
| 384 | ); |
| 385 | |
| 386 | PostCall<API_IDXGISURFACE_MAP>::Run(result, this, pLockedRect, MapFlags); |
| 387 | } |
| 388 | else |
| 389 | { |
| 390 | result = GetWrappedObjectAs<IDXGISurface>()->Map(pLockedRect, MapFlags); |
| 391 | } |
| 392 | ctx.DecrementCallScope(); |
| 393 | return result; |
| 394 | } |
| 395 | |
| 396 | HRESULT IDXGISurface_Wrapper::Unmap() |
| 397 | { |
no test coverage detected