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/display.h" | 5 #include "cc/surfaces/display.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
405 scheduler_->SurfaceDamaged(surface_id); | 405 scheduler_->SurfaceDamaged(surface_id); |
406 *changed = true; | 406 *changed = true; |
407 } | 407 } |
408 | 408 |
409 if (surface_id == current_surface_id_) | 409 if (surface_id == current_surface_id_) |
410 UpdateRootSurfaceResourcesLocked(); | 410 UpdateRootSurfaceResourcesLocked(); |
411 } | 411 } |
412 | 412 |
413 void Display::OnSurfaceCreated(const SurfaceInfo& surface_info) {} | 413 void Display::OnSurfaceCreated(const SurfaceInfo& surface_info) {} |
414 | 414 |
415 void Display::OnSurfaceDiscarded(const SurfaceId& surface_id) { | |
jbauman
2017/05/19 21:07:37
Add if (agggregator_) check.
| |
416 aggregator_->ReleaseResources(surface_id); | |
417 } | |
418 | |
415 const SurfaceId& Display::CurrentSurfaceId() { | 419 const SurfaceId& Display::CurrentSurfaceId() { |
416 return current_surface_id_; | 420 return current_surface_id_; |
417 } | 421 } |
418 | 422 |
419 void Display::ForceImmediateDrawAndSwapIfPossible() { | 423 void Display::ForceImmediateDrawAndSwapIfPossible() { |
420 if (scheduler_) | 424 if (scheduler_) |
421 scheduler_->ForceImmediateSwapIfPossible(); | 425 scheduler_->ForceImmediateSwapIfPossible(); |
422 } | 426 } |
423 | 427 |
424 } // namespace cc | 428 } // namespace cc |
OLD | NEW |