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

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: fix content_browsertests 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
« no previous file with comments | « cc/tile_draw_quad.cc ('k') | cc/tiled_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiled_layer.cc
diff --git a/cc/tiled_layer.cc b/cc/tiled_layer.cc
index f3377b12efc063fe751b06fc85ed6146198cee85..77be6eb93aacac1529c0a883400d410a42524415 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)
« no previous file with comments | « cc/tile_draw_quad.cc ('k') | cc/tiled_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698