blob: a1f27a3205ac28a7f278cc9f0c50f4f0b299b6f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrDriverBugWorkarounds.h"
#include "SkTypes.h"
GrDriverBugWorkarounds::GrDriverBugWorkarounds() = default;
GrDriverBugWorkarounds::GrDriverBugWorkarounds(
const std::vector<int>& enabled_driver_bug_workarounds) {
for (auto id : enabled_driver_bug_workarounds) {
switch (id) {
#define GPU_OP(type, name) \
case GrDriverBugWorkaroundType::type: \
name = true; \
break;
GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
#undef GPU_OP
default:
SK_ABORT("Not implemented");
break;
}
}
}
void GrDriverBugWorkarounds::applyOverrides(
const GrDriverBugWorkarounds& workarounds) {
#define GPU_OP(type, name) \
name |= workarounds.name;
GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
#undef GPU_OP
}
GrDriverBugWorkarounds::~GrDriverBugWorkarounds() = default;
|