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.h" | 5 #include "cc/surfaces/surface.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 | 11 |
12 #include "cc/base/container_util.h" | 12 #include "cc/base/container_util.h" |
13 #include "cc/output/compositor_frame.h" | 13 #include "cc/output/compositor_frame.h" |
14 #include "cc/output/copy_output_request.h" | 14 #include "cc/output/copy_output_request.h" |
| 15 #include "cc/surfaces/local_surface_id_allocator.h" |
15 #include "cc/surfaces/pending_frame_observer.h" | 16 #include "cc/surfaces/pending_frame_observer.h" |
16 #include "cc/surfaces/surface_factory.h" | 17 #include "cc/surfaces/surface_factory.h" |
17 #include "cc/surfaces/surface_id_allocator.h" | |
18 #include "cc/surfaces/surface_manager.h" | 18 #include "cc/surfaces/surface_manager.h" |
19 | 19 |
20 namespace cc { | 20 namespace cc { |
21 | 21 |
22 // The frame index starts at 2 so that empty frames will be treated as | 22 // The frame index starts at 2 so that empty frames will be treated as |
23 // completely damaged the first time they're drawn from. | 23 // completely damaged the first time they're drawn from. |
24 static const int kFrameIndexStart = 2; | 24 static const int kFrameIndexStart = 2; |
25 | 25 |
26 Surface::Surface(const SurfaceId& id, base::WeakPtr<SurfaceFactory> factory) | 26 Surface::Surface(const SurfaceId& id, base::WeakPtr<SurfaceFactory> factory) |
27 : surface_id_(id), | 27 : surface_id_(id), |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 void Surface::ClearCopyRequests() { | 314 void Surface::ClearCopyRequests() { |
315 if (active_frame_) { | 315 if (active_frame_) { |
316 for (const auto& render_pass : active_frame_->render_pass_list) { | 316 for (const auto& render_pass : active_frame_->render_pass_list) { |
317 for (const auto& copy_request : render_pass->copy_requests) | 317 for (const auto& copy_request : render_pass->copy_requests) |
318 copy_request->SendEmptyResult(); | 318 copy_request->SendEmptyResult(); |
319 } | 319 } |
320 } | 320 } |
321 } | 321 } |
322 | 322 |
323 } // namespace cc | 323 } // namespace cc |
OLD | NEW |