diff options
Diffstat (limited to 'src/gpu/ccpr/GrCCPathProcessor.h')
-rw-r--r-- | src/gpu/ccpr/GrCCPathProcessor.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gpu/ccpr/GrCCPathProcessor.h b/src/gpu/ccpr/GrCCPathProcessor.h index 9d97bad91a..9ea0a164a0 100644 --- a/src/gpu/ccpr/GrCCPathProcessor.h +++ b/src/gpu/ccpr/GrCCPathProcessor.h @@ -32,23 +32,23 @@ public: enum class InstanceAttribs { kDevBounds, kDevBounds45, - kAtlasOffset, + kDevToAtlasOffset, kColor }; static constexpr int kNumInstanceAttribs = 1 + (int)InstanceAttribs::kColor; struct Instance { - SkRect fDevBounds; // "right < left" indicates even-odd fill type. - SkRect fDevBounds45; // Bounding box in "| 1 -1 | * devCoords" space. - // | 1 1 | - std::array<int16_t, 2> fAtlasOffset; + SkRect fDevBounds; // "right < left" indicates even-odd fill type. + SkRect fDevBounds45; // Bounding box in "| 1 -1 | * devCoords" space. + // | 1 1 | + SkIVector fDevToAtlasOffset; // Translation from device space to location in atlas. uint32_t fColor; void set(SkPath::FillType, const SkRect& devBounds, const SkRect& devBounds45, - int16_t atlasOffsetX, int16_t atlasOffsetY, uint32_t color); + const SkIVector& devToAtlasOffset, uint32_t color); }; - GR_STATIC_ASSERT(4 * 10 == sizeof(Instance)); + GR_STATIC_ASSERT(4 * 11 == sizeof(Instance)); static sk_sp<const GrBuffer> FindVertexBuffer(GrOnFlushResourceProvider*); static sk_sp<const GrBuffer> FindIndexBuffer(GrOnFlushResourceProvider*); @@ -87,8 +87,8 @@ private: }; inline void GrCCPathProcessor::Instance::set(SkPath::FillType fillType, const SkRect& devBounds, - const SkRect& devBounds45, int16_t atlasOffsetX, - int16_t atlasOffsetY, uint32_t color) { + const SkRect& devBounds45, + const SkIVector& devToAtlasOffset, uint32_t color) { if (SkPath::kEvenOdd_FillType == fillType) { // "right < left" indicates even-odd fill type. fDevBounds.setLTRB(devBounds.fRight, devBounds.fTop, devBounds.fLeft, devBounds.fBottom); @@ -97,7 +97,7 @@ inline void GrCCPathProcessor::Instance::set(SkPath::FillType fillType, const Sk fDevBounds = devBounds; } fDevBounds45 = devBounds45; - fAtlasOffset = {{atlasOffsetX, atlasOffsetY}}; + fDevToAtlasOffset = devToAtlasOffset; fColor = color; } |