Flutter Engine
The Flutter Engine
Functions
crbug_918512.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkBlendMode.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorFilter.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRect.h"
#include "include/effects/SkLumaColorFilter.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (crbug_918512, canvas, 256, 256)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( crbug_918512  ,
canvas  ,
256  ,
256   
)

Definition at line 14 of file crbug_918512.cpp.

14 {
15 canvas->drawColor(SK_ColorYELLOW);
16 {
17 SkAutoCanvasRestore autoCanvasRestore1(canvas, false);
18 canvas->saveLayer(nullptr, nullptr);
19 canvas->drawColor(SK_ColorCYAN);
20 {
21 SkAutoCanvasRestore autoCanvasRestore2(canvas, false);
22 SkPaint lumaFilter;
25 canvas->saveLayer(nullptr, &lumaFilter);
26
27 canvas->drawColor(SK_ColorTRANSPARENT);
29 paint.setColor(SK_ColorGRAY);
30 canvas->drawRect(SkRect{0, 0, 128, 256}, paint);
31 }
32 }
33}
@ kDstIn
r = d * sa
constexpr SkColor SK_ColorYELLOW
Definition: SkColor.h:139
constexpr SkColor SK_ColorCYAN
Definition: SkColor.h:143
constexpr SkColor SK_ColorTRANSPARENT
Definition: SkColor.h:99
constexpr SkColor SK_ColorGRAY
Definition: SkColor.h:113
void setBlendMode(SkBlendMode mode)
Definition: SkPaint.cpp:151
void setColorFilter(sk_sp< SkColorFilter > colorFilter)
const Paint & paint
Definition: color_source.cc:38
static sk_sp< SkColorFilter > Make()