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 "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
8 #include "cc/output/copy_output_request.h" | 8 #include "cc/output/copy_output_request.h" |
9 #include "cc/surfaces/surface.h" | 9 #include "cc/surfaces/surface.h" |
10 #include "cc/surfaces/surface_manager.h" | 10 #include "cc/surfaces/surface_manager.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 void SurfaceFactory::RequestCopyOfSurface( | 47 void SurfaceFactory::RequestCopyOfSurface( |
48 SurfaceId surface_id, | 48 SurfaceId surface_id, |
49 scoped_ptr<CopyOutputRequest> copy_request) { | 49 scoped_ptr<CopyOutputRequest> copy_request) { |
50 OwningSurfaceMap::iterator it = surface_map_.find(surface_id); | 50 OwningSurfaceMap::iterator it = surface_map_.find(surface_id); |
51 if (it == surface_map_.end()) { | 51 if (it == surface_map_.end()) { |
52 copy_request->SendEmptyResult(); | 52 copy_request->SendEmptyResult(); |
53 return; | 53 return; |
54 } | 54 } |
55 DCHECK(it->second->factory() == this); | 55 DCHECK(it->second->factory() == this); |
56 it->second->RequestCopyOfOutput(copy_request.Pass()); | 56 it->second->RequestCopyOfOutput(copy_request.Pass()); |
| 57 manager_->SurfaceModified(surface_id); |
57 } | 58 } |
58 | 59 |
59 void SurfaceFactory::ReceiveFromChild( | 60 void SurfaceFactory::ReceiveFromChild( |
60 const TransferableResourceArray& resources) { | 61 const TransferableResourceArray& resources) { |
61 holder_.ReceiveFromChild(resources); | 62 holder_.ReceiveFromChild(resources); |
62 } | 63 } |
63 | 64 |
64 void SurfaceFactory::RefResources(const TransferableResourceArray& resources) { | 65 void SurfaceFactory::RefResources(const TransferableResourceArray& resources) { |
65 holder_.RefResources(resources); | 66 holder_.RefResources(resources); |
66 } | 67 } |
67 | 68 |
68 void SurfaceFactory::UnrefResources(const ReturnedResourceArray& resources) { | 69 void SurfaceFactory::UnrefResources(const ReturnedResourceArray& resources) { |
69 holder_.UnrefResources(resources); | 70 holder_.UnrefResources(resources); |
70 } | 71 } |
71 | 72 |
72 } // namespace cc | 73 } // namespace cc |
OLD | NEW |