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

Unified Diff: services/ui/ws/window_server_test_impl.cc

Issue 2711043002: Remove latest_submitted_surface_info (Closed)
Patch Set: Remove latest_submitted_surface_info Created 3 years, 10 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 | « services/ui/ws/window_server.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server_test_impl.cc
diff --git a/services/ui/ws/window_server_test_impl.cc b/services/ui/ws/window_server_test_impl.cc
index ff5e7414560478cd4f051eb3252c81aca880fa02..20bc295c323a9dc0c30776295bcc7b0f25cad68d 100644
--- a/services/ui/ws/window_server_test_impl.cc
+++ b/services/ui/ws/window_server_test_impl.cc
@@ -13,16 +13,6 @@
namespace ui {
namespace ws {
-namespace {
-
-bool WindowHasValidFrame(const ServerWindow* window) {
- const ServerWindowCompositorFrameSinkManager* manager =
- window->compositor_frame_sink_manager();
- return manager && !manager->GetLatestFrameSize().IsEmpty();
-}
-
-} // namespace
-
WindowServerTestImpl::WindowServerTestImpl(WindowServer* window_server)
: window_server_(window_server) {}
@@ -35,7 +25,7 @@ void WindowServerTestImpl::OnWindowPaint(
WindowTree* tree = window_server_->GetTreeWithClientName(name);
if (!tree)
return;
- if (tree->HasRoot(window) && WindowHasValidFrame(window)) {
+ if (tree->HasRoot(window) && window->compositor_frame_sink_manager()) {
cb.Run(true);
window_server_->SetPaintCallback(base::Callback<void(ServerWindow*)>());
}
@@ -47,7 +37,7 @@ void WindowServerTestImpl::EnsureClientHasDrawnWindow(
WindowTree* tree = window_server_->GetTreeWithClientName(client_name);
if (tree) {
for (const ServerWindow* window : tree->roots()) {
- if (WindowHasValidFrame(window)) {
+ if (window->compositor_frame_sink_manager()) {
callback.Run(true);
return;
}
« no previous file with comments | « services/ui/ws/window_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698