diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 00:50:19 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 00:50:19 +0000 |
commit | bc3847a1ba39db7adec20aa9e0565f6e868e8480 (patch) | |
tree | 572eb2450ffd1bcee7f1932974f04de80c179e90 /cc/math_util.cc | |
parent | eff7a36630d6c8f86921dff9128c8be47d7c5021 (diff) | |
download | chromium_src-bc3847a1ba39db7adec20aa9e0565f6e868e8480.zip chromium_src-bc3847a1ba39db7adec20aa9e0565f6e868e8480.tar.gz chromium_src-bc3847a1ba39db7adec20aa9e0565f6e868e8480.tar.bz2 |
cc: Switch to Chromium DCHECKs LOGs
We can't compile-guard code and use DCHECK since it can be enabled at runtime.
This removes all compile-time guards, and makes use of DCHECK instead of ASSERT. We use DCHECK_IS_ON() to early out and avoid extra work just for DCHECK where possible as well.
This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo";
R=enne,jamesr
Review URL: https://chromiumcodereview.appspot.com/11048044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/math_util.cc')
-rw-r--r-- | cc/math_util.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/math_util.cc b/cc/math_util.cc index d90eb09..417e0c9 100644 --- a/cc/math_util.cc +++ b/cc/math_util.cc @@ -66,9 +66,9 @@ static HomogeneousCoordinate computeClippedPointForEdge(const HomogeneousCoordin // Once paramter t is known, the rest of p can be computed via p = (1-t) h1 + (t) h2. // Technically this is a special case of the following assertion, but its a good idea to keep it an explicit sanity check here. - ASSERT(h2.w != h1.w); + DCHECK(h2.w != h1.w); // Exactly one of h1 or h2 (but not both) must be on the negative side of the w plane when this is called. - ASSERT(h1.shouldBeClipped() ^ h2.shouldBeClipped()); + DCHECK(h1.shouldBeClipped() ^ h2.shouldBeClipped()); double w = 0.00001; // or any positive non-zero small epsilon @@ -165,7 +165,7 @@ void CCMathUtil::mapClippedQuad(const WebTransformationMatrix& transform, const if (h4.shouldBeClipped() ^ h1.shouldBeClipped()) addVertexToClippedQuad(computeClippedPointForEdge(h4, h1).cartesianPoint2d(), clippedQuad, numVerticesInClippedQuad); - ASSERT(numVerticesInClippedQuad <= 8); + DCHECK(numVerticesInClippedQuad <= 8); } FloatRect CCMathUtil::computeEnclosingRectOfVertices(FloatPoint vertices[], int numVertices) |