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_factory.h" | 5 #include "cc/surfaces/surface_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
| 9 #include "base/memory/ptr_util.h" |
9 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
10 #include "cc/output/compositor_frame.h" | 11 #include "cc/output/compositor_frame.h" |
11 #include "cc/output/copy_output_request.h" | 12 #include "cc/output/copy_output_request.h" |
12 #include "cc/surfaces/surface.h" | 13 #include "cc/surfaces/surface.h" |
13 #include "cc/surfaces/surface_factory_client.h" | 14 #include "cc/surfaces/surface_factory_client.h" |
14 #include "cc/surfaces/surface_manager.h" | 15 #include "cc/surfaces/surface_manager.h" |
15 #include "ui/gfx/geometry/size.h" | 16 #include "ui/gfx/geometry/size.h" |
16 | 17 |
17 namespace cc { | 18 namespace cc { |
18 SurfaceFactory::SurfaceFactory(const FrameSinkId& frame_sink_id, | 19 SurfaceFactory::SurfaceFactory(const FrameSinkId& frame_sink_id, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 manager_->RegisterSurface(surface.get()); | 125 manager_->RegisterSurface(surface.get()); |
125 return surface; | 126 return surface; |
126 } | 127 } |
127 | 128 |
128 void SurfaceFactory::Destroy(std::unique_ptr<Surface> surface) { | 129 void SurfaceFactory::Destroy(std::unique_ptr<Surface> surface) { |
129 if (manager_) | 130 if (manager_) |
130 manager_->Destroy(std::move(surface)); | 131 manager_->Destroy(std::move(surface)); |
131 } | 132 } |
132 | 133 |
133 } // namespace cc | 134 } // namespace cc |
OLD | NEW |