• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2019 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 #ifndef GrUtil_DEFINED
8 #define GrUtil_DEFINED
9 
10 #include "include/core/SkScalar.h"
11 #include "include/core/SkTypes.h"
12 
13 class GrStyle;
14 class SkMatrix;
15 
16 enum GrIntelGpuFamily {
17     kUnknown_IntelGpuFamily,
18 
19     // 6th gen
20     kSandyBridge_IntelGpuFamily,
21 
22     // 7th gen
23     kIvyBridge_IntelGpuFamily,
24     kValleyView_IntelGpuFamily, // aka BayTrail
25     kHaswell_IntelGpuFamily,
26 
27     // 8th gen
28     kCherryView_IntelGpuFamily, // aka Braswell
29     kBroadwell_IntelGpuFamily,
30 
31     // 9th gen
32     kApolloLake_IntelGpuFamily,
33     kSkyLake_IntelGpuFamily,
34     kGeminiLake_IntelGpuFamily,
35     kKabyLake_IntelGpuFamily,
36     kCoffeeLake_IntelGpuFamily,
37 
38     // 11th gen
39     kIceLake_IntelGpuFamily,
40 };
41 
42 GrIntelGpuFamily GrGetIntelGpuFamily(uint32_t deviceID);
43 
44 // Helper for determining if we can treat a thin stroke as a hairline w/ coverage.
45 // If we can, we draw lots faster (raster device does this same test).
46 bool GrIsStrokeHairlineOrEquivalent(const GrStyle&, const SkMatrix&, SkScalar* outCoverage);
47 
48 #endif
49