| 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/time.h" | 9 #include "base/time/time.h" |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 pile_.get(), | 448 pile_.get(), |
| 449 content_rect.size(), | 449 content_rect.size(), |
| 450 content_rect, | 450 content_rect, |
| 451 contents_opaque() ? content_rect : gfx::Rect(), | 451 contents_opaque() ? content_rect : gfx::Rect(), |
| 452 tiling->contents_scale(), | 452 tiling->contents_scale(), |
| 453 id(), | 453 id(), |
| 454 layer_tree_impl()->source_frame_number(), | 454 layer_tree_impl()->source_frame_number(), |
| 455 is_using_lcd_text_)); | 455 is_using_lcd_text_)); |
| 456 } | 456 } |
| 457 | 457 |
| 458 void PictureLayerImpl::DestroyTile(Tile* tile) { | |
| 459 WhichTree tree = | |
| 460 layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; | |
| 461 tile->SetPriority(tree, TilePriority()); | |
| 462 } | |
| 463 | |
| 464 void PictureLayerImpl::UpdatePile(Tile* tile) { | 458 void PictureLayerImpl::UpdatePile(Tile* tile) { |
| 465 tile->set_picture_pile(pile_); | 459 tile->set_picture_pile(pile_); |
| 466 } | 460 } |
| 467 | 461 |
| 468 const Region* PictureLayerImpl::GetInvalidation() { | 462 const Region* PictureLayerImpl::GetInvalidation() { |
| 469 return &invalidation_; | 463 return &invalidation_; |
| 470 } | 464 } |
| 471 | 465 |
| 472 const PictureLayerTiling* PictureLayerImpl::GetTwinTiling( | 466 const PictureLayerTiling* PictureLayerImpl::GetTwinTiling( |
| 473 const PictureLayerTiling* tiling) { | 467 const PictureLayerTiling* tiling) { |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 state->Set("tilings", tilings_->AsValue().release()); | 1015 state->Set("tilings", tilings_->AsValue().release()); |
| 1022 state->Set("pictures", pile_->AsValue().release()); | 1016 state->Set("pictures", pile_->AsValue().release()); |
| 1023 state->Set("invalidation", invalidation_.AsValue().release()); | 1017 state->Set("invalidation", invalidation_.AsValue().release()); |
| 1024 } | 1018 } |
| 1025 | 1019 |
| 1026 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { | 1020 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |
| 1027 return tilings_->GPUMemoryUsageInBytes(); | 1021 return tilings_->GPUMemoryUsageInBytes(); |
| 1028 } | 1022 } |
| 1029 | 1023 |
| 1030 } // namespace cc | 1024 } // namespace cc |
| OLD | NEW |