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

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

Issue 1381163002: Add a flag to disable partial raster in renderer (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
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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer(); 665 PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer();
666 if (!twin_layer) 666 if (!twin_layer)
667 return nullptr; 667 return nullptr;
668 return twin_layer->tilings_->FindTilingWithScale(tiling->contents_scale()); 668 return twin_layer->tilings_->FindTilingWithScale(tiling->contents_scale());
669 } 669 }
670 670
671 bool PictureLayerImpl::RequiresHighResToDraw() const { 671 bool PictureLayerImpl::RequiresHighResToDraw() const {
672 return layer_tree_impl()->RequiresHighResToDraw(); 672 return layer_tree_impl()->RequiresHighResToDraw();
673 } 673 }
674 674
675 bool PictureLayerImpl::EnablePartialRaster() const {
676 return layer_tree_impl()->settings().enable_partial_raster;
677 }
678
675 gfx::Rect PictureLayerImpl::GetEnclosingRectInTargetSpace() const { 679 gfx::Rect PictureLayerImpl::GetEnclosingRectInTargetSpace() const {
676 return GetScaledEnclosingRectInTargetSpace(MaximumTilingContentsScale()); 680 return GetScaledEnclosingRectInTargetSpace(MaximumTilingContentsScale());
677 } 681 }
678 682
679 gfx::Size PictureLayerImpl::CalculateTileSize( 683 gfx::Size PictureLayerImpl::CalculateTileSize(
680 const gfx::Size& content_bounds) const { 684 const gfx::Size& content_bounds) const {
681 int max_texture_size = 685 int max_texture_size =
682 layer_tree_impl()->resource_provider()->max_texture_size(); 686 layer_tree_impl()->resource_provider()->max_texture_size();
683 687
684 if (is_mask_) { 688 if (is_mask_) {
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1250
1247 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1251 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1248 return !layer_tree_impl()->IsRecycleTree(); 1252 return !layer_tree_impl()->IsRecycleTree();
1249 } 1253 }
1250 1254
1251 bool PictureLayerImpl::HasValidTilePriorities() const { 1255 bool PictureLayerImpl::HasValidTilePriorities() const {
1252 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1256 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1253 } 1257 }
1254 1258
1255 } // namespace cc 1259 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698