Chromium Code Reviews| Index: src/gpu/GrBatchAtlas.h |
| diff --git a/src/gpu/GrBatchAtlas.h b/src/gpu/GrBatchAtlas.h |
| index 83ef5ec732e345eafa5b2bb91d0700fc7038823a..6e7f9428558b01fa4f7bc1eefa0929ab78e0df61 100644 |
| --- a/src/gpu/GrBatchAtlas.h |
| +++ b/src/gpu/GrBatchAtlas.h |
| @@ -24,7 +24,7 @@ public: |
| typedef uint64_t BatchToken; |
| // An AtlasID is an opaque handle which callers can use to determine if the atlas contains |
| // a specific piece of data |
| - typedef uint32_t AtlasID; |
| + typedef uint64_t AtlasID; |
| static const uint32_t kInvalidAtlasID = 0; |
| static const uint64_t kInvalidAtlasGeneration = 0; |
| @@ -107,12 +107,13 @@ public: |
| } |
| private: |
|
robertphillips
2015/07/31 15:00:54
uint16_t ? do we care ?
|
| - static int GetIndexFromID(AtlasID id) { |
| + static uint32_t GetIndexFromID(AtlasID id) { |
| return id & 0xffff; |
| } |
| - static int GetGenerationFromID(AtlasID id) { |
| - return (id >> 16) & 0xffff; |
| + // top 48 bits are reserved for the generation ID |
| + static uint64_t GetGenerationFromID(AtlasID id) { |
|
robertphillips
2015/07/31 15:00:54
Aren't we missing an 'ff' here ?
|
| + return (id >> 16) & 0xffffffffff; |
| } |
| inline void updatePlot(GrBatchTarget*, AtlasID*, BatchPlot*); |
| @@ -122,10 +123,10 @@ private: |
| inline void processEviction(AtlasID); |
| GrTexture* fTexture; |
|
robertphillips
2015/07/31 15:00:54
Why do we have to be more explicit about these typ
|
| - int fNumPlotsX; |
| - int fNumPlotsY; |
| - int fPlotWidth; |
| - int fPlotHeight; |
| + uint32_t fNumPlotsX; |
| + uint32_t fNumPlotsY; |
| + uint32_t fPlotWidth; |
| + uint32_t fPlotHeight; |
| size_t fBPP; |
| uint64_t fAtlasGeneration; |