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

Unified Diff: services/ui/surfaces/display_compositor.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/surfaces/display_compositor.h ('k') | services/ui/surfaces/display_compositor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/surfaces/display_compositor.cc
diff --git a/services/ui/surfaces/display_compositor.cc b/services/ui/surfaces/display_compositor.cc
index ea6184ebcec9eb099197657642c5e7888a19f111..80faca0ebb5369623c70dfb342871e39b7c6f830 100644
--- a/services/ui/surfaces/display_compositor.cc
+++ b/services/ui/surfaces/display_compositor.cc
@@ -251,23 +251,22 @@ const cc::SurfaceId& DisplayCompositor::GetRootSurfaceId() const {
return reference_manager_->GetRootSurfaceId();
}
-void DisplayCompositor::OnSurfaceCreated(const cc::SurfaceId& surface_id,
- const gfx::Size& frame_size,
- float device_scale_factor) {
+void DisplayCompositor::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK_GT(device_scale_factor, 0.0f);
+ DCHECK_GT(surface_info.device_scale_factor(), 0.0f);
// We can get into a situation where multiple CompositorFrames arrive for a
// CompositorFrameSink before the DisplayCompositorClient can add any
// references for the frame. When the second frame with a new size arrives,
// the first will be destroyed and then if there are no references it will be
// deleted during surface GC. A temporary reference, removed when a real
// reference is received, is added to prevent this from happening.
- reference_manager_->AddSurfaceReference(GetRootSurfaceId(), surface_id);
- temp_references_[surface_id.frame_sink_id()].push_back(
- surface_id.local_frame_id());
+ reference_manager_->AddSurfaceReference(GetRootSurfaceId(),
+ surface_info.id());
+ temp_references_[surface_info.id().frame_sink_id()].push_back(
+ surface_info.id().local_frame_id());
if (client_)
- client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor);
+ client_->OnSurfaceCreated(surface_info);
}
void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id,
« no previous file with comments | « services/ui/surfaces/display_compositor.h ('k') | services/ui/surfaces/display_compositor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698