Flutter Engine
The Flutter Engine
GrDriverBugWorkarounds.h
Go to the documentation of this file.
1/*
2 * Copyright 2018 Google Inc.
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
8#ifndef GrDriverBugWorkarounds_DEFINED
9#define GrDriverBugWorkarounds_DEFINED
10
11// External embedders of Skia can override this to use their own list
12// of workaround names.
13#ifdef SK_GPU_WORKAROUNDS_HEADER
14#include SK_GPU_WORKAROUNDS_HEADER
15#else
16// To regenerate this file, set gn arg "skia_generate_workarounds = true"
17// or invoke `bazel run //tools:generate_workarounds`
18// This is not rebuilt by default to avoid embedders having to have extra
19// build steps.
21#endif
22
24
25#include <stdint.h>
26#include <vector>
27
29#define GPU_OP(type, name) type,
31#undef GPU_OP
33};
34
36 public:
39 explicit GrDriverBugWorkarounds(const std::vector<int32_t>& workarounds);
40
42
43 // Turn on any workarounds listed in |workarounds| (but don't turn any off).
44 void applyOverrides(const GrDriverBugWorkarounds& workarounds);
45
47
48#define GPU_OP(type, name) bool name = false;
50#undef GPU_OP
51};
52
53#endif
#define GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
#define GPU_OP(type, name)
GrDriverBugWorkaroundType
@ NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES
#define SK_API
Definition: SkAPI.h:35
GrDriverBugWorkarounds & operator=(const GrDriverBugWorkarounds &)=default
GrDriverBugWorkarounds(const GrDriverBugWorkarounds &)=default
GrDriverBugWorkarounds(const std::vector< int32_t > &workarounds)