summaryrefslogtreecommitdiffstats
path: root/cc/layer_tiling_data.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 18:15:04 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 18:15:04 +0000
commit1d99317a73040007668b1cdf134334f45d45600e (patch)
tree0da28120111aa69a339ec90ff05d7cac8b21cf77 /cc/layer_tiling_data.cc
parent52f1a7e63128f2a4f644e1a28a6744b916585999 (diff)
downloadchromium_src-1d99317a73040007668b1cdf134334f45d45600e.zip
chromium_src-1d99317a73040007668b1cdf134334f45d45600e.tar.gz
chromium_src-1d99317a73040007668b1cdf134334f45d45600e.tar.bz2
cc: Switch to Chromium DCHECKs LOGs
We can't compile-guard code and use DCHECK since it can be enabled at runtime. So we guard the DCHECKs that we want to rely on conditionally-compiled code in !NDEBUG compile guards. This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo"; This was previously discussed and committed as https://codereview.chromium.org/11048044/ using a guard based on LOGGING_IS_OFFICIAL_BUILD, however this was not sufficient since there are build configurations that are official builds but have dchecks compiled. R=enne Review URL: https://codereview.chromium.org/11192030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_tiling_data.cc')
-rw-r--r--cc/layer_tiling_data.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/cc/layer_tiling_data.cc b/cc/layer_tiling_data.cc
index 2e6eaab..63750b1 100644
--- a/cc/layer_tiling_data.cc
+++ b/cc/layer_tiling_data.cc
@@ -7,6 +7,8 @@
#include "CCLayerTilingData.h"
+#include "base/logging.h"
+
using namespace std;
namespace cc {
@@ -60,7 +62,7 @@ const CCLayerTilingData& CCLayerTilingData::operator=(const CCLayerTilingData& t
void CCLayerTilingData::addTile(scoped_ptr<Tile> tile, int i, int j)
{
- ASSERT(!tileAt(i, j));
+ DCHECK(!tileAt(i, j));
tile->moveTo(i, j);
m_tiles.add(make_pair(i, j), tile.Pass());
}
@@ -85,7 +87,7 @@ void CCLayerTilingData::contentRectToTileIndices(const IntRect& contentRect, int
// An empty rect doesn't result in an empty set of tiles, so don't pass an empty rect.
// FIXME: Possibly we should fill a vector of tiles instead,
// since the normal use of this function is to enumerate some tiles.
- ASSERT(!contentRect.isEmpty());
+ DCHECK(!contentRect.isEmpty());
left = m_tilingData.tileXIndexFromSrcCoord(contentRect.x());
top = m_tilingData.tileYIndexFromSrcCoord(contentRect.y());