2 * Copyright 2018 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #include "include/gpu/GrDriverBugWorkarounds.h"
10 #include "include/core/SkTypes.h"
12 GrDriverBugWorkarounds::GrDriverBugWorkarounds() = default;
14 GrDriverBugWorkarounds::GrDriverBugWorkarounds(
15 const std::vector<int>& enabled_driver_bug_workarounds) {
16 for (auto id : enabled_driver_bug_workarounds) {
18 #define GPU_OP(type, name) \
19 case GrDriverBugWorkaroundType::type: \
23 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
26 SK_ABORT("Not implemented");
32 void GrDriverBugWorkarounds::applyOverrides(
33 const GrDriverBugWorkarounds& workarounds) {
34 #define GPU_OP(type, name) \
35 name |= workarounds.name;
37 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
41 GrDriverBugWorkarounds::~GrDriverBugWorkarounds() = default;