Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
include
effects
SkLumaColorFilter.h
Go to the documentation of this file.
1
/*
2
* Copyright 2013 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#ifndef SkLumaColorFilter_DEFINED
9
#define SkLumaColorFilter_DEFINED
10
11
#include "
include/core/SkRefCnt.h
"
12
#include "
include/core/SkTypes.h
"
13
14
class
SkColorFilter
;
15
16
/**
17
* SkLumaColorFilter multiplies the luma of its input into the alpha channel,
18
* and sets the red, green, and blue channels to zero.
19
*
20
* SkLumaColorFilter(r,g,b,a) = {0,0,0, a * luma(r,g,b)}
21
*
22
* This is similar to a luminanceToAlpha feColorMatrix,
23
* but note how this filter folds in the previous alpha,
24
* something an feColorMatrix cannot do.
25
*
26
* feColorMatrix(luminanceToAlpha; r,g,b,a) = {0,0,0, luma(r,g,b)}
27
*
28
* (Despite its name, an feColorMatrix using luminanceToAlpha does
29
* actually compute luma, a dot-product of gamma-encoded color channels,
30
* not luminance, a dot-product of linear color channels. So at least
31
* SkLumaColorFilter and feColorMatrix+luminanceToAlpha agree there.)
32
*/
33
struct
SK_API
SkLumaColorFilter
{
34
static
sk_sp<SkColorFilter>
Make
();
35
};
36
37
#endif
SK_API
#define SK_API
Definition
SkAPI.h:35
Make
static std::unique_ptr< SkEncoder > Make(SkWStream *dst, const SkPixmap *src, const SkYUVAPixmaps *srcYUVA, const SkColorSpace *srcYUVAColorSpace, const SkJpegEncoder::Options &options)
Definition
SkJpegEncoderImpl.cpp:259
SkRefCnt.h
SkTypes.h
SkColorFilter
Definition
SkColorFilter.h:35
sk_sp
Definition
SkRefCnt.h:220
SkLumaColorFilter
Definition
SkLumaColorFilter.h:33
Generated on Fri Apr 26 2024 06:16:11 for Flutter Engine by
1.9.8