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

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

Issue 2610723002: Unify SurfaceInfo (Closed)
Patch Set: Cleanup offscreen canvas Created 3 years, 12 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/server_window_compositor_frame_sink_manager.h ('k') | services/ui/ws/test_change_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/server_window_compositor_frame_sink_manager.cc
diff --git a/services/ui/ws/server_window_compositor_frame_sink_manager.cc b/services/ui/ws/server_window_compositor_frame_sink_manager.cc
index d1014ea5daeadbb9d5f1da1dce8c28b1d259cb10..7480c7f1fcf9ffc4c5cd64b2ff239379df5a45de 100644
--- a/services/ui/ws/server_window_compositor_frame_sink_manager.cc
+++ b/services/ui/ws/server_window_compositor_frame_sink_manager.cc
@@ -94,7 +94,7 @@ gfx::Size ServerWindowCompositorFrameSinkManager::GetLatestFrameSize(
if (it == type_to_compositor_frame_sink_map_.end())
return gfx::Size();
- return it->second.latest_submitted_frame_size;
+ return it->second.latest_submitted_surface_info.size_in_pixels();
}
cc::SurfaceId ServerWindowCompositorFrameSinkManager::GetLatestSurfaceId(
@@ -103,16 +103,14 @@ cc::SurfaceId ServerWindowCompositorFrameSinkManager::GetLatestSurfaceId(
if (it == type_to_compositor_frame_sink_map_.end())
return cc::SurfaceId();
- return it->second.latest_submitted_surface_id;
+ return it->second.latest_submitted_surface_info.id();
}
void ServerWindowCompositorFrameSinkManager::SetLatestSurfaceInfo(
mojom::CompositorFrameSinkType type,
- const cc::SurfaceId& surface_id,
- const gfx::Size& frame_size) {
+ const cc::SurfaceInfo& surface_info) {
CompositorFrameSinkData& data = type_to_compositor_frame_sink_map_[type];
- data.latest_submitted_surface_id = surface_id;
- data.latest_submitted_frame_size = frame_size;
+ data.latest_submitted_surface_info = surface_info;
}
void ServerWindowCompositorFrameSinkManager::OnRootChanged(
@@ -136,10 +134,10 @@ bool ServerWindowCompositorFrameSinkManager::
auto iter = type_to_compositor_frame_sink_map_.find(type);
if (iter == type_to_compositor_frame_sink_map_.end())
return false;
- if (iter->second.latest_submitted_frame_size.IsEmpty())
+ if (iter->second.latest_submitted_surface_info.size_in_pixels().IsEmpty())
return false;
const gfx::Size& latest_submitted_frame_size =
- iter->second.latest_submitted_frame_size;
+ iter->second.latest_submitted_surface_info.size_in_pixels();
return latest_submitted_frame_size.width() >= window_->bounds().width() &&
latest_submitted_frame_size.height() >= window_->bounds().height();
}
@@ -196,12 +194,12 @@ CompositorFrameSinkData::~CompositorFrameSinkData() {}
CompositorFrameSinkData::CompositorFrameSinkData(
CompositorFrameSinkData&& other)
- : latest_submitted_surface_id(other.latest_submitted_surface_id),
+ : latest_submitted_surface_info(other.latest_submitted_surface_info),
compositor_frame_sink(std::move(other.compositor_frame_sink)) {}
CompositorFrameSinkData& CompositorFrameSinkData::operator=(
CompositorFrameSinkData&& other) {
- latest_submitted_surface_id = other.latest_submitted_surface_id;
+ latest_submitted_surface_info = other.latest_submitted_surface_info;
compositor_frame_sink = std::move(other.compositor_frame_sink);
return *this;
}
« no previous file with comments | « services/ui/ws/server_window_compositor_frame_sink_manager.h ('k') | services/ui/ws/test_change_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698