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

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

Issue 2900893002: Update scaling of video layers on every swap. (Closed)
Patch Set: Created 3 years, 7 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 f60de060b0e3212ab5c81c0039fe8698aa3155f7..432251d9b0c1759af7cdceeda43f0ec3bcc816c0 100644
--- a/gpu/ipc/service/direct_composition_surface_win_unittest.cc
+++ b/gpu/ipc/service/direct_composition_surface_win_unittest.cc
@@ -493,13 +493,25 @@ TEST_F(DirectCompositionPixelTest, VideoSwapchain) {
new gl::GLImageDXGI(texture_size, nullptr));
image_dxgi->SetTexture(texture, 0);
- ui::DCRendererLayerParams params(false, gfx::Rect(), 1, gfx::Transform(),
- image_dxgi.get(),
- gfx::RectF(gfx::Rect(texture_size)),
- gfx::Rect(window_size), 0, 0, 1.0, 0);
+ ui::DCRendererLayerParams params(
+ false, gfx::Rect(), 1, gfx::Transform(),
+ image_dxgi.get(),
+ gfx::RectF(gfx::Rect(texture_size)), gfx::Rect(texture_size), 0, 0, 1.0,
+ 0);
surface_->ScheduleDCLayer(params);
EXPECT_EQ(gfx::SwapResult::SWAP_ACK, surface_->SwapBuffers());
+
+ // Scaling up the swapchain with the same image should cause it to be
+ // transformed again, but not presented again.
+ ui::DCRendererLayerParams params2(
+ false, gfx::Rect(), 1, gfx::Transform(),
+ image_dxgi.get(),
+ gfx::RectF(gfx::Rect(texture_size)), gfx::Rect(window_size), 0, 0, 1.0,
+ 0);
+ surface_->ScheduleDCLayer(params2);
+
+ EXPECT_EQ(gfx::SwapResult::SWAP_ACK, surface_->SwapBuffers());
Sleep(1000);
SkColor expected_color = SkColorSetRGB(0xff, 0xb7, 0xff);
« 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