| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 last_screen_space_transform_ = current_screen_space_transform; | 369 last_screen_space_transform_ = current_screen_space_transform; |
| 370 last_bounds_ = bounds(); | 370 last_bounds_ = bounds(); |
| 371 last_content_scale_ = contents_scale_x(); | 371 last_content_scale_ = contents_scale_x(); |
| 372 } | 372 } |
| 373 | 373 |
| 374 void PictureLayerImpl::DidBecomeActive() { | 374 void PictureLayerImpl::DidBecomeActive() { |
| 375 LayerImpl::DidBecomeActive(); | 375 LayerImpl::DidBecomeActive(); |
| 376 tilings_->DidBecomeActive(); | 376 tilings_->DidBecomeActive(); |
| 377 } | 377 } |
| 378 | 378 |
| 379 void PictureLayerImpl::DidBeginTracing() { |
| 380 pile_->DidBeginTracing(); |
| 381 } |
| 382 |
| 379 void PictureLayerImpl::DidLoseOutputSurface() { | 383 void PictureLayerImpl::DidLoseOutputSurface() { |
| 380 if (tilings_) | 384 if (tilings_) |
| 381 tilings_->RemoveAllTilings(); | 385 tilings_->RemoveAllTilings(); |
| 382 | 386 |
| 383 ResetRasterScale(); | 387 ResetRasterScale(); |
| 384 } | 388 } |
| 385 | 389 |
| 386 void PictureLayerImpl::CalculateContentsScale( | 390 void PictureLayerImpl::CalculateContentsScale( |
| 387 float ideal_contents_scale, | 391 float ideal_contents_scale, |
| 388 float device_scale_factor, | 392 float device_scale_factor, |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 state->Set("tilings", tilings_->AsValue().release()); | 1029 state->Set("tilings", tilings_->AsValue().release()); |
| 1026 state->Set("pictures", pile_->AsValue().release()); | 1030 state->Set("pictures", pile_->AsValue().release()); |
| 1027 state->Set("invalidation", invalidation_.AsValue().release()); | 1031 state->Set("invalidation", invalidation_.AsValue().release()); |
| 1028 } | 1032 } |
| 1029 | 1033 |
| 1030 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { | 1034 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |
| 1031 return tilings_->GPUMemoryUsageInBytes(); | 1035 return tilings_->GPUMemoryUsageInBytes(); |
| 1032 } | 1036 } |
| 1033 | 1037 |
| 1034 } // namespace cc | 1038 } // namespace cc |
| OLD | NEW |