Flutter Engine
The Flutter Engine
Functions
crbug_1167277.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_1167277, canvas, 230, 320)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( crbug_1167277  ,
canvas  ,
230  ,
320   
)

Definition at line 17 of file crbug_1167277.cpp.

17 {
18 canvas->translate(-1250, -900);
19 // Matrix, clip, and quad values taken from Chrome repro scenario.
21 SkBits2Float(0xbf8fcfae), SkBits2Float(0xbeae25ee), SkBits2Float(0x449ca6db),
22 SkBits2Float(0x3c9dc40f), SkBits2Float(0xbf950e35), SkBits2Float(0x4487da43),
23 SkBits2Float(0xb8d4d6bc), SkBits2Float(0xb92fbb29), SkBits2Float(0x3f6f605c));
24 SkRect rect = {SkBits2Float(0x00000000), SkBits2Float(0x00000000),
25 SkBits2Float(0x41880000), SkBits2Float(0x43440000)};
26 SkPoint clip[4] = {{SkBits2Float(0x3ef434a2), SkBits2Float(0x43440004)},
27 {SkBits2Float(0x00000000), SkBits2Float(0x43440009)},
28 {SkBits2Float(0x38ef605d), SkBits2Float(0x38ef605d)},
29 {SkBits2Float(0x3ef436e3), SkBits2Float(0x396f5d30)}};
31 for (int flags = 0; flags < static_cast<int>(SkCanvas::kAll_QuadAAFlags); ++flags) {
33 canvas->save();
34 canvas->concat(ctm);
35 canvas->experimental_DrawEdgeAAQuad(rect, clip, aaFlags, color, SkBlendMode::kSrcOver);
36 canvas->restore();
37 canvas->translate(5, 0);
38 SkColor rgb = color & 0x00FFFFFF;
39 color = 0xFF000000 | (rgb << 4) | (rgb >> 20);
40 }
41}
@ 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
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition: SkPath.cpp:3892
@ 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
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350