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

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

Issue 2681183002: cc: Add flag to disable future mask tiling. (Closed)
Patch Set: Correct my mistake in rebase. Created 3 years, 10 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/layers/picture_layer.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 inputs_.mask_layer->RemoveFromParent(); 412 inputs_.mask_layer->RemoveFromParent();
413 } 413 }
414 inputs_.mask_layer = mask_layer; 414 inputs_.mask_layer = mask_layer;
415 if (inputs_.mask_layer.get()) { 415 if (inputs_.mask_layer.get()) {
416 // The mask layer should not have any children. 416 // The mask layer should not have any children.
417 DCHECK(inputs_.mask_layer->children().empty()); 417 DCHECK(inputs_.mask_layer->children().empty());
418 418
419 inputs_.mask_layer->RemoveFromParent(); 419 inputs_.mask_layer->RemoveFromParent();
420 DCHECK(!inputs_.mask_layer->parent()); 420 DCHECK(!inputs_.mask_layer->parent());
421 inputs_.mask_layer->SetParent(this); 421 inputs_.mask_layer->SetParent(this);
422 if (inputs_.filters.IsEmpty()) { 422 if (inputs_.filters.IsEmpty() &&
423 (!layer_tree_host_ ||
424 layer_tree_host_->GetSettings().enable_mask_tiling)) {
423 inputs_.mask_layer->SetLayerMaskType( 425 inputs_.mask_layer->SetLayerMaskType(
424 Layer::LayerMaskType::MULTI_TEXTURE_MASK); 426 Layer::LayerMaskType::MULTI_TEXTURE_MASK);
425 } else { 427 } else {
426 inputs_.mask_layer->SetLayerMaskType( 428 inputs_.mask_layer->SetLayerMaskType(
427 Layer::LayerMaskType::SINGLE_TEXTURE_MASK); 429 Layer::LayerMaskType::SINGLE_TEXTURE_MASK);
428 } 430 }
429 } 431 }
430 SetSubtreePropertyChanged(); 432 SetSubtreePropertyChanged();
431 SetNeedsFullTreeSync(); 433 SetNeedsFullTreeSync();
432 } 434 }
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 ->num_copy_requests_in_subtree; 1581 ->num_copy_requests_in_subtree;
1580 } 1582 }
1581 1583
1582 gfx::Transform Layer::screen_space_transform() const { 1584 gfx::Transform Layer::screen_space_transform() const {
1583 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); 1585 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId);
1584 return draw_property_utils::ScreenSpaceTransform( 1586 return draw_property_utils::ScreenSpaceTransform(
1585 this, layer_tree_host_->property_trees()->transform_tree); 1587 this, layer_tree_host_->property_trees()->transform_tree);
1586 } 1588 }
1587 1589
1588 } // namespace cc 1590 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698