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

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

Issue 1385733002: (not for review) nwayover (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | cc/playback/display_list_raster_source.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 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 DCHECK_IMPLIES(!raster_source->GetSize().IsEmpty(), 532 DCHECK_IMPLIES(!raster_source->GetSize().IsEmpty(),
533 bounds() == raster_source->GetSize()) 533 bounds() == raster_source->GetSize())
534 << " bounds " << bounds().ToString() << " pile " 534 << " bounds " << bounds().ToString() << " pile "
535 << raster_source->GetSize().ToString(); 535 << raster_source->GetSize().ToString();
536 536
537 // The |raster_source_| is initially null, so have to check for that for the 537 // The |raster_source_| is initially null, so have to check for that for the
538 // first frame. 538 // first frame.
539 bool could_have_tilings = raster_source_.get() && CanHaveTilings(); 539 bool could_have_tilings = raster_source_.get() && CanHaveTilings();
540 raster_source_.swap(raster_source); 540 raster_source_.swap(raster_source);
541 541
542 raster_source_->SetImageDecodeController(
543 layer_tree_impl()->tile_manager()->GetImageDecodeController());
544
542 // The |new_invalidation| must be cleared before updating tilings since they 545 // The |new_invalidation| must be cleared before updating tilings since they
543 // access the invalidation through the PictureLayerTilingClient interface. 546 // access the invalidation through the PictureLayerTilingClient interface.
544 invalidation_.Clear(); 547 invalidation_.Clear();
545 invalidation_.Swap(new_invalidation); 548 invalidation_.Swap(new_invalidation);
546 549
547 bool can_have_tilings = CanHaveTilings(); 550 bool can_have_tilings = CanHaveTilings();
548 DCHECK_IMPLIES( 551 DCHECK_IMPLIES(
549 pending_set, 552 pending_set,
550 can_have_tilings == GetPendingOrActiveTwinLayer()->CanHaveTilings()); 553 can_have_tilings == GetPendingOrActiveTwinLayer()->CanHaveTilings());
551 554
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 1266
1264 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1267 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1265 return !layer_tree_impl()->IsRecycleTree(); 1268 return !layer_tree_impl()->IsRecycleTree();
1266 } 1269 }
1267 1270
1268 bool PictureLayerImpl::HasValidTilePriorities() const { 1271 bool PictureLayerImpl::HasValidTilePriorities() const {
1269 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1272 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1270 } 1273 }
1271 1274
1272 } // namespace cc 1275 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/playback/display_list_raster_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698