| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 last_screen_space_transform_ = current_screen_space_transform; | 368 last_screen_space_transform_ = current_screen_space_transform; |
| 369 last_bounds_ = bounds(); | 369 last_bounds_ = bounds(); |
| 370 last_content_scale_ = contents_scale_x(); | 370 last_content_scale_ = contents_scale_x(); |
| 371 } | 371 } |
| 372 | 372 |
| 373 void PictureLayerImpl::DidBecomeActive() { | 373 void PictureLayerImpl::DidBecomeActive() { |
| 374 LayerImpl::DidBecomeActive(); | 374 LayerImpl::DidBecomeActive(); |
| 375 tilings_->DidBecomeActive(); | 375 tilings_->DidBecomeActive(); |
| 376 } | 376 } |
| 377 | 377 |
| 378 void PictureLayerImpl::DidBeginTracing() { |
| 379 pile_->DidBeginTracing(); |
| 380 } |
| 381 |
| 378 void PictureLayerImpl::DidLoseOutputSurface() { | 382 void PictureLayerImpl::DidLoseOutputSurface() { |
| 379 if (tilings_) | 383 if (tilings_) |
| 380 tilings_->RemoveAllTilings(); | 384 tilings_->RemoveAllTilings(); |
| 381 | 385 |
| 382 ResetRasterScale(); | 386 ResetRasterScale(); |
| 383 } | 387 } |
| 384 | 388 |
| 385 void PictureLayerImpl::CalculateContentsScale( | 389 void PictureLayerImpl::CalculateContentsScale( |
| 386 float ideal_contents_scale, | 390 float ideal_contents_scale, |
| 387 float device_scale_factor, | 391 float device_scale_factor, |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 state->Set("tilings", tilings_->AsValue().release()); | 1018 state->Set("tilings", tilings_->AsValue().release()); |
| 1015 state->Set("pictures", pile_->AsValue().release()); | 1019 state->Set("pictures", pile_->AsValue().release()); |
| 1016 state->Set("invalidation", invalidation_.AsValue().release()); | 1020 state->Set("invalidation", invalidation_.AsValue().release()); |
| 1017 } | 1021 } |
| 1018 | 1022 |
| 1019 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { | 1023 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |
| 1020 return tilings_->GPUMemoryUsageInBytes(); | 1024 return tilings_->GPUMemoryUsageInBytes(); |
| 1021 } | 1025 } |
| 1022 | 1026 |
| 1023 } // namespace cc | 1027 } // namespace cc |
| OLD | NEW |