-
Maxim Kolosovskiy authored
This reverts commit bd0cae50. Reason for revert: Cause failures in DirectCompositionSurfaceTest.* Builder: https://ci.chromium.org/p/chromium/builders/ci/Win10%20Debug%20%28NVIDIA%29?limit=200 First build: https://ci.chromium.org/p/chromium/builders/ci/Win10%20Debug%20%28NVIDIA%29/22377?blamelist=1#overview-tab Crash example: Test 'DirectCompositionPixelTest.DCLayersDisabled' completed with the following status(es): 'CRASH','CRASH','CRASH' Test 'DirectCompositionPixelTest.DCLayersDisabled' had the following logs when run: ================================================================================ [ RUN ] DirectCompositionPixelTest.DCLayersDisabled Received fatal exception EXCEPTION_ACCESS_VIOLATION Backtrace: RtlAcquireSRWLockExclusive [0x774C4188+24] base::internal::LockImpl::Lock [0x72EEA36A+106] (o:\base\synchronization\lock_impl_win.cc:36) base::Lock::Acquire [0x73AA4B5A+26] (o:\base\synchronization\lock.h:50) base::internal::BasicAutoLock<base::Lock>::BasicAutoLock [0x73AA4663+35] (o:\base\synchronization\lock_impl.h:84) gl::VSyncThreadWin::RemoveObserver [0x73B41033+51] (o:\ui\gl\vsync_thread_win.cc:84) gl::DirectCompositionSurfaceWin::Destroy [0x73B2089A+42] (o:\ui\gl\direct_composition_surface_win.cc:406) gl::DirectCompositionSurfaceWin::~DirectCompositionSurfaceWin [0x73B1DF75+37] (o:\ui\gl\direct_composition_surface_win.cc:185) gl::DirectCompositionSurfaceWin::~DirectCompositionSurfaceWin [0x73B217D5+37] (o:\ui\gl\direct_composition_surface_win.cc:184) base::RefCounted<gl::GLSurface,base::DefaultRefCountedTraits<gl::GLSurface> >::DeleteInternal<gl::GLSurface> [0x0137B3B2+50] (o:\base\memory\ref_counted.h:356) base::DefaultRefCountedTraits<gl::GLSurface>::Destruct [0x0137B377+23] (o:\base\memory\ref_counted.h:323) base::RefCounted<gl::GLSurface,base::DefaultRefCountedTraits<gl::GLSurface> >::Release [0x0137B351+49] (o:\base\memory\ref_counted.h:347) scoped_refptr<gl::DirectCompositionSurfaceWin>::Release [0x013BD545+21] (o:\base\memory\scoped_refptr.h:298) scoped_refptr<gl::DirectCompositionSurfaceWin>::~scoped_refptr [0x013BD525+37] (o:\base\memory\scoped_refptr.h:210) scoped_refptr<gl::DirectCompositionSurfaceWin>::operator= [0x013BD7E8+40] (o:\base\memory\scoped_refptr.h:230) scoped_refptr<gl::DirectCompositionSurfaceWin>::operator= [0x013BE275+69] (o:\base\memory\scoped_refptr.h:224) gl::`anonymous namespace'::DestroySurface [0x013BE12A+250] (o:\ui\gl\direct_composition_surface_win_unittest.cc:66) gl::`anonymous namespace'::DirectCompositionSurfaceTest::TearDown [0x013BBA1F+127] (o:\ui\gl\direct_composition_surface_win_unittest.cc:128) gl::`anonymous namespace'::DirectCompositionPixelTest::TearDown [0x013C95A3+67] (o:\ui\gl\direct_composition_surface_win_unittest.cc:602) testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void> [0x0141637B+107] (o:\third_party\googletest\src\googletest\src\gtest.cc:2507) testing::Test::Run [0x014162F1+257] (o:\third_party\googletest\src\googletest\src\gtest.cc:2532) testing::TestInfo::Run [0x01416DCD+253] (o:\third_party\googletest\src\googletest\src\gtest.cc:2701) testing::TestSuite::Run [0x01417A6D+301] (o:\third_party\googletest\src\googletest\src\gtest.cc:2827) testing::internal::UnitTestImpl::RunAllTests [0x01421415+1013] (o:\third_party\googletest\src\googletest\src\gtest.cc:5284) testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool> [0x01420FF0+112] (o:\third_party\googletest\src\googletest\src\gtest.cc:2505) testing::UnitTest::Run [0x01420E44+292] (o:\third_party\googletest\src\googletest\src\gtest.cc:4873) RUN_ALL_TESTS [0x0172FC3F+15] (o:\third_party\googletest\src\googletest\include\gtest\gtest.h:2453) base::TestSuite::Run [0x0172F26F+143] (o:\base\test\test_suite.cc:316) base::internal::FunctorTraits<int (base::TestSuite::*)() __attribute__((thiscall)),void>::Invoke<int (base::TestSuite::*)() __attribute__((thiscall)),(anonymous namespace)::GlTestSuite *> [0x013DDCBC+28] (o:\base\bind_internal.h:499) base::internal::InvokeHelper<0,int>::MakeItSo<int (base::TestSuite::*)() __attribute__((thiscall)),(anonymous namespace)::GlTestSuite *> [0x013DDC0F+79] (o:\base\bind_internal.h:599) base::internal::Invoker<base::internal::BindState<int (base::TestSuite::*)() __attribute__((thiscall)),base::internal::UnretainedWrapper<(anonymous namespace)::GlTestSuite> >,int ()>::RunImpl<int (base::TestSuite::*)() __attribute__((thiscall)),std::__1:: [0x013DDB65+85] (o:\base\bind_internal.h:672) base::internal::Invoker<base::internal::BindState<int (base::TestSuite::*)() __attribute__((thiscall)),base::internal::UnretainedWrapper<(anonymous namespace)::GlTestSuite> >,int ()>::RunOnce [0x013DDA14+84] (o:\base\bind_internal.h:641) base::OnceCallback<int ()>::Run [0x01737480+80] (o:\base\callback.h:99) base::`anonymous namespace'::LaunchUnitTestsInternal [0x01735358+440] (o:\base\test\launcher\unit_test_launcher.cc:158) base::LaunchUnitTests [0x01735168+232] (o:\base\test\launcher\unit_test_launcher.cc:354) main [0x013DC8CB+171] (o:\ui\gl\test\run_all_unittests.cc:78) invoke_main [0x01839F5E+30] (d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78) __scrt_common_main_seh [0x0183A0C7+343] (d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288) __scrt_common_main [0x0183A19D+13] (d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331) mainCRTStartup [0x0183A1A8+8] (d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17) BaseThreadInitThunk [0x740E8654+36] RtlGetAppContainerNamedObjectPath [0x774E4A77+311] RtlGetAppContainerNamedObjectPath [0x774E4A47+263] Original change's description: > gpu: Sync to primary monitor's vblank (windows) > > DWM composition is limited to primary monitor's refresh rate. Prior to > GPU vsync we would use DWM composition rate to drive begin frames. > > With GPU vsync we started using per monitor vblank to limit begin frames > in case primary monitor had higher refresh rate, but this might be > causing draw duration and omnibar latency regressions. MS platform team > also suggested syncing to primary monitor only. In any case the correct > approach would be to further limit begin frames based on event queries > from 2 frames back. > > This CL makes the GPU vsync begin frames sync to primary monitor, and > also makes the vsync thread a singleton since it doesn't have per-window > state any more. > > Bug: 953970 > Change-Id: Id3d3f043cb847172b1d6ba4bd38b087ceb2d8631 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1711215 > Reviewed-by: Zhenyao Mo <zmo@chromium.org> > Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> > Cr-Commit-Position: refs/heads/master@{#679832} TBR=zmo@chromium.org,sunnyps@chromium.org Change-Id: If4a762325952dd33283bf41a13321e759de51025 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 953970 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713510Reviewed-by:
Maxim Kolosovskiy <kolos@chromium.org> Commit-Queue: Maxim Kolosovskiy <kolos@chromium.org> Cr-Commit-Position: refs/heads/master@{#679915}
d332af51