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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "cc/surfaces/surface.h" | 8 #include "cc/surfaces/surface.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
(...skipping 17 matching lines...) Expand all Loading... |
28 surface_map_.erase(it); | 28 surface_map_.erase(it); |
29 } | 29 } |
30 | 30 |
31 Surface* SurfaceManager::GetSurfaceForId(SurfaceId surface_id) { | 31 Surface* SurfaceManager::GetSurfaceForId(SurfaceId surface_id) { |
32 SurfaceMap::iterator it = surface_map_.find(surface_id); | 32 SurfaceMap::iterator it = surface_map_.find(surface_id); |
33 if (it == surface_map_.end()) | 33 if (it == surface_map_.end()) |
34 return NULL; | 34 return NULL; |
35 return it->second; | 35 return it->second; |
36 } | 36 } |
37 | 37 |
| 38 void SurfaceManager::SurfaceModified(SurfaceId surface_id) { |
| 39 FOR_EACH_OBSERVER( |
| 40 SurfaceDamageObserver, observer_list_, OnSurfaceDamaged(surface_id)); |
| 41 } |
| 42 |
38 } // namespace cc | 43 } // namespace cc |
OLD | NEW |