diff options
author | mtklein <mtklein@chromium.org> | 2014-10-20 07:12:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-20 07:12:34 -0700 |
commit | 958e9628d5f9a81aeafa78572cb4afc4b19a455a (patch) | |
tree | f596f8834ecd33fcf0bc9b25e1174735c0a4327e /src/core/SkTileGrid.h | |
parent | 2b9dc1d0fff7e1e206721b872a9ba989f5829271 (diff) |
Start to vectorize SkTileGrid.
This adds Sk4x.h to help.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot
Review URL: https://codereview.chromium.org/634543004
Diffstat (limited to 'src/core/SkTileGrid.h')
-rw-r--r-- | src/core/SkTileGrid.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/SkTileGrid.h b/src/core/SkTileGrid.h index fd7584fd9c..d556f8074b 100644 --- a/src/core/SkTileGrid.h +++ b/src/core/SkTileGrid.h @@ -8,6 +8,7 @@ #ifndef SkTileGrid_DEFINED #define SkTileGrid_DEFINED +#include "Sk4x.h" #include "SkBBHFactory.h" #include "SkBBoxHierarchy.h" @@ -43,16 +44,16 @@ public: virtual void flushDeferredInserts() SK_OVERRIDE; private: - void commonAdjust(SkRect*) const; - void userToGrid(const SkRect&, SkIRect* grid) const; + void userToGrid(const Sk4f&, SkIRect*) const; + bool intersectsGrid(const Sk4f&) const; - const int fXTiles, fYTiles; - const SkScalar fInvWidth, fInvHeight; - const SkScalar fMarginWidth, fMarginHeight; - const SkPoint fOffset; - const SkRect fGridBounds; + const int fXTiles, // Number of tiles in a single row. + fNumTiles; // Total number of tiles. - // (fXTiles * fYTiles) SkTDArrays, each listing ops overlapping that tile in order. + const SkRect fGridBounds; // Only used for intersectsGrid(). Remove if that's removed. + const Sk4f fMargin, fOffset, fUserToGrid, fGridHigh; + + // fNumTiles SkTDArrays, each listing ops overlapping that tile in order. SkTDArray<unsigned>* fTiles; typedef SkBBoxHierarchy INHERITED; |