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 // HASH=8e4257245c988c600410fe4fd7293f07
5 REG_FIDDLE(Picture_uniqueID, 256, 256, true, 0) {
draw(SkCanvas * canvas)6 void draw(SkCanvas* canvas) {
7 SkPictureRecorder recorder;
8 recorder.beginRecording({0, 0, 0, 0});
9 sk_sp<SkPicture> picture = recorder.finishRecordingAsPicture();
10 SkDebugf("empty picture id = %d\n", picture->uniqueID());
11 sk_sp<SkPicture> placeholder = SkPicture::MakePlaceholder({0, 0, 0, 0});
12 SkDebugf("placeholder id = %d\n", placeholder->uniqueID());
13 }
14 } // END FIDDLE
15