OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkLiteDL_DEFINED | 8 #ifndef SkLiteDL_DEFINED |
9 #define SkLiteDL_DEFINED | 9 #define SkLiteDL_DEFINED |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void drawImageLattice(const SkImage*, const SkCanvas::Lattice&, const SkRect
&, const SkPaint*); | 84 void drawImageLattice(const SkImage*, const SkCanvas::Lattice&, const SkRect
&, const SkPaint*); |
85 | 85 |
86 void drawPatch(const SkPoint[12], const SkColor[4], const SkPoint[4], | 86 void drawPatch(const SkPoint[12], const SkColor[4], const SkPoint[4], |
87 SkXfermode*, const SkPaint&); | 87 SkXfermode*, const SkPaint&); |
88 void drawPoints(SkCanvas::PointMode, size_t, const SkPoint[], const SkPaint&
); | 88 void drawPoints(SkCanvas::PointMode, size_t, const SkPoint[], const SkPaint&
); |
89 void drawVertices(SkCanvas::VertexMode, int, const SkPoint[], const SkPoint[
], const SkColor[], | 89 void drawVertices(SkCanvas::VertexMode, int, const SkPoint[], const SkPoint[
], const SkColor[], |
90 SkXfermode*, const uint16_t[], int, const SkPaint&); | 90 SkXfermode*, const uint16_t[], int, const SkPaint&); |
91 void drawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkCo
lor[], int, | 91 void drawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkCo
lor[], int, |
92 SkXfermode::Mode, const SkRect*, const SkPaint*); | 92 SkXfermode::Mode, const SkRect*, const SkPaint*); |
93 | 93 |
| 94 void setBounds(const SkRect& bounds); |
| 95 |
94 private: | 96 private: |
95 SkLiteDL(SkRect); | 97 SkLiteDL(SkRect); |
96 ~SkLiteDL(); | 98 ~SkLiteDL(); |
97 | 99 |
98 SkRect onGetBounds() override; | 100 SkRect onGetBounds() override; |
99 void onDraw(SkCanvas*) override; | 101 void onDraw(SkCanvas*) override; |
100 | 102 |
101 template <typename T, typename... Args> | 103 template <typename T, typename... Args> |
102 void* push(size_t, Args&&...); | 104 void* push(size_t, Args&&...); |
103 | 105 |
104 template <typename Fn, typename... Args> | 106 template <typename Fn, typename... Args> |
105 void map(const Fn[], Args...); | 107 void map(const Fn[], Args...); |
106 | 108 |
107 SkAutoTMalloc<uint8_t> fBytes; | 109 SkAutoTMalloc<uint8_t> fBytes; |
108 size_t fUsed; | 110 size_t fUsed; |
109 size_t fReserved; | 111 size_t fReserved; |
110 SkRect fBounds; | 112 SkRect fBounds; |
111 }; | 113 }; |
112 | 114 |
113 #endif//SkLiteDL_DEFINED | 115 #endif//SkLiteDL_DEFINED |
OLD | NEW |