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:
Loïc Yhuel 2010-08-24 13:46:34 -04:00
Родитель bfc60fdd41
Коммит 55608597c6
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;