| 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 "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 DCHECK(thread_checker_.CalledOnValidThread()); | 338 DCHECK(thread_checker_.CalledOnValidThread()); |
| 339 SurfaceMap::iterator it = surface_map_.find(surface_id); | 339 SurfaceMap::iterator it = surface_map_.find(surface_id); |
| 340 if (it == surface_map_.end()) | 340 if (it == surface_map_.end()) |
| 341 return NULL; | 341 return NULL; |
| 342 return it->second; | 342 return it->second; |
| 343 } | 343 } |
| 344 | 344 |
| 345 bool SurfaceManager::SurfaceModified(const SurfaceId& surface_id) { | 345 bool SurfaceManager::SurfaceModified(const SurfaceId& surface_id) { |
| 346 CHECK(thread_checker_.CalledOnValidThread()); | 346 CHECK(thread_checker_.CalledOnValidThread()); |
| 347 bool changed = false; | 347 bool changed = false; |
| 348 FOR_EACH_OBSERVER(SurfaceDamageObserver, observer_list_, | 348 FOR_EACH_OBSERVER(SurfaceObserver, observer_list_, |
| 349 OnSurfaceDamaged(surface_id, &changed)); | 349 OnSurfaceDamaged(surface_id, &changed)); |
| 350 return changed; | 350 return changed; |
| 351 } | 351 } |
| 352 | 352 |
| 353 void SurfaceManager::SurfaceCreated(const SurfaceId& surface_id, |
| 354 const gfx::Size& frame_size, |
| 355 float device_scale_factor) { |
| 356 CHECK(thread_checker_.CalledOnValidThread()); |
| 357 FOR_EACH_OBSERVER( |
| 358 SurfaceObserver, observer_list_, |
| 359 OnSurfaceCreated(surface_id, frame_size, device_scale_factor)); |
| 360 } |
| 361 |
| 353 } // namespace cc | 362 } // namespace cc |
| OLD | NEW |