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

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: Remove "--enable-persistent-gpu-memory-buffer" 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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer(); 682 PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer();
683 if (!twin_layer) 683 if (!twin_layer)
684 return nullptr; 684 return nullptr;
685 return twin_layer->tilings_->FindTilingWithScale(tiling->contents_scale()); 685 return twin_layer->tilings_->FindTilingWithScale(tiling->contents_scale());
686 } 686 }
687 687
688 bool PictureLayerImpl::RequiresHighResToDraw() const { 688 bool PictureLayerImpl::RequiresHighResToDraw() const {
689 return layer_tree_impl()->RequiresHighResToDraw(); 689 return layer_tree_impl()->RequiresHighResToDraw();
690 } 690 }
691 691
692 bool PictureLayerImpl::IsPartialRasterEnabled() const {
693 return layer_tree_impl()->settings().use_partial_raster;
694 }
695
692 gfx::Rect PictureLayerImpl::GetEnclosingRectInTargetSpace() const { 696 gfx::Rect PictureLayerImpl::GetEnclosingRectInTargetSpace() const {
693 return GetScaledEnclosingRectInTargetSpace(MaximumTilingContentsScale()); 697 return GetScaledEnclosingRectInTargetSpace(MaximumTilingContentsScale());
694 } 698 }
695 699
696 gfx::Size PictureLayerImpl::CalculateTileSize( 700 gfx::Size PictureLayerImpl::CalculateTileSize(
697 const gfx::Size& content_bounds) const { 701 const gfx::Size& content_bounds) const {
698 int max_texture_size = 702 int max_texture_size =
699 layer_tree_impl()->resource_provider()->max_texture_size(); 703 layer_tree_impl()->resource_provider()->max_texture_size();
700 704
701 if (is_mask_) { 705 if (is_mask_) {
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 1267
1264 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1268 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1265 return !layer_tree_impl()->IsRecycleTree(); 1269 return !layer_tree_impl()->IsRecycleTree();
1266 } 1270 }
1267 1271
1268 bool PictureLayerImpl::HasValidTilePriorities() const { 1272 bool PictureLayerImpl::HasValidTilePriorities() const {
1269 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1273 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1270 } 1274 }
1271 1275
1272 } // namespace cc 1276 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698