| 1 |
// Copyright 2019 Google LLC. |
| 2 |
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| 3 |
#include "tools/fiddle/examples.h" |
| 4 |
REG_FIDDLE(Path_getGenerationID, 256, 256, true, 0) { |
| 5 |
void draw(SkCanvas* canvas) { |
| 6 |
SkPath path; |
| 7 |
SkDebugf("empty genID = %u\n", path.getGenerationID()); |
| 8 |
path = SkPathBuilder().lineTo(1, 2).detach(); |
| 9 |
SkDebugf("1st lineTo genID = %u\n", path.getGenerationID()); |
| 10 |
path.reset(); |
| 11 |
SkDebugf("empty genID = %u\n", path.getGenerationID()); |
| 12 |
path = SkPathBuilder().lineTo(1, 2).detach(); |
| 13 |
SkDebugf("2nd lineTo genID = %u\n", path.getGenerationID()); |
| 14 |
} |
| 15 |
} // END FIDDLE |