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

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

Issue 195973002: Change DCHECK_IS_ON() to DCHECK_IS_ON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 <limits> 8 #include <limits>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 1173
1174 bool PictureLayerImpl::CanHaveTilingWithScale(float contents_scale) const { 1174 bool PictureLayerImpl::CanHaveTilingWithScale(float contents_scale) const {
1175 if (!CanHaveTilings()) 1175 if (!CanHaveTilings())
1176 return false; 1176 return false;
1177 if (contents_scale < MinimumContentsScale()) 1177 if (contents_scale < MinimumContentsScale())
1178 return false; 1178 return false;
1179 return true; 1179 return true;
1180 } 1180 }
1181 1181
1182 void PictureLayerImpl::SanityCheckTilingState() const { 1182 void PictureLayerImpl::SanityCheckTilingState() const {
1183 if (!DCHECK_IS_ON()) 1183 if (!DCHECK_IS_ON)
1184 return; 1184 return;
1185 1185
1186 if (!CanHaveTilings()) { 1186 if (!CanHaveTilings()) {
1187 DCHECK_EQ(0u, tilings_->num_tilings()); 1187 DCHECK_EQ(0u, tilings_->num_tilings());
1188 return; 1188 return;
1189 } 1189 }
1190 if (tilings_->num_tilings() == 0) 1190 if (tilings_->num_tilings() == 0)
1191 return; 1191 return;
1192 1192
1193 // MarkVisibleResourcesAsRequired depends on having exactly 1 high res 1193 // MarkVisibleResourcesAsRequired depends on having exactly 1 high res
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { 1238 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
1239 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); 1239 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded();
1240 return tilings_->GPUMemoryUsageInBytes(); 1240 return tilings_->GPUMemoryUsageInBytes();
1241 } 1241 }
1242 1242
1243 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1243 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1244 benchmark->RunOnLayer(this); 1244 benchmark->RunOnLayer(this);
1245 } 1245 }
1246 1246
1247 } // namespace cc 1247 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698