diff options
author | Mike Reed <reed@google.com> | 2018-01-03 09:23:34 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-03 15:30:29 +0000 |
commit | 7c9c9e4239b6e9dfec3469326312e4c9a2c164f9 (patch) | |
tree | 90ce9f6812c6b1c0565b74f578bbab77d922baae /src/core/SkCanvasPriv.h | |
parent | 2823f9f06c15fd581e7518dc4e674ad56917dcdb (diff) |
update pipe for lattice and shadowrec
- move some lattice routines into shared helper (SkCanvasPriv)
Bug: skia:
Change-Id: Ibbb80dd7461c7fd3082a0220604ab42cbb8815be
Reviewed-on: https://skia-review.googlesource.com/90540
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkCanvasPriv.h')
-rw-r--r-- | src/core/SkCanvasPriv.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/SkCanvasPriv.h b/src/core/SkCanvasPriv.h index dfae154ecb..12d9fce027 100644 --- a/src/core/SkCanvasPriv.h +++ b/src/core/SkCanvasPriv.h @@ -10,6 +10,9 @@ #include "SkCanvas.h" +class SkReadBuffer; +class SkWriteBuffer; + class SkAutoCanvasMatrixPaint : SkNoncopyable { public: SkAutoCanvasMatrixPaint(SkCanvas*, const SkMatrix*, const SkPaint*, const SkRect& bounds); @@ -20,4 +23,16 @@ private: int fSaveCount; }; +class SkCanvasPriv { +public: + // The lattice has pointers directly into the readbuffer + static bool ReadLattice(SkReadBuffer&, SkCanvas::Lattice*); + + static void WriteLattice(SkWriteBuffer&, const SkCanvas::Lattice&); + + // return the byte-size of the lattice, even if the buffer is null + // storage must be 4-byte aligned + static size_t WriteLattice(void* storage, const SkCanvas::Lattice&); +}; + #endif |