Flutter Engine
The Flutter Engine
GrUtil.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2020 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
9
12
14 // https://en.wikipedia.org/wiki/List_of_Intel_graphics_processing_units
15 uint32_t maskedID = deviceID & 0xFF00;
16 switch (maskedID) {
17 case 0x0100:
18 switch (deviceID & 0xFFF0) {
19 case 0x0100:
20 case 0x0110:
21 case 0x0120:
23 case 0x0150:
24 if (deviceID == 0x0155 || deviceID == 0x0157) {
26 }
27 if (deviceID == 0x0152 || deviceID == 0x015A) {
29 }
30 break;
31 case 0x0160:
33 default:
34 break;
35 }
36 break;
37 case 0x0F00:
39 case 0x0400:
40 case 0x0A00:
41 case 0x0D00:
43 case 0x2200:
45 case 0x1600:
47 case 0x5A00:
49 case 0x1900:
51 case 0x3100:
53 case 0x5900:
55 case 0x3E00:
57 case 0x8A00:
59 default:
60 break;
61 }
63}
64
66 const SkMatrix& matrix,
67 SkScalar* outCoverage) {
68 if (style.pathEffect()) {
69 return false;
70 }
71 const SkStrokeRec& stroke = style.strokeRec();
72 if (stroke.isHairlineStyle()) {
73 if (outCoverage) {
74 *outCoverage = SK_Scalar1;
75 }
76 return true;
77 }
78 return stroke.getStyle() == SkStrokeRec::kStroke_Style &&
79 SkDrawTreatAAStrokeAsHairline(stroke.getWidth(), matrix, outCoverage);
80}
GrIntelGpuFamily GrGetIntelGpuFamily(uint32_t deviceID)
Definition: GrUtil.cpp:13
bool GrIsStrokeHairlineOrEquivalent(const GrStyle &style, const SkMatrix &matrix, SkScalar *outCoverage)
Definition: GrUtil.cpp:65
GrIntelGpuFamily
Definition: GrUtil.h:18
@ kSkyLake_IntelGpuFamily
Definition: GrUtil.h:35
@ kApolloLake_IntelGpuFamily
Definition: GrUtil.h:34
@ kBroadwell_IntelGpuFamily
Definition: GrUtil.h:31
@ kGeminiLake_IntelGpuFamily
Definition: GrUtil.h:36
@ kUnknown_IntelGpuFamily
Definition: GrUtil.h:19
@ kKabyLake_IntelGpuFamily
Definition: GrUtil.h:37
@ kCoffeeLake_IntelGpuFamily
Definition: GrUtil.h:38
@ kValleyView_IntelGpuFamily
Definition: GrUtil.h:26
@ kHaswell_IntelGpuFamily
Definition: GrUtil.h:27
@ kIceLake_IntelGpuFamily
Definition: GrUtil.h:41
@ kSandyBridge_IntelGpuFamily
Definition: GrUtil.h:22
@ kCherryView_IntelGpuFamily
Definition: GrUtil.h:30
@ kIvyBridge_IntelGpuFamily
Definition: GrUtil.h:25
bool SkDrawTreatAAStrokeAsHairline(SkScalar strokeWidth, const SkMatrix &matrix, SkScalar *coverage)
Definition: SkDrawBase.cpp:262
#define SK_Scalar1
Definition: SkScalar.h:18
SkPathEffect * pathEffect() const
Definition: GrStyle.h:119
const SkStrokeRec & strokeRec() const
Definition: GrStyle.h:140
float SkScalar
Definition: extension.cpp:12
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258