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

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

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Improve with comment in patch 18. Created 3 years, 4 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/layer_impl.h" 5 #include "cc/layers/layer_impl.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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 if (transform_node && transform_node->transform_changed) 418 if (transform_node && transform_node->transform_changed)
419 return true; 419 return true;
420 if (effect_tree_index() == EffectTree::kInvalidNodeId) 420 if (effect_tree_index() == EffectTree::kInvalidNodeId)
421 return false; 421 return false;
422 EffectNode* effect_node = GetEffectTree().Node(effect_tree_index()); 422 EffectNode* effect_node = GetEffectTree().Node(effect_tree_index());
423 if (effect_node && effect_node->effect_changed) 423 if (effect_node && effect_node->effect_changed)
424 return true; 424 return true;
425 return false; 425 return false;
426 } 426 }
427 427
428 bool LayerImpl::LayerPropertyChangedNotFromPropertyTrees() const {
429 return layer_property_changed_;
430 }
431
428 void LayerImpl::NoteLayerPropertyChanged() { 432 void LayerImpl::NoteLayerPropertyChanged() {
429 layer_property_changed_ = true; 433 layer_property_changed_ = true;
430 layer_tree_impl()->set_needs_update_draw_properties(); 434 layer_tree_impl()->set_needs_update_draw_properties();
431 SetNeedsPushProperties(); 435 SetNeedsPushProperties();
432 } 436 }
433 437
434 void LayerImpl::ValidateQuadResourcesInternal(DrawQuad* quad) const { 438 void LayerImpl::ValidateQuadResourcesInternal(DrawQuad* quad) const {
435 #if DCHECK_IS_ON() 439 #if DCHECK_IS_ON()
436 const ResourceProvider* resource_provider = 440 const ResourceProvider* resource_provider =
437 layer_tree_impl_->resource_provider(); 441 layer_tree_impl_->resource_provider();
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 } 964 }
961 965
962 void LayerImpl::EnsureValidPropertyTreeIndices() const { 966 void LayerImpl::EnsureValidPropertyTreeIndices() const {
963 DCHECK(GetTransformTree().Node(transform_tree_index())); 967 DCHECK(GetTransformTree().Node(transform_tree_index()));
964 DCHECK(GetEffectTree().Node(effect_tree_index())); 968 DCHECK(GetEffectTree().Node(effect_tree_index()));
965 DCHECK(GetClipTree().Node(clip_tree_index())); 969 DCHECK(GetClipTree().Node(clip_tree_index()));
966 DCHECK(GetScrollTree().Node(scroll_tree_index())); 970 DCHECK(GetScrollTree().Node(scroll_tree_index()));
967 } 971 }
968 972
969 } // namespace cc 973 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698