@@ -237,47 +237,13 @@ void SkPictureRecord::didSetM44(const SkM44& m) {
237237}
238238
239239void SkPictureRecord::didScale (SkScalar x, SkScalar y) {
240- #ifdef SK_SUPPORT_LEGACY_CANVASMATRIX33
241- this ->didConcat (SkMatrix::Scale (x, y));
242- #else
243240 this ->didConcat44 (SkM44::Scale (x, y));
244- #endif
245241}
246242
247243void SkPictureRecord::didTranslate (SkScalar x, SkScalar y) {
248- #ifdef SK_SUPPORT_LEGACY_CANVASMATRIX33
249- this ->didConcat (SkMatrix::Translate (x, y));
250- #else
251244 this ->didConcat44 (SkM44::Translate (x, y));
252- #endif
253245}
254246
255- #ifdef SK_SUPPORT_LEGACY_CANVASMATRIX33
256- void SkPictureRecord::didConcat (const SkMatrix& matrix) {
257- switch (matrix.getType ()) {
258- case SkMatrix::kTranslate_Mask :
259- this ->recordTranslate (matrix);
260- break ;
261- case SkMatrix::kScale_Mask :
262- this ->recordScale (matrix);
263- break ;
264- default :
265- this ->recordConcat (matrix);
266- break ;
267- }
268- this ->INHERITED ::didConcat (matrix);
269- }
270- void SkPictureRecord::didSetMatrix (const SkMatrix& matrix) {
271- this ->validate (fWriter .bytesWritten (), 0 );
272- // op + matrix
273- size_t size = kUInt32Size + SkMatrixPriv::WriteToMemory (matrix, nullptr );
274- size_t initialOffset = this ->addDraw (SET_MATRIX, &size);
275- this ->addMatrix (matrix);
276- this ->validate (initialOffset, size);
277- this ->INHERITED ::didSetMatrix (matrix);
278- }
279- #endif
280-
281247void SkPictureRecord::recordConcat (const SkMatrix& matrix) {
282248 this ->validate (fWriter .bytesWritten (), 0 );
283249 // op + matrix
0 commit comments