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 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 void PictureLayerImpl::DidBecomeActive() { | 373 void PictureLayerImpl::DidBecomeActive() { |
374 LayerImpl::DidBecomeActive(); | 374 LayerImpl::DidBecomeActive(); |
375 tilings_->DidBecomeActive(); | 375 tilings_->DidBecomeActive(); |
376 layer_tree_impl()->DidModifyTilePriorities(); | 376 layer_tree_impl()->DidModifyTilePriorities(); |
377 } | 377 } |
378 | 378 |
379 void PictureLayerImpl::DidBeginTracing() { | 379 void PictureLayerImpl::DidBeginTracing() { |
380 pile_->DidBeginTracing(); | 380 pile_->DidBeginTracing(); |
381 } | 381 } |
382 | 382 |
383 void PictureLayerImpl::DidLoseOutputSurface() { | 383 void PictureLayerImpl::ReleaseResources() { |
384 if (tilings_) | 384 if (tilings_) |
385 RemoveAllTilings(); | 385 RemoveAllTilings(); |
386 | 386 |
387 ResetRasterScale(); | 387 ResetRasterScale(); |
388 } | 388 } |
389 | 389 |
390 void PictureLayerImpl::CalculateContentsScale( | 390 void PictureLayerImpl::CalculateContentsScale( |
391 float ideal_contents_scale, | 391 float ideal_contents_scale, |
392 float device_scale_factor, | 392 float device_scale_factor, |
393 float page_scale_factor, | 393 float page_scale_factor, |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { | 1230 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |
1231 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); | 1231 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); |
1232 return tilings_->GPUMemoryUsageInBytes(); | 1232 return tilings_->GPUMemoryUsageInBytes(); |
1233 } | 1233 } |
1234 | 1234 |
1235 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { | 1235 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { |
1236 benchmark->RunOnLayer(this); | 1236 benchmark->RunOnLayer(this); |
1237 } | 1237 } |
1238 | 1238 |
1239 } // namespace cc | 1239 } // namespace cc |
OLD | NEW |