Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Paint_refColorFilter.cpp
Go to the documentation of this file.
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.
4// HASH=b588c95fa4c86ddbc4b0546762f08297
5REG_FIDDLE(Paint_refColorFilter, 256, 256, true, 0) {
6void draw(SkCanvas* canvas) {
7 SkPaint paint1, paint2;
9 SkDebugf("color filter unique: %s\n", paint1.getColorFilter()->unique() ? "true" : "false");
10 paint2.setColorFilter(paint1.refColorFilter());
11 SkDebugf("color filter unique: %s\n", paint1.getColorFilter()->unique() ? "true" : "false");
12}
13} // END FIDDLE
@ kSrcATop
r = s*da + d*(1-sa)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
static sk_sp< SkColorFilter > Blend(const SkColor4f &c, sk_sp< SkColorSpace >, SkBlendMode mode)
SkColorFilter * getColorFilter() const
Definition SkPaint.h:426
sk_sp< SkColorFilter > refColorFilter() const
void setColorFilter(sk_sp< SkColorFilter > colorFilter)
bool unique() const
Definition SkRefCnt.h:50
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60