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

Unified Diff: cc/tiled_layer.cc

Issue 11410021: Remove WTF and WebCore from cc/ and webkit/compositor_bindings/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
Index: cc/tiled_layer.cc
diff --git a/cc/tiled_layer.cc b/cc/tiled_layer.cc
index b152bfae6468790570d37005a8b21df8ece6e1d7..6e0c4b443e785a913948192abf64f55751202be6 100644
--- a/cc/tiled_layer.cc
+++ b/cc/tiled_layer.cc
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "config.h"
-
#include "cc/tiled_layer.h"
#include "base/basictypes.h"
+#include "build/build_config.h"
#include "cc/geometry.h"
#include "cc/layer_impl.h"
#include "cc/layer_tree_host.h"
@@ -261,10 +260,8 @@ UpdatableTile* TiledLayer::createTile(int i, int j)
addedTile->dirtyRect = m_tiler->tileRect(addedTile);
// Temporary diagnostic crash.
- if (!addedTile)
- CRASH();
- if (!tileAt(i, j))
- CRASH();
+ CHECK(addedTile);
+ CHECK(tileAt(i, j));
return addedTile;
}
@@ -280,7 +277,7 @@ void TiledLayer::setUseLCDText(bool useLCDText)
ContentsScalingLayer::setUseLCDText(useLCDText);
LayerTilingData::BorderTexelOption borderTexelOption;
-#if OS(ANDROID)
+#if defined(OS_ANDROID)
// Always want border texels and GL_LINEAR due to pinch zoom.
borderTexelOption = LayerTilingData::HasBorderTexels;
#else
@@ -490,21 +487,15 @@ void TiledLayer::updateTileTextures(const gfx::Rect& paintRect, int left, int to
// Calculate tile-space rectangle to upload into.
gfx::Vector2d destOffset = sourceRect.origin() - anchor;
- if (destOffset.x() < 0)
- CRASH();
- if (destOffset.y() < 0)
- CRASH();
+ CHECK(destOffset.x() >= 0);
+ CHECK(destOffset.y() >= 0);
// Offset from paint rectangle to this tile's dirty rectangle.
gfx::Vector2d paintOffset = sourceRect.origin() - paintRect.origin();
- if (paintOffset.x() < 0)
- CRASH();
- if (paintOffset.y() < 0)
- CRASH();
- if (paintOffset.x() + sourceRect.width() > paintRect.width())
- CRASH();
- if (paintOffset.y() + sourceRect.height() > paintRect.height())
- CRASH();
+ CHECK(paintOffset.x() >= 0);
+ CHECK(paintOffset.y() >= 0);
+ CHECK(paintOffset.x() + sourceRect.width() <= paintRect.width());
+ CHECK(paintOffset.y() + sourceRect.height() <= paintRect.height());
tile->updaterResource()->update(queue, sourceRect, destOffset, tile->partialUpdate, stats);
if (occlusion)

Powered by Google App Engine
This is Rietveld 408576698