Flutter Engine
The Flutter Engine
Functions
crbug_1174186.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkRect.h"
#include "src/base/SkFloatBits.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (crbug_1174186, canvas, 1200, 1200)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( crbug_1174186  ,
canvas  ,
1200  ,
1200   
)

Definition at line 18 of file crbug_1174186.cpp.

18 {
19 auto m = SkMatrix::MakeAll(
20 SkBits2Float(0x24480629), SkBits2Float(0xbf3555c2), SkBits2Float(0x4377d67b),
21 SkBits2Float(0x23a61d51), SkBits2Float(0x3f34b400), SkBits2Float(0x4453f572),
22 SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x3f800000));
23
24 SkPoint pts[] = {{SkBits2Float(0x3f7ffff2), SkBits2Float(0x43483d60)},
25 {SkBits2Float(0x00000000), SkBits2Float(0x43483d60)},
26 {SkBits2Float(0x00000000), SkBits2Float(0x4311a628)},
27 {SkBits2Float(0x3f800000), SkBits2Float(0x43130f8c)}};
29 canvas->translate(-500, 0);
30 for (int i = 0; i < 10; ++i) {
31 for (int flags = 0; flags < static_cast<int>(SkCanvas::kAll_QuadAAFlags); ++flags) {
33 canvas->save();
34 canvas->concat(m);
35 canvas->experimental_DrawEdgeAAQuad(SkRect::MakeWH(1000, 1000), pts, aaFlags, color,
37 canvas->restore();
38 canvas->translate(5.1f, 0);
39 SkColor rgb = color & 0x00FFFFFF;
40 color = 0xFF000000 | (rgb << 4) | (rgb >> 20);
41 }
42 }
43}
@ kSrcOver
r = s + (1-sa)*d
uint32_t SkColor
Definition: SkColor.h:37
constexpr SkColor SK_ColorGREEN
Definition: SkColor.h:131
static float SkBits2Float(uint32_t bits)
Definition: SkFloatBits.h:48
@ kAll_QuadAAFlags
Definition: SkCanvas.h:1665
static SkMatrix MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX, SkScalar skewY, SkScalar scaleY, SkScalar transY, SkScalar pers0, SkScalar pers1, SkScalar pers2)
Definition: SkMatrix.h:179
DlColor color
FlutterSemanticsFlag flags
static constexpr SkRect MakeWH(float w, float h)
Definition: SkRect.h:609