Loosen up checks in DDLSkSurfaceFlush

Some platforms (e.g., ANGLE & CommandBuffer) don't return GrSemaphoresSubmitted::kYes from flush

Change-Id: I0810e2ecb7f9ad1088c9450ceb5669fe690e8298
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212505
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2019-05-07 15:57:25 -04:00 committed by Skia Commit-Bot
parent f5e5f193ac
commit 8e49a69ef9

View File

@ -774,19 +774,18 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DDLSkSurfaceFlush, reporter, ctxInfo) {
s->draw(ddl.get());
GrFlushInfo flushInfo;
auto result = s->flush(SkSurface::BackendSurfaceAccess::kPresent, flushInfo);
REPORTER_ASSERT(reporter, GrSemaphoresSubmitted::kYes == result);
s->flush(SkSurface::BackendSurfaceAccess::kPresent, flushInfo);
REPORTER_ASSERT(reporter, fulfillInfo.fFulfilled);
REPORTER_ASSERT(reporter, fulfillInfo.fReleased);
if (GrBackendApi::kVulkan == context->backend()) {
if (GrBackendApi::kVulkan == context->backend() ||
GrBackendApi::kMetal == context->backend()) {
// In order to recieve the done callback with Vulkan we need to perform the equivalent
// of a glFinish
GrFlushInfo flushInfoSyncCpu;
flushInfoSyncCpu.fFlags = kSyncCpu_GrFlushFlag;
result = s->flush(SkSurface::BackendSurfaceAccess::kPresent, flushInfoSyncCpu);
REPORTER_ASSERT(reporter, GrSemaphoresSubmitted::kYes == result);
s->flush(SkSurface::BackendSurfaceAccess::kPresent, flushInfoSyncCpu);
}
REPORTER_ASSERT(reporter, fulfillInfo.fDone);