1cb93a386Sopenharmony_ci// Copyright 2019 Google LLC.
2cb93a386Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3cb93a386Sopenharmony_ci#include "tools/fiddle/examples.h"
4cb93a386Sopenharmony_ci// HASH=4a00e6589e862fde5be532f4b6e316ce
5cb93a386Sopenharmony_ciREG_FIDDLE(Canvas_empty_constructor, 256, 256, true, 0) {
6cb93a386Sopenharmony_cistatic void check_for_rotated_ctm(const SkCanvas* canvas) {
7cb93a386Sopenharmony_ci    const SkM44 matrix = canvas->getLocalToDevice();
8cb93a386Sopenharmony_ci    SkDebugf("ctm is identity = %s\n", matrix == SkM44() ? "true" : "false");
9cb93a386Sopenharmony_ci}
10cb93a386Sopenharmony_ci
11cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) {
12cb93a386Sopenharmony_ci    check_for_rotated_ctm(canvas);
13cb93a386Sopenharmony_ci    canvas->rotate(30);
14cb93a386Sopenharmony_ci    check_for_rotated_ctm(canvas);
15cb93a386Sopenharmony_ci    SkCanvas defaultCanvas;
16cb93a386Sopenharmony_ci    check_for_rotated_ctm(&defaultCanvas);
17cb93a386Sopenharmony_ci}
18cb93a386Sopenharmony_ci}  // END FIDDLE
19