зеркало из https://github.com/mozilla/pjs.git
Bug 589809. D2D: Fix running with PIX. r=bas
When we do "newSurf->backBuf->QueryInterface(&newSurf->surface);", PIX returns the original interface instead of the hooked one, so I swapped newSurf->backBuf and newSurf->surface, to get the two interfaces in the reverse order. In this case PIX returns hooked interfaces which will work when used as argument of hooked methods.
This commit is contained in:
Родитель
bfc60fdd41
Коммит
55608597c6
|
@ -3383,13 +3383,13 @@ cairo_d2d_surface_create_for_hwnd(cairo_device_t *cairo_device,
|
|||
}
|
||||
/** Get the backbuffer surface from the swap chain */
|
||||
hr = newSurf->dxgiChain->GetBuffer(0,
|
||||
IID_PPV_ARGS(&newSurf->backBuf));
|
||||
IID_PPV_ARGS(&newSurf->surface));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
goto FAIL_HWND;
|
||||
}
|
||||
|
||||
newSurf->backBuf->QueryInterface(&newSurf->surface);
|
||||
newSurf->surface->QueryInterface(&newSurf->backBuf);
|
||||
|
||||
size.width = sizePixels.width * dpiX;
|
||||
size.height = sizePixels.height * dpiY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче