OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |