blob: edf71932cac58024f0764c48f5f657abf8b149eb [file] [log] [blame]
// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "tools/fiddle/examples.h"
// HASH=b588c95fa4c86ddbc4b0546762f08297
REG_FIDDLE(Paint_refColorFilter, 256, 256, true, 0) {
void draw(SkCanvas* canvas) {
SkPaint paint1, paint2;
paint1.setColorFilter(SkColorFilters::Blend(0xFFFF0000, SkBlendMode::kSrcATop));
SkDebugf("color filter unique: %s\n", paint1.getColorFilter()->unique() ? "true" : "false");
paint2.setColorFilter(paint1.refColorFilter());
SkDebugf("color filter unique: %s\n", paint1.getColorFilter()->unique() ? "true" : "false");
}
} // END FIDDLE