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

Unified Diff: cc/base/tiling_data.cc

Issue 2295343005: Improve PictureLayerTiling::CoverageIterator to handle rounding more precisely (Closed)
Patch Set: remove the 1.5 Created 4 years, 3 months 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/base/tiling_data.h ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/tiling_data.cc
diff --git a/cc/base/tiling_data.cc b/cc/base/tiling_data.cc
index cf2bb57f64c623a09329ee9eecc257358b3bdd7f..480888f92d1d201b96f9381511e7c5f912a51b30 100644
--- a/cc/base/tiling_data.cc
+++ b/cc/base/tiling_data.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/vector2d.h"
namespace cc {
@@ -279,6 +280,12 @@ int TilingData::TileSizeY(int y_index) const {
return 0;
}
+gfx::RectF TilingData::TexelExtent(int i, int j) const {
+ gfx::RectF result(TileBoundsWithBorder(i, j));
+ result.Inset(0.5f, 0.5f);
+ return result;
+}
+
gfx::Vector2d TilingData::TextureOffset(int x_index, int y_index) const {
int left = (!x_index || num_tiles_x_ == 1) ? 0 : border_texels_;
int top = (!y_index || num_tiles_y_ == 1) ? 0 : border_texels_;
« no previous file with comments | « cc/base/tiling_data.h ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698