Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 17891002: cc: Reset tile priority before deleting tiling. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698