Reland x3 "Remove most of GrConfig.h"
This change makes this safe for Chrome:
https://skia-review.googlesource.com/c/skia/+/260779
This reverts commit 3f1a98b779ace0df57ff31edc0a4a28ddfd4a477.
Change-Id: Ic6886ceabbf626040fc527ea10fe06cbe74a3854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260783
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrStyle.cpp b/src/gpu/GrStyle.cpp
index 305b5b3..caf361b 100644
--- a/src/gpu/GrStyle.cpp
+++ b/src/gpu/GrStyle.cpp
@@ -9,7 +9,7 @@
#include "src/utils/SkDashPathPriv.h"
int GrStyle::KeySize(const GrStyle &style, Apply apply, uint32_t flags) {
- GR_STATIC_ASSERT(sizeof(uint32_t) == sizeof(SkScalar));
+ static_assert(sizeof(uint32_t) == sizeof(SkScalar));
int size = 0;
if (style.isDashed()) {
// One scalar for scale, one for dash phase, and one for each dash value.
@@ -34,7 +34,7 @@
uint32_t flags) {
SkASSERT(key);
SkASSERT(KeySize(style, apply) >= 0);
- GR_STATIC_ASSERT(sizeof(uint32_t) == sizeof(SkScalar));
+ static_assert(sizeof(uint32_t) == sizeof(SkScalar));
int i = 0;
// The scale can influence both the path effect and stroking. We want to preserve the
@@ -44,7 +44,7 @@
// from SkStrokeRec output by the the path effect (and no additional path effect).
// Since the scale can affect both parts of 2 we write it into the key twice.
if (style.isDashed()) {
- GR_STATIC_ASSERT(sizeof(style.dashPhase()) == sizeof(uint32_t));
+ static_assert(sizeof(style.dashPhase()) == sizeof(uint32_t));
SkScalar phase = style.dashPhase();
memcpy(&key[i++], &scale, sizeof(SkScalar));
memcpy(&key[i++], &phase, sizeof(SkScalar));
@@ -70,9 +70,9 @@
kJoinShift = kStyleBits,
kCapShift = kJoinShift + kJoinBits,
};
- GR_STATIC_ASSERT(SkStrokeRec::kStyleCount <= (1 << kStyleBits));
- GR_STATIC_ASSERT(SkPaint::kJoinCount <= (1 << kJoinBits));
- GR_STATIC_ASSERT(SkPaint::kCapCount <= (1 << kCapBits));
+ static_assert(SkStrokeRec::kStyleCount <= (1 << kStyleBits));
+ static_assert(SkPaint::kJoinCount <= (1 << kJoinBits));
+ static_assert(SkPaint::kCapCount <= (1 << kCapBits));
// The cap type only matters for unclosed shapes. However, a path effect could unclose
// the shape before it is stroked.
SkPaint::Cap cap = SkPaint::kDefault_Cap;