Index: cc/layers/layer.cc |
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc |
index 41fdd00fe587e37b4c18f8eceacf508a1ee15370..23f5a6b5f18bacb1f54b843bd4911de1a659d4ab 100644 |
--- a/cc/layers/layer.cc |
+++ b/cc/layers/layer.cc |
@@ -287,7 +287,7 @@ void Layer::AddChild(scoped_refptr<Layer> child) { |
} |
void Layer::InsertChild(scoped_refptr<Layer> child, size_t index) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
child->RemoveFromParent(); |
AddDrawableDescendants(child->NumDescendantsThatDrawContent() + |
(child->DrawsContent() ? 1 : 0)); |
@@ -300,7 +300,7 @@ void Layer::InsertChild(scoped_refptr<Layer> child, size_t index) { |
} |
void Layer::RemoveFromParent() { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (parent_) |
parent_->RemoveChildOrDependent(this); |
} |
@@ -337,7 +337,7 @@ void Layer::RemoveChildOrDependent(Layer* child) { |
void Layer::ReplaceChild(Layer* reference, scoped_refptr<Layer> new_layer) { |
DCHECK(reference); |
DCHECK_EQ(reference->parent(), this); |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (reference == new_layer.get()) |
return; |
@@ -359,7 +359,7 @@ void Layer::ReplaceChild(Layer* reference, scoped_refptr<Layer> new_layer) { |
} |
void Layer::SetBounds(const gfx::Size& size) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (bounds() == size) |
return; |
bounds_ = size; |
@@ -386,7 +386,7 @@ Layer* Layer::RootLayer() { |
} |
void Layer::RemoveAllChildren() { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
while (children_.size()) { |
Layer* layer = children_[0].get(); |
DCHECK_EQ(this, layer->parent()); |
@@ -395,7 +395,7 @@ void Layer::RemoveAllChildren() { |
} |
void Layer::SetChildren(const LayerList& children) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (children == children_) |
return; |
@@ -414,7 +414,7 @@ bool Layer::HasAncestor(const Layer* ancestor) const { |
void Layer::RequestCopyOfOutput( |
scoped_ptr<CopyOutputRequest> request) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
bool had_no_copy_requests = copy_requests_.empty(); |
if (void* source = request->source()) { |
auto it = std::find_if(copy_requests_.begin(), copy_requests_.end(), |
@@ -444,7 +444,7 @@ void Layer::UpdateNumCopyRequestsForSubtree(int delta) { |
} |
void Layer::SetBackgroundColor(SkColor background_color) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (background_color_ == background_color) |
return; |
background_color_ = background_color; |
@@ -471,7 +471,7 @@ SkColor Layer::SafeOpaqueBackgroundColor() const { |
} |
void Layer::SetMasksToBounds(bool masks_to_bounds) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (masks_to_bounds_ == masks_to_bounds) |
return; |
masks_to_bounds_ = masks_to_bounds; |
@@ -479,7 +479,7 @@ void Layer::SetMasksToBounds(bool masks_to_bounds) { |
} |
void Layer::SetMaskLayer(Layer* mask_layer) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (mask_layer_.get() == mask_layer) |
return; |
if (mask_layer_.get()) { |
@@ -497,7 +497,7 @@ void Layer::SetMaskLayer(Layer* mask_layer) { |
} |
void Layer::SetReplicaLayer(Layer* layer) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (replica_layer_.get() == layer) |
return; |
if (replica_layer_.get()) { |
@@ -514,7 +514,7 @@ void Layer::SetReplicaLayer(Layer* layer) { |
} |
void Layer::SetFilters(const FilterOperations& filters) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (filters_ == filters) |
return; |
filters_ = filters; |
@@ -539,7 +539,7 @@ bool Layer::HasPotentiallyRunningFilterAnimation() const { |
} |
void Layer::SetBackgroundFilters(const FilterOperations& filters) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (background_filters_ == filters) |
return; |
background_filters_ = filters; |
@@ -547,7 +547,7 @@ void Layer::SetBackgroundFilters(const FilterOperations& filters) { |
} |
void Layer::SetOpacity(float opacity) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (opacity_ == opacity) |
return; |
opacity_ = opacity; |
@@ -576,7 +576,7 @@ bool Layer::OpacityCanAnimateOnImplThread() const { |
} |
void Layer::SetBlendMode(SkXfermode::Mode blend_mode) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (blend_mode_ == blend_mode) |
return; |
@@ -625,7 +625,7 @@ void Layer::SetBlendMode(SkXfermode::Mode blend_mode) { |
} |
void Layer::SetIsRootForIsolatedGroup(bool root) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (is_root_for_isolated_group_ == root) |
return; |
is_root_for_isolated_group_ = root; |
@@ -633,7 +633,7 @@ void Layer::SetIsRootForIsolatedGroup(bool root) { |
} |
void Layer::SetContentsOpaque(bool opaque) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (contents_opaque_ == opaque) |
return; |
contents_opaque_ = opaque; |
@@ -641,7 +641,7 @@ void Layer::SetContentsOpaque(bool opaque) { |
} |
void Layer::SetPosition(const gfx::PointF& position) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (position_ == position) |
return; |
position_ = position; |
@@ -689,7 +689,7 @@ bool Are2dAxisAligned(const gfx::Transform& a, |
} |
void Layer::SetTransform(const gfx::Transform& transform) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (transform_ == transform) |
return; |
@@ -726,7 +726,7 @@ void Layer::SetTransform(const gfx::Transform& transform) { |
} |
void Layer::SetTransformOrigin(const gfx::Point3F& transform_origin) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (transform_origin_ == transform_origin) |
return; |
transform_origin_ = transform_origin; |
@@ -816,7 +816,7 @@ bool Layer::ScrollOffsetAnimationWasInterrupted() const { |
} |
void Layer::SetScrollParent(Layer* parent) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (scroll_parent_ == parent) |
return; |
@@ -846,7 +846,7 @@ void Layer::RemoveScrollChild(Layer* child) { |
} |
void Layer::SetClipParent(Layer* ancestor) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (clip_parent_ == ancestor) |
return; |
@@ -878,7 +878,7 @@ void Layer::RemoveClipChild(Layer* child) { |
} |
void Layer::SetScrollOffset(const gfx::ScrollOffset& scroll_offset) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (scroll_offset_ == scroll_offset) |
return; |
@@ -916,7 +916,7 @@ gfx::Vector2dF Layer::ScrollCompensationAdjustment() const { |
void Layer::SetScrollOffsetFromImplSide( |
const gfx::ScrollOffset& scroll_offset) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
// This function only gets called during a BeginMainFrame, so there |
// is no need to call SetNeedsUpdate here. |
DCHECK(layer_tree_host_ && layer_tree_host_->CommitRequested()); |
@@ -947,7 +947,7 @@ void Layer::SetScrollOffsetFromImplSide( |
} |
void Layer::SetScrollClipLayerId(int clip_layer_id) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (scroll_clip_layer_id_ == clip_layer_id) |
return; |
scroll_clip_layer_id_ = clip_layer_id; |
@@ -955,7 +955,7 @@ void Layer::SetScrollClipLayerId(int clip_layer_id) { |
} |
void Layer::SetUserScrollable(bool horizontal, bool vertical) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (user_scrollable_horizontal_ == horizontal && |
user_scrollable_vertical_ == vertical) |
return; |
@@ -965,7 +965,7 @@ void Layer::SetUserScrollable(bool horizontal, bool vertical) { |
} |
void Layer::SetShouldScrollOnMainThread(bool should_scroll_on_main_thread) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (should_scroll_on_main_thread_ == should_scroll_on_main_thread) |
return; |
should_scroll_on_main_thread_ = should_scroll_on_main_thread; |
@@ -973,7 +973,7 @@ void Layer::SetShouldScrollOnMainThread(bool should_scroll_on_main_thread) { |
} |
void Layer::SetHaveWheelEventHandlers(bool have_wheel_event_handlers) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (have_wheel_event_handlers_ == have_wheel_event_handlers) |
return; |
@@ -982,7 +982,7 @@ void Layer::SetHaveWheelEventHandlers(bool have_wheel_event_handlers) { |
} |
void Layer::SetHaveScrollEventHandlers(bool have_scroll_event_handlers) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (have_scroll_event_handlers_ == have_scroll_event_handlers) |
return; |
have_scroll_event_handlers_ = have_scroll_event_handlers; |
@@ -990,7 +990,7 @@ void Layer::SetHaveScrollEventHandlers(bool have_scroll_event_handlers) { |
} |
void Layer::SetNonFastScrollableRegion(const Region& region) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (non_fast_scrollable_region_ == region) |
return; |
non_fast_scrollable_region_ = region; |
@@ -998,7 +998,7 @@ void Layer::SetNonFastScrollableRegion(const Region& region) { |
} |
void Layer::SetTouchEventHandlerRegion(const Region& region) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (touch_event_handler_region_ == region) |
return; |
@@ -1007,7 +1007,7 @@ void Layer::SetTouchEventHandlerRegion(const Region& region) { |
} |
void Layer::SetScrollBlocksOn(ScrollBlocksOn scroll_blocks_on) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (scroll_blocks_on_ == scroll_blocks_on) |
return; |
scroll_blocks_on_ = scroll_blocks_on; |
@@ -1015,7 +1015,7 @@ void Layer::SetScrollBlocksOn(ScrollBlocksOn scroll_blocks_on) { |
} |
void Layer::SetForceRenderSurface(bool force) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (force_render_surface_ == force) |
return; |
force_render_surface_ = force; |
@@ -1023,7 +1023,7 @@ void Layer::SetForceRenderSurface(bool force) { |
} |
void Layer::SetDoubleSided(bool double_sided) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (double_sided_ == double_sided) |
return; |
double_sided_ = double_sided; |
@@ -1031,7 +1031,7 @@ void Layer::SetDoubleSided(bool double_sided) { |
} |
void Layer::Set3dSortingContextId(int id) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (id == sorting_context_id_) |
return; |
sorting_context_id_ = id; |
@@ -1039,7 +1039,7 @@ void Layer::Set3dSortingContextId(int id) { |
} |
void Layer::SetTransformTreeIndex(int index) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (transform_tree_index_ == index) |
return; |
transform_tree_index_ = index; |
@@ -1056,7 +1056,7 @@ int Layer::transform_tree_index() const { |
} |
void Layer::SetClipTreeIndex(int index) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (clip_tree_index_ == index) |
return; |
clip_tree_index_ = index; |
@@ -1073,7 +1073,7 @@ int Layer::clip_tree_index() const { |
} |
void Layer::SetEffectTreeIndex(int index) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (effect_tree_index_ == index) |
return; |
effect_tree_index_ = index; |
@@ -1097,7 +1097,7 @@ void Layer::InvalidatePropertyTreesIndices() { |
} |
void Layer::SetShouldFlattenTransform(bool should_flatten) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (should_flatten_transform_ == should_flatten) |
return; |
should_flatten_transform_ = should_flatten; |
@@ -1105,7 +1105,7 @@ void Layer::SetShouldFlattenTransform(bool should_flatten) { |
} |
void Layer::SetIsDrawable(bool is_drawable) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (is_drawable_ == is_drawable) |
return; |
@@ -1114,7 +1114,7 @@ void Layer::SetIsDrawable(bool is_drawable) { |
} |
void Layer::SetHideLayerAndSubtree(bool hide) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (hide_layer_and_subtree_ == hide) |
return; |
@@ -1156,7 +1156,7 @@ void Layer::SetIsContainerForFixedPositionLayers(bool container) { |
} |
void Layer::SetPositionConstraint(const LayerPositionConstraint& constraint) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (position_constraint_ == constraint) |
return; |
position_constraint_ = constraint; |
@@ -1783,7 +1783,7 @@ void Layer::SetFrameTimingRequests( |
} |
void Layer::SetElementId(uint64_t id) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (element_id_ == id) |
return; |
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), |
@@ -1793,7 +1793,7 @@ void Layer::SetElementId(uint64_t id) { |
} |
void Layer::SetMutableProperties(uint32_t properties) { |
- DCHECK(IsPropertyChangeAllowed()); |
+ CHECK(IsPropertyChangeAllowed()); |
if (mutable_properties_ == properties) |
return; |
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), |