Jeffrey Smith (@whydoubt) commented about dlls/d3drm/tests/d3drm.c:
ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color); CHECK_REFCOUNT(frame1, 1);
- hr = IDirect3DRMViewport_Render(viewport1, frame1);
- ok(SUCCEEDED(hr), "Cannot Render, hr %#lx\n", hr);
- ret_color = get_surface_color(surface, 320, 240);
- ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color);
If the goal is to show that Render does not perform its own clear, I think _one_ of the following approaches would be better: 1) Move the Render above the Clear and compare_color with the original surface color, _OR_ 2) Set the scene background to a different color after Clear but before the Render.
I slightly prefer 1, FWIW.