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

Unified Diff: cc/layers/tiled_layer_impl.cc

Issue 353093004: cc: add DCHECKs of tile in GPUMemoryUsageInBytes and PushPropertiesTo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add |tile| DCHECKs and remove null checks in GPUMemoryUsageInBytes and PushPropertiesTo functions Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/tiled_layer_impl.cc
diff --git a/cc/layers/tiled_layer_impl.cc b/cc/layers/tiled_layer_impl.cc
index c68d9f29a784acf49809bc67c677fbfbdd38a7a2..5b932ca9f9b3985453f3135c736d31196107b4ff 100644
--- a/cc/layers/tiled_layer_impl.cc
+++ b/cc/layers/tiled_layer_impl.cc
@@ -112,7 +112,8 @@ size_t TiledLayerImpl::GPUMemoryUsageInBytes() const {
iter != tiler_->tiles().end();
++iter) {
const DrawableTile* tile = static_cast<DrawableTile*>(iter->second);
- if (!tile || !tile->resource_id())
+ DCHECK(tile);
+ if (!tile->resource_id())
continue;
amount += kMemoryUsagePerTileInBytes;
}
@@ -133,7 +134,7 @@ void TiledLayerImpl::PushPropertiesTo(LayerImpl* layer) {
int i = iter->first.first;
int j = iter->first.second;
DrawableTile* tile = static_cast<DrawableTile*>(iter->second);
-
+ DCHECK(tile);
tiled_layer->PushTileProperties(i,
j,
tile->resource_id(),
« 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