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