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=af4c5acc7a91e7f23c2af48018903ad4 5 REG_FIDDLE(Paint_getDrawLooper, 256, 256, true, 0) { draw(SkCanvas * canvas)6void draw(SkCanvas* canvas) { 7 #ifdef SK_SUPPORT_LEGACY_DRAWLOOPER 8 SkPaint paint; 9 SkDebugf("nullptr %c= draw looper\n", paint.getDrawLooper() ? '!' : '='); 10 SkLayerDrawLooper::Builder looperBuilder; 11 paint.setDrawLooper(looperBuilder.detach()); 12 SkDebugf("nullptr %c= draw looper\n", paint.getDrawLooper() ? '!' : '='); 13 #endif 14 } 15 } // END FIDDLE 16