Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: gpu/ipc/service/direct_composition_surface_win_unittest.cc

Issue 2813103004: Do additional blit and Present on first draw to overlay. (Closed)
Patch Set: improve Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/service/direct_composition_surface_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/direct_composition_surface_win_unittest.cc
diff --git a/gpu/ipc/service/direct_composition_surface_win_unittest.cc b/gpu/ipc/service/direct_composition_surface_win_unittest.cc
index fcc34d84c7debc2e4abafd17f57c509cc64933df..8e6485b795231dcf49ad16077b32e29be14485ae 100644
--- a/gpu/ipc/service/direct_composition_surface_win_unittest.cc
+++ b/gpu/ipc/service/direct_composition_surface_win_unittest.cc
@@ -326,7 +326,10 @@ TEST(DirectCompositionSurfaceTest, NoPresentTwice) {
UINT last_present_count = 0;
EXPECT_TRUE(SUCCEEDED(swap_chain->GetLastPresentCount(&last_present_count)));
- EXPECT_EQ(1u, last_present_count);
+
+ // One present is normal, and a second present because it's the first frame
+ // and the other buffer needs to be drawn to.
+ EXPECT_EQ(2u, last_present_count);
surface->ScheduleDCLayer(params);
EXPECT_EQ(gfx::SwapResult::SWAP_ACK, surface->SwapBuffers());
@@ -337,7 +340,7 @@ TEST(DirectCompositionSurfaceTest, NoPresentTwice) {
// It's the same image, so it should have the same swapchain.
EXPECT_TRUE(SUCCEEDED(swap_chain->GetLastPresentCount(&last_present_count)));
- EXPECT_EQ(1u, last_present_count);
+ EXPECT_EQ(2u, last_present_count);
// The size of the swapchain changed, so it should be recreated.
ui::DCRendererLayerParams params2(false, gfx::Rect(), 1, gfx::Transform(),
« no previous file with comments | « gpu/ipc/service/direct_composition_surface_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698