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

Side by Side Diff: cc/base/tiling_data.h

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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/base/tiling_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_BASE_TILING_DATA_H_ 5 #ifndef CC_BASE_TILING_DATA_H_
6 #define CC_BASE_TILING_DATA_H_ 6 #define CC_BASE_TILING_DATA_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 class RectF;
16 class Vector2d; 17 class Vector2d;
17 } 18 }
18 19
19 namespace cc { 20 namespace cc {
20 21
21 class CC_EXPORT TilingData { 22 class CC_EXPORT TilingData {
22 public: 23 public:
23 TilingData(); 24 TilingData();
24 TilingData(const gfx::Size& max_texture_size, 25 TilingData(const gfx::Size& max_texture_size,
25 const gfx::Size& tiling_size, 26 const gfx::Size& tiling_size,
(...skipping 28 matching lines...) Expand all
54 gfx::Rect ExpandRectIgnoringBordersToTileBounds(const gfx::Rect& rect) const; 55 gfx::Rect ExpandRectIgnoringBordersToTileBounds(const gfx::Rect& rect) const;
55 gfx::Rect ExpandRectToTileBounds(const gfx::Rect& rect) const; 56 gfx::Rect ExpandRectToTileBounds(const gfx::Rect& rect) const;
56 57
57 gfx::Rect TileBounds(int i, int j) const; 58 gfx::Rect TileBounds(int i, int j) const;
58 gfx::Rect TileBoundsWithBorder(int i, int j) const; 59 gfx::Rect TileBoundsWithBorder(int i, int j) const;
59 int TilePositionX(int x_index) const; 60 int TilePositionX(int x_index) const;
60 int TilePositionY(int y_index) const; 61 int TilePositionY(int y_index) const;
61 int TileSizeX(int x_index) const; 62 int TileSizeX(int x_index) const;
62 int TileSizeY(int y_index) const; 63 int TileSizeY(int y_index) const;
63 64
65 gfx::RectF TexelExtent(int i, int j) const;
66
64 // Difference between TileBound's and TileBoundWithBorder's origin(). 67 // Difference between TileBound's and TileBoundWithBorder's origin().
65 gfx::Vector2d TextureOffset(int x_index, int y_index) const; 68 gfx::Vector2d TextureOffset(int x_index, int y_index) const;
66 69
67 class CC_EXPORT BaseIterator { 70 class CC_EXPORT BaseIterator {
68 public: 71 public:
69 operator bool() const { return index_x_ != -1 && index_y_ != -1; } 72 operator bool() const { return index_x_ != -1 && index_y_ != -1; }
70 73
71 int index_x() const { return index_x_; } 74 int index_x() const { return index_x_; }
72 int index_y() const { return index_y_; } 75 int index_y() const { return index_y_; }
73 std::pair<int, int> index() const { 76 std::pair<int, int> index() const {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 int border_texels_; 239 int border_texels_;
237 240
238 // These are computed values. 241 // These are computed values.
239 int num_tiles_x_; 242 int num_tiles_x_;
240 int num_tiles_y_; 243 int num_tiles_y_;
241 }; 244 };
242 245
243 } // namespace cc 246 } // namespace cc
244 247
245 #endif // CC_BASE_TILING_DATA_H_ 248 #endif // CC_BASE_TILING_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | cc/base/tiling_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698