93 {
97
99 if (fUseAtlas) {
100 width = kAtlasCellWidth;
101 height = kAtlasCellHeight;
102 } else {
103 width = kCheckerboardWidth;
104 height = kCheckerboardHeight;
105 }
106
110
112
114
116 maxTransX =
size.fWidth - (1.5f *
width);
121 } else {
123
126 }
127
132 { 0, 0 },
136 };
137 uint16_t indices[6] = { 0, 1, 2, 0, 2, 3 };
138
140 p.setColor(0xFF000000);
141
145
146 for (
int i = 0;
i < loops; ++
i, ++fNumSaved) {
147 if (0 ==
i % kNumBeforeClear) {
149 for (int j = 0; j < fNumSaved; ++j) {
152
154 mat.
preScale(fSaved[j][2], fSaved[j][2]);
157 }
158
160 canvas->
drawRect(clearRect, clearPaint);
161 }
162 } else {
163 canvas->
clear(0xFF000000);
164 }
165
166 fNumSaved = 0;
167 }
168
169 SkASSERT(fNumSaved < kNumBeforeClear);
170
172
175 if (fAligned) {
176
179 }
180
181 mat.
setTranslate(fSaved[fNumSaved][0], fSaved[fNumSaved][1]);
182
185 mat.
preScale(fSaved[fNumSaved][2], fSaved[fNumSaved][2]);
189 }
190
192 if (fUseAtlas) {
193 const int curCell =
i % (kNumAtlasedX * kNumAtlasedY);
195 fAtlasRects[curCell % (kNumAtlasedX)][curCell / (kNumAtlasedX)]);
196
197 if (fUseDrawVertices) {
203 };
205 4, verts, uvs, nullptr, 6, indices),
207 } else {
210 }
211 } else {
213 }
214 }
215 }
#define SkScalarFloorToScalar(x)
void drawRect(const SkRect &rect, const SkPaint &paint)
virtual SkISize getBaseLayerSize() const
@ kFast_SrcRectConstraint
sample outside bounds; faster
void clear(SkColor color)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void setMatrix(const SkM44 &matrix)
void concat(const SkMatrix &matrix)
void drawVertices(const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
SkMatrix & setTranslate(SkScalar dx, SkScalar dy)
static const SkMatrix & I()
SkMatrix & preRotate(SkScalar degrees, SkScalar px, SkScalar py)
SkMatrix & preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
void setColor(SkColor color)
void setAntiAlias(bool aa)
void setShader(sk_sp< SkShader > shader)
SkScalar nextRangeScalar(SkScalar min, SkScalar max)
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[])
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
SkSamplingOptions(SkFilterMode::kLinear))
static SkRect Make(const SkISize &size)