Flutter Engine
The Flutter Engine
Functions
crbug_918512.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (crbug_918512, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( crbug_918512  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file crbug_918512.cpp.

4 {
5// https://crbug.com/918512
6// Verify that PDF draws correctly.
7void draw(SkCanvas* canvas) {
9 {
10 SkAutoCanvasRestore autoCanvasRestore1(canvas, false);
11 canvas->saveLayer(nullptr, nullptr);
12 canvas->drawColor(SK_ColorCYAN);
13 {
14 SkAutoCanvasRestore autoCanvasRestore2(canvas, false);
15 SkPaint lumaFilter;
18 canvas->saveLayer(nullptr, &lumaFilter);
19
22 paint.setColor(SK_ColorGRAY);
23 canvas->drawRect(SkRect{0, 0, 128, 256}, paint);
24 }
25 }
26}
27} // END FIDDLE
@ 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
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
int saveLayer(const SkRect *bounds, const SkPaint *paint)
Definition: SkCanvas.cpp:496
void drawRect(const SkRect &rect, const SkPaint &paint)
Definition: SkCanvas.cpp:1673
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
Definition: SkCanvas.h:1182
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()