OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/surfaces/surface_manager.h" | 5 #include "cc/surfaces/surface_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "cc/surfaces/surface.h" | 13 #include "cc/surfaces/surface.h" |
14 #include "cc/surfaces/surface_factory_client.h" | 14 #include "cc/surfaces/surface_factory_client.h" |
15 #include "cc/surfaces/surface_id_allocator.h" | 15 #include "cc/surfaces/surface_id_allocator.h" |
16 | 16 |
17 namespace cc { | 17 namespace cc { |
18 | 18 |
19 const SurfaceId SurfaceManager::kRootSurfaceId(FrameSinkId(0u, 0u), | 19 const SurfaceId SurfaceManager::kRootSurfaceId( |
20 LocalFrameId(0u, 0u)); | 20 FrameSinkId(0u, 0u), |
| 21 LocalFrameId(0u, base::UnguessableToken::Create())); |
21 | 22 |
22 SurfaceManager::FrameSinkSourceMapping::FrameSinkSourceMapping() | 23 SurfaceManager::FrameSinkSourceMapping::FrameSinkSourceMapping() |
23 : client(nullptr), source(nullptr) {} | 24 : client(nullptr), source(nullptr) {} |
24 | 25 |
25 SurfaceManager::FrameSinkSourceMapping::FrameSinkSourceMapping( | 26 SurfaceManager::FrameSinkSourceMapping::FrameSinkSourceMapping( |
26 const FrameSinkSourceMapping& other) = default; | 27 const FrameSinkSourceMapping& other) = default; |
27 | 28 |
28 SurfaceManager::FrameSinkSourceMapping::~FrameSinkSourceMapping() { | 29 SurfaceManager::FrameSinkSourceMapping::~FrameSinkSourceMapping() { |
29 DCHECK(is_empty()) << "client: " << client | 30 DCHECK(is_empty()) << "client: " << client |
30 << ", children: " << children.size(); | 31 << ", children: " << children.size(); |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 440 |
440 void SurfaceManager::SurfaceCreated(const SurfaceId& surface_id, | 441 void SurfaceManager::SurfaceCreated(const SurfaceId& surface_id, |
441 const gfx::Size& frame_size, | 442 const gfx::Size& frame_size, |
442 float device_scale_factor) { | 443 float device_scale_factor) { |
443 CHECK(thread_checker_.CalledOnValidThread()); | 444 CHECK(thread_checker_.CalledOnValidThread()); |
444 for (auto& observer : observer_list_) | 445 for (auto& observer : observer_list_) |
445 observer.OnSurfaceCreated(surface_id, frame_size, device_scale_factor); | 446 observer.OnSurfaceCreated(surface_id, frame_size, device_scale_factor); |
446 } | 447 } |
447 | 448 |
448 } // namespace cc | 449 } // namespace cc |
OLD | NEW |