#include <SkPaintPriv.h>
Definition at line 19 of file SkPaintPriv.h.
◆ ShaderOverrideOpacity
Enumerator |
---|
kNone_ShaderOverrideOpacity | there is no overriding shader (bitmap or image)
|
kOpaque_ShaderOverrideOpacity | the overriding shader is opaque
|
kNotOpaque_ShaderOverrideOpacity | the overriding shader may not be opaque
|
Definition at line 21 of file SkPaintPriv.h.
21 {
25 };
@ kNone_ShaderOverrideOpacity
there is no overriding shader (bitmap or image)
@ kOpaque_ShaderOverrideOpacity
the overriding shader is opaque
@ kNotOpaque_ShaderOverrideOpacity
the overriding shader may not be opaque
◆ ComputeLuminanceColor()
Definition at line 153 of file SkPaintPriv.cpp.
153 {
156 c = { 0.5f, 0.5f, 0.5f, 1.0f};
157 }
158 return c.toSkColor();
159}
static bool just_a_color(const SkPaint &paint, SkColor4f *color)
◆ Flatten()
Serializes SkPaint into a buffer. A companion unflatten() call can reconstitute the paint at a later time.
- Parameters
-
Definition at line 261 of file SkPaintPriv.cpp.
261 {
262 uint8_t flatFlags = 0;
263
264 if (
paint.getPathEffect() ||
266 paint.getMaskFilter() ||
267 paint.getColorFilter() ||
268 paint.getImageFilter() ||
269 !
paint.asBlendMode()) {
271 }
272
276
278
286 }
287}
static uint32_t pack_v68(const SkPaint &paint, unsigned flatFlags)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
◆ Overwrites()
Returns true if drawing with this paint (or nullptr) will ovewrite all affected pixels.
Note: returns conservative true, meaning it may return false even though the paint might in fact overwrite its pixels.
Definition at line 83 of file SkPaintPriv.cpp.
83 {
85
86
88 }
89
91
93 const unsigned paintAlpha =
paint->getAlpha();
95 (!
paint->getShader() ||
paint->getShader()->isOpaque())) {
97 } else if (0 == paintAlpha) {
100 } else {
102 }
103 }
104 }
105
106 const auto bm =
paint->asBlendMode();
107 if (!bm) {
108 return false;
109 }
111}
static bool blend_mode_is_opaque(SkBlendMode mode, SrcColorOpacity opacityType)
@ kTransparentBlack_SrcColorOpacity
@ kTransparentAlpha_SrcColorOpacity
@ kUnknown_SrcColorOpacity
@ kOpaque_SrcColorOpacity
static bool changes_alpha(const SkPaint &paint)
◆ RemoveColorFilter()
Definition at line 161 of file SkPaintPriv.cpp.
161 {
164
165
166 p->setShader(sk_make_sp<SkColorFilterShader>(
sk_ref_sp(shader),
170 } else {
172 }
173 p->setColorFilter(
nullptr);
174 }
175}
SkColorSpace * sk_srgb_singleton()
sk_sp< T > sk_ref_sp(T *obj)
◆ ShouldDither()
Definition at line 113 of file SkPaintPriv.cpp.
113 {
114
116 return false;
117 }
118
120 return false;
121 }
122
123
125 return true;
126 }
127
128
129 return p.getImageFilter() ||
p.getMaskFilter() ||
131}
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kUnknown_SkColorType
uninitialized
SkShaderBase * as_SB(SkShader *shader)
virtual bool isConstant() const
◆ Unflatten()
Populates SkPaint, typically from a serialized stream, created by calling flatten() at an earlier time.
Definition at line 289 of file SkPaintPriv.cpp.
289 {
291
294 {
298 }
299
302
304
305 paint.setPathEffect(
nullptr);
306 paint.setShader(
nullptr);
307 paint.setMaskFilter(
nullptr);
308 paint.setColorFilter(
nullptr);
309 paint.setImageFilter(
nullptr);
311
318 } else {
325 }
326
329 }
331}
static uint32_t unpack_v68(SkPaint *paint, uint32_t packed, SkSafeRange &safe)
The documentation for this class was generated from the following files: