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

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

Issue 339563005: cc: cleanup: Remove unnecessary DCHECK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "cc/animation/animation_registrar.h" 10 #include "cc/animation/animation_registrar.h"
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 void LayerImpl::DidBeginTracing() {} 1139 void LayerImpl::DidBeginTracing() {}
1140 1140
1141 void LayerImpl::ReleaseResources() {} 1141 void LayerImpl::ReleaseResources() {}
1142 1142
1143 gfx::Vector2d LayerImpl::MaxScrollOffset() const { 1143 gfx::Vector2d LayerImpl::MaxScrollOffset() const {
1144 if (!scroll_clip_layer_ || bounds().IsEmpty()) 1144 if (!scroll_clip_layer_ || bounds().IsEmpty())
1145 return gfx::Vector2d(); 1145 return gfx::Vector2d();
1146 1146
1147 LayerImpl const* page_scale_layer = layer_tree_impl()->page_scale_layer(); 1147 LayerImpl const* page_scale_layer = layer_tree_impl()->page_scale_layer();
1148 DCHECK(this != page_scale_layer); 1148 DCHECK(this != page_scale_layer);
1149 DCHECK(scroll_clip_layer_);
1150 DCHECK(this != layer_tree_impl()->InnerViewportScrollLayer() || 1149 DCHECK(this != layer_tree_impl()->InnerViewportScrollLayer() ||
1151 IsContainerForFixedPositionLayers()); 1150 IsContainerForFixedPositionLayers());
1152 1151
1153 gfx::SizeF scaled_scroll_bounds(bounds()); 1152 gfx::SizeF scaled_scroll_bounds(bounds());
1154 1153
1155 float scale_factor = 1.f; 1154 float scale_factor = 1.f;
1156 for (LayerImpl const* current_layer = this; 1155 for (LayerImpl const* current_layer = this;
1157 current_layer != scroll_clip_layer_; 1156 current_layer != scroll_clip_layer_;
1158 current_layer = current_layer->parent()) { 1157 current_layer = current_layer->parent()) {
1159 DCHECK(current_layer); 1158 DCHECK(current_layer);
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 scoped_ptr<base::Value> LayerImpl::AsValue() const { 1481 scoped_ptr<base::Value> LayerImpl::AsValue() const {
1483 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1482 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1484 AsValueInto(state.get()); 1483 AsValueInto(state.get());
1485 return state.PassAs<base::Value>(); 1484 return state.PassAs<base::Value>();
1486 } 1485 }
1487 1486
1488 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1487 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1489 benchmark->RunOnLayer(this); 1488 benchmark->RunOnLayer(this);
1490 } 1489 }
1491 } // namespace cc 1490 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698