aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrXferProcessor.h11
-rw-r--r--src/gpu/effects/GrCoverageSetOpXP.h11
-rw-r--r--src/gpu/effects/GrCustomXfermode.cpp11
-rw-r--r--src/gpu/effects/GrDisableColorXP.h11
-rw-r--r--src/gpu/effects/GrPorterDuffXferProcessor.h11
5 files changed, 45 insertions, 10 deletions
diff --git a/src/gpu/GrXferProcessor.h b/src/gpu/GrXferProcessor.h
index 90b0de95df..5ede1ae828 100644
--- a/src/gpu/GrXferProcessor.h
+++ b/src/gpu/GrXferProcessor.h
@@ -244,10 +244,14 @@ private:
// since these objects have no need for destructors. However, GCC and clang throw a warning when a
// class has virtual functions and a non-virtual destructor. We suppress that warning here and
// for the subclasses.
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
class GrXPFactory {
public:
typedef GrXferProcessor::DstProxy DstProxy;
@@ -316,9 +320,12 @@ private:
const GrCaps&,
GrPixelConfigIsClamped) const = 0;
};
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
GR_MAKE_BITFIELD_CLASS_OPS(GrXPFactory::AnalysisProperties);
diff --git a/src/gpu/effects/GrCoverageSetOpXP.h b/src/gpu/effects/GrCoverageSetOpXP.h
index 72d1b01280..cf91848944 100644
--- a/src/gpu/effects/GrCoverageSetOpXP.h
+++ b/src/gpu/effects/GrCoverageSetOpXP.h
@@ -13,10 +13,14 @@
#include "SkRegion.h"
// See the comment above GrXPFactory's definition about this warning suppression.
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
/**
* This xfer processor directly blends the the src coverage with the dst using a set operator. It is
@@ -51,8 +55,11 @@ private:
typedef GrXPFactory INHERITED;
};
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
+#if defined(__clang__)
+#pragma clang diagnostic pop
#endif
+#endif
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index 98bda3e5e6..bdeda9467c 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -200,10 +200,14 @@ void CustomXP::onGetBlendInfo(BlendInfo* blendInfo) const {
///////////////////////////////////////////////////////////////////////////////
// See the comment above GrXPFactory's definition about this warning suppression.
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
class CustomXPFactory : public GrXPFactory {
public:
constexpr CustomXPFactory(SkBlendMode mode)
@@ -228,9 +232,12 @@ private:
typedef GrXPFactory INHERITED;
};
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
sk_sp<const GrXferProcessor> CustomXPFactory::makeXferProcessor(
const GrProcessorAnalysisColor&,
diff --git a/src/gpu/effects/GrDisableColorXP.h b/src/gpu/effects/GrDisableColorXP.h
index f1ac32bb4f..0c4f5cf2bb 100644
--- a/src/gpu/effects/GrDisableColorXP.h
+++ b/src/gpu/effects/GrDisableColorXP.h
@@ -13,10 +13,14 @@
#include "SkRefCnt.h"
// See the comment above GrXPFactory's definition about this warning suppression.
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
class GrDisableColorXPFactory : public GrXPFactory {
public:
static const GrXPFactory* Get();
@@ -42,9 +46,12 @@ private:
typedef GrXPFactory INHERITED;
};
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
inline const GrXPFactory* GrDisableColorXPFactory::Get() {
// If this is constructed as static constexpr by cl.exe (2015 SP2) the vtable is null.
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.h b/src/gpu/effects/GrPorterDuffXferProcessor.h
index 37cd6899da..74ae1533bf 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.h
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.h
@@ -13,10 +13,14 @@
#include "SkBlendMode.h"
// See the comment above GrXPFactory's definition about this warning suppression.
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
class GrPorterDuffXPFactory : public GrXPFactory {
public:
static const GrXPFactory* Get(SkBlendMode blendMode);
@@ -62,8 +66,11 @@ private:
friend class GrPorterDuffTest; // for TestGetXPOutputTypes()
typedef GrXPFactory INHERITED;
};
-#if defined(__GNUC__) || defined(__clang)
+#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
#endif