Flutter Engine
The Flutter Engine
Classes | Namespaces | Functions
coloremoji.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorFilter.h"
#include "include/core/SkFont.h"
#include "include/core/SkFontMetrics.h"
#include "include/core/SkFontTypes.h"
#include "include/core/SkImageFilter.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "include/core/SkTileMode.h"
#include "include/core/SkTypeface.h"
#include "include/core/SkTypes.h"
#include "include/effects/SkGradientShader.h"
#include "include/effects/SkImageFilters.h"
#include "include/gpu/GrContextOptions.h"
#include "src/core/SkFontPriv.h"
#include "tools/ToolUtils.h"
#include "tools/fonts/FontToolUtils.h"
#include <string.h>
#include <initializer_list>
#include <utility>

Go to the source code of this file.

Classes

class  skiagm::ColorEmojiGM
 

Namespaces

namespace  skiagm
 

Functions

static sk_sp< SkShaderMakeLinear ()
 
static sk_sp< SkImageFiltermake_grayscale (sk_sp< SkImageFilter > input)
 
static sk_sp< SkImageFiltermake_blur (float amount, sk_sp< SkImageFilter > input)
 
static sk_sp< SkColorFiltermake_color_filter ()
 

Function Documentation

◆ make_blur()

static sk_sp< SkImageFilter > make_blur ( float  amount,
sk_sp< SkImageFilter input 
)
static

Definition at line 64 of file coloremoji.cpp.

64 {
65 return SkImageFilters::Blur(amount, amount, std::move(input));
66}
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})

◆ make_color_filter()

static sk_sp< SkColorFilter > make_color_filter ( )
static

Definition at line 68 of file coloremoji.cpp.

68 {
69 return SkColorFilters::Lighting(SkColorSetRGB(0x00, 0x80, 0xFF),
70 SkColorSetRGB(0xFF, 0x20, 0x00));
71}
#define SkColorSetRGB(r, g, b)
Definition: SkColor.h:57
static sk_sp< SkColorFilter > Lighting(SkColor mul, SkColor add)

◆ make_grayscale()

static sk_sp< SkImageFilter > make_grayscale ( sk_sp< SkImageFilter input)
static

Definition at line 53 of file coloremoji.cpp.

53 {
54 float matrix[20];
55 memset(matrix, 0, 20 * sizeof(float));
56 matrix[0] = matrix[5] = matrix[10] = 0.2126f;
57 matrix[1] = matrix[6] = matrix[11] = 0.7152f;
58 matrix[2] = matrix[7] = matrix[12] = 0.0722f;
59 matrix[18] = 1.0f;
61 return SkImageFilters::ColorFilter(std::move(filter), std::move(input));
62}
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
static sk_sp< SkImageFilter > ColorFilter(sk_sp< SkColorFilter > cf, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258

◆ MakeLinear()

static sk_sp< SkShader > MakeLinear ( )
static

Definition at line 45 of file coloremoji.cpp.

45 {
46 constexpr SkPoint kPts[] = { { 0, 0 }, { 32, 32 } };
47 constexpr SkScalar kPos[] = { 0, SK_Scalar1/2, SK_Scalar1 };
48 constexpr SkColor kColors[] = {0x80F00080, 0xF0F08000, 0x800080F0 };
51}
uint32_t SkColor
Definition: SkColor.h:37
#define SK_Scalar1
Definition: SkScalar.h:18
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
float SkScalar
Definition: extension.cpp:12
const DlColor kColors[]
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
static constexpr SkPoint kPts[kPtsCount]
Definition: emptypath.cpp:123