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

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

Issue 1351283003: Allow task pools to reason about transparency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make StagingBuffer constructor non-explicit Created 5 years, 3 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/raster/bitmap_tile_task_worker_pool.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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 } 635 }
636 636
637 ScopedTilePtr PictureLayerImpl::CreateTile(const Tile::CreateInfo& info) { 637 ScopedTilePtr PictureLayerImpl::CreateTile(const Tile::CreateInfo& info) {
638 int flags = 0; 638 int flags = 0;
639 639
640 // We don't handle solid color masks, so we shouldn't bother analyzing those. 640 // We don't handle solid color masks, so we shouldn't bother analyzing those.
641 // Otherwise, always analyze to maximize memory savings. 641 // Otherwise, always analyze to maximize memory savings.
642 if (!is_mask_) 642 if (!is_mask_)
643 flags = Tile::USE_PICTURE_ANALYSIS; 643 flags = Tile::USE_PICTURE_ANALYSIS;
644 644
645 if (contents_opaque())
646 flags |= Tile::IS_OPAQUE;
647
645 return layer_tree_impl()->tile_manager()->CreateTile( 648 return layer_tree_impl()->tile_manager()->CreateTile(
646 info, id(), layer_tree_impl()->source_frame_number(), flags); 649 info, id(), layer_tree_impl()->source_frame_number(), flags);
647 } 650 }
648 651
649 const Region* PictureLayerImpl::GetPendingInvalidation() { 652 const Region* PictureLayerImpl::GetPendingInvalidation() {
650 if (layer_tree_impl()->IsPendingTree()) 653 if (layer_tree_impl()->IsPendingTree())
651 return &invalidation_; 654 return &invalidation_;
652 if (layer_tree_impl()->IsRecycleTree()) 655 if (layer_tree_impl()->IsRecycleTree())
653 return nullptr; 656 return nullptr;
654 DCHECK(layer_tree_impl()->IsActiveTree()); 657 DCHECK(layer_tree_impl()->IsActiveTree());
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 1246
1244 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1247 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1245 return !layer_tree_impl()->IsRecycleTree(); 1248 return !layer_tree_impl()->IsRecycleTree();
1246 } 1249 }
1247 1250
1248 bool PictureLayerImpl::HasValidTilePriorities() const { 1251 bool PictureLayerImpl::HasValidTilePriorities() const {
1249 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1252 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1250 } 1253 }
1251 1254
1252 } // namespace cc 1255 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/raster/bitmap_tile_task_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698