Flutter Engine
The Flutter Engine
GrUtil.h
Go to the documentation of this file.
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
14
15class GrStyle;
16class SkMatrix;
17
20
21 // 6th gen
23
24 // 7th gen
28
29 // 8th gen
32
33 // 9th gen
39
40 // 11th gen
42};
43
44GrIntelGpuFamily GrGetIntelGpuFamily(uint32_t deviceID);
45
46// Helper for determining if we can treat a thin stroke as a hairline w/ coverage.
47// If we can, we draw lots faster (raster device does this same test).
48bool GrIsStrokeHairlineOrEquivalent(const GrStyle&, const SkMatrix&, SkScalar* outCoverage);
49
51 switch (type) {
58 default:
59 SK_ABORT("Unexpected texture type");
60 }
61}
62
63#endif
GrTextureType
Definition: GrTypesPriv.h:268
bool GrIsStrokeHairlineOrEquivalent(const GrStyle &, const SkMatrix &, SkScalar *outCoverage)
Definition: GrUtil.cpp:65
static SkSLType SkSLCombinedSamplerTypeForTextureType(GrTextureType type)
Definition: GrUtil.h:50
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
GrIntelGpuFamily GrGetIntelGpuFamily(uint32_t deviceID)
Definition: GrUtil.cpp:13
#define SK_ABORT(message,...)
Definition: SkAssert.h:70
SkSLType
@ kTextureExternalSampler
@ kTexture2DSampler
@ kTexture2DRectSampler
GLenum type
float SkScalar
Definition: extension.cpp:12