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