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

Side by Side Diff: services/ui/surfaces/display_compositor.cc

Issue 2424633002: Revert of Mus+Ash: propagate Surface ID to parents (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/surfaces/display_compositor.h" 5 #include "services/ui/surfaces/display_compositor.h"
6 6
7 #include "services/ui/surfaces/display_compositor_client.h"
8
9 namespace ui { 7 namespace ui {
10 8
11 DisplayCompositor::DisplayCompositor(DisplayCompositorClient* client) 9 DisplayCompositor::DisplayCompositor() : next_client_id_(1u) {}
12 : client_(client), next_client_id_(1u) { 10
13 manager_.AddObserver(this); 11 DisplayCompositor::~DisplayCompositor() {}
14 }
15 12
16 uint32_t DisplayCompositor::GenerateNextClientId() { 13 uint32_t DisplayCompositor::GenerateNextClientId() {
17 return next_client_id_++; 14 return next_client_id_++;
18 } 15 }
19 16
20 void DisplayCompositor::ReturnSurfaceReference(
21 const cc::SurfaceSequence& sequence) {
22 std::vector<uint32_t> sequences;
23 sequences.push_back(sequence.sequence);
24 manager_.DidSatisfySequences(sequence.frame_sink_id, &sequences);
25 }
26
27 DisplayCompositor::~DisplayCompositor() {
28 manager_.RemoveObserver(this);
29 }
30
31 void DisplayCompositor::OnSurfaceCreated(const cc::SurfaceId& surface_id,
32 const gfx::Size& frame_size,
33 float device_scale_factor) {
34 if (client_)
35 client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor);
36 }
37
38 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id,
39 bool* changed) {}
40
41 } // namespace ui 17 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_compositor.h ('k') | services/ui/surfaces/display_compositor_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698