| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 MarkVisibleResourcesAsRequired(); | 355 MarkVisibleResourcesAsRequired(); |
| 356 | 356 |
| 357 last_screen_space_transform_ = current_screen_space_transform; | 357 last_screen_space_transform_ = current_screen_space_transform; |
| 358 last_bounds_ = bounds(); | 358 last_bounds_ = bounds(); |
| 359 last_content_scale_ = contents_scale_x(); | 359 last_content_scale_ = contents_scale_x(); |
| 360 } | 360 } |
| 361 | 361 |
| 362 void PictureLayerImpl::DidBecomeActive() { | 362 void PictureLayerImpl::DidBecomeActive() { |
| 363 LayerImpl::DidBecomeActive(); | 363 LayerImpl::DidBecomeActive(); |
| 364 tilings_->DidBecomeActive(); | 364 tilings_->DidBecomeActive(); |
| 365 layer_tree_impl()->WillModifyTilePriorities(); |
| 365 } | 366 } |
| 366 | 367 |
| 367 void PictureLayerImpl::DidBeginTracing() { | 368 void PictureLayerImpl::DidBeginTracing() { |
| 368 pile_->DidBeginTracing(); | 369 pile_->DidBeginTracing(); |
| 369 } | 370 } |
| 370 | 371 |
| 371 void PictureLayerImpl::DidLoseOutputSurface() { | 372 void PictureLayerImpl::DidLoseOutputSurface() { |
| 372 if (tilings_) | 373 if (tilings_) |
| 373 tilings_->RemoveAllTilings(); | 374 tilings_->RemoveAllTilings(); |
| 374 | 375 |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 state->Set("tilings", tilings_->AsValue().release()); | 1022 state->Set("tilings", tilings_->AsValue().release()); |
| 1022 state->Set("pictures", pile_->AsValue().release()); | 1023 state->Set("pictures", pile_->AsValue().release()); |
| 1023 state->Set("invalidation", invalidation_.AsValue().release()); | 1024 state->Set("invalidation", invalidation_.AsValue().release()); |
| 1024 } | 1025 } |
| 1025 | 1026 |
| 1026 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { | 1027 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |
| 1027 return tilings_->GPUMemoryUsageInBytes(); | 1028 return tilings_->GPUMemoryUsageInBytes(); |
| 1028 } | 1029 } |
| 1029 | 1030 |
| 1030 } // namespace cc | 1031 } // namespace cc |
| OLD | NEW |