summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorhyunki.baik@samsung.com <hyunki.baik@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-09 18:42:41 +0000
committerhyunki.baik@samsung.com <hyunki.baik@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-09 18:42:41 +0000
commit9688dc90122d9ac4148a9effc673bb42caa4b99d (patch)
tree99f9fd37114d16a00efa68ce6794c6bbb2ce0d69 /cc
parent62f1b330abbc6a8a71a823b41350bbb65115ac1e (diff)
downloadchromium_src-9688dc90122d9ac4148a9effc673bb42caa4b99d.zip
chromium_src-9688dc90122d9ac4148a9effc673bb42caa4b99d.tar.gz
chromium_src-9688dc90122d9ac4148a9effc673bb42caa4b99d.tar.bz2
cc: add DCHECKs of tile in GPUMemoryUsageInBytes and PushPropertiesTo
BUG=None Review URL: https://codereview.chromium.org/353093004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/layers/tiled_layer_impl.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/layers/tiled_layer_impl.cc b/cc/layers/tiled_layer_impl.cc
index c68d9f2..5b932ca 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(),