Fix D3d window context after submit change.

Change-Id: Ifec54ef7948707f0d9811bc0b865223ad02822b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291181
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
Greg Daniel 2020-05-20 17:06:52 -04:00 committed by Skia Commit-Bot
parent 9ded74e024
commit f83baf230c

View File

@ -189,6 +189,7 @@ void D3D12WindowContext::swapBuffers() {
GrFlushInfo info;
surface->flush(SkSurface::BackendSurfaceAccess::kPresent, info);
fContext->submit();
GR_D3D_CALL_ERRCHECK(fSwapChain->Present(1, 0));
@ -198,9 +199,9 @@ void D3D12WindowContext::swapBuffers() {
void D3D12WindowContext::resize(int width, int height) {
// Clean up any outstanding resources in command lists
GrFlushInfo info;
info.fFlags = kSyncCpu_GrFlushFlag;
fContext->flush(info);
fContext->flush({});
fContext->submit(true);
// release the previous surface and backbuffer resources
for (int i = 0; i < kNumFrames; ++i) {
// Let present complete