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

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

Issue 1418573002: cc: Add image decode control in the compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 // Only set the image decode controller when we're committing.
543 if (!pending_set) {
544 raster_source_->SetImageDecodeController(
545 layer_tree_impl()->tile_manager()->GetImageDecodeController());
546 }
547
542 // The |new_invalidation| must be cleared before updating tilings since they 548 // The |new_invalidation| must be cleared before updating tilings since they
543 // access the invalidation through the PictureLayerTilingClient interface. 549 // access the invalidation through the PictureLayerTilingClient interface.
544 invalidation_.Clear(); 550 invalidation_.Clear();
545 invalidation_.Swap(new_invalidation); 551 invalidation_.Swap(new_invalidation);
546 552
547 bool can_have_tilings = CanHaveTilings(); 553 bool can_have_tilings = CanHaveTilings();
548 DCHECK_IMPLIES( 554 DCHECK_IMPLIES(
549 pending_set, 555 pending_set,
550 can_have_tilings == GetPendingOrActiveTwinLayer()->CanHaveTilings()); 556 can_have_tilings == GetPendingOrActiveTwinLayer()->CanHaveTilings());
551 557
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 1269
1264 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1270 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1265 return !layer_tree_impl()->IsRecycleTree(); 1271 return !layer_tree_impl()->IsRecycleTree();
1266 } 1272 }
1267 1273
1268 bool PictureLayerImpl::HasValidTilePriorities() const { 1274 bool PictureLayerImpl::HasValidTilePriorities() const {
1269 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1275 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1270 } 1276 }
1271 1277
1272 } // namespace cc 1278 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/playback/display_list_raster_source.h » ('j') | cc/playback/display_list_raster_source.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698