e990fcc4b0
In C++11 a user declared destructor still requires the compiler to implicitly default the copy constructor and copy assignment operator, but this is deprecated. Note that a user declared destructor suppresses the move constructor and move assignment operator; a user declared destructor exists if any '~Foo' method declaration appears inside 'class Foo' (even if defaulted); if the copy and move operations are the same then copy operations that take 'const Foo&' will do fine double duty as move operations. Clang seems to have an issue with this warning, in that it does not appear to distinguish between compiler defaulted and user defaulted destructors. As a result, it does not always warn when it should. There may yet be places in the code where a move operation is desired but may be suppressed because the implicitly defaulted moves are not declared because a destructor has been declared. This wraps dawn and shaderc configs in 'third_party' so that their headers will be included through '-isystem' in order to avoid the warnings generated by including their headers. Change-Id: I681524cd890d86305aa99b6b765a52113b4dfa4b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280406 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
/*
|
|
* Copyright 2018 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef GrDriverBugWorkarounds_DEFINED
|
|
#define GrDriverBugWorkarounds_DEFINED
|
|
|
|
// External embedders of Skia can override this to use their own list
|
|
// of workaround names.
|
|
#ifdef SK_GPU_WORKAROUNDS_HEADER
|
|
#include SK_GPU_WORKAROUNDS_HEADER
|
|
#else
|
|
// To regenerate this file, set gn arg "skia_generate_workarounds = true".
|
|
// This is not rebuilt by default to avoid embedders having to have extra
|
|
// build steps.
|
|
#include "include/gpu/GrDriverBugWorkaroundsAutogen.h"
|
|
#endif
|
|
|
|
#include "include/core/SkTypes.h"
|
|
|
|
#include <stdint.h>
|
|
#include <vector>
|
|
|
|
enum GrDriverBugWorkaroundType {
|
|
#define GPU_OP(type, name) type,
|
|
GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
|
|
#undef GPU_OP
|
|
NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES
|
|
};
|
|
|
|
class SK_API GrDriverBugWorkarounds {
|
|
public:
|
|
GrDriverBugWorkarounds();
|
|
GrDriverBugWorkarounds(const GrDriverBugWorkarounds&);
|
|
GrDriverBugWorkarounds& operator=(const GrDriverBugWorkarounds&);
|
|
~GrDriverBugWorkarounds();
|
|
|
|
explicit GrDriverBugWorkarounds(const std::vector<int32_t>& workarounds);
|
|
|
|
// Turn on any workarounds listed in |workarounds| (but don't turn any off).
|
|
void applyOverrides(const GrDriverBugWorkarounds& workarounds);
|
|
|
|
#define GPU_OP(type, name) bool name = false;
|
|
GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
|
|
#undef GPU_OP
|
|
};
|
|
|
|
#endif
|