aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrAtlasTextContext.cpp4
-rw-r--r--src/gpu/GrBatchFontCache.h4
-rw-r--r--src/gpu/GrPath.cpp16
-rw-r--r--src/gpu/GrStrokeInfo.cpp6
-rw-r--r--src/gpu/gl/GrGLPath.cpp2
5 files changed, 16 insertions, 16 deletions
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index a556128be5..aa4c51d85a 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -103,8 +103,8 @@ GrAtlasTextContext::GrAtlasTextContext(GrContext* context,
, fDistanceAdjustTable(SkNEW(DistanceAdjustTable)) {
// We overallocate vertices in our textblobs based on the assumption that A8 has the greatest
// vertexStride
- SK_COMPILE_ASSERT(kGrayTextVASize >= kColorTextVASize && kGrayTextVASize >= kLCDTextVASize,
- vertex_attribute_changed);
+ static_assert(kGrayTextVASize >= kColorTextVASize && kGrayTextVASize >= kLCDTextVASize,
+ "vertex_attribute_changed");
fCurrStrike = NULL;
fCache = context->getTextBlobCache();
}
diff --git a/src/gpu/GrBatchFontCache.h b/src/gpu/GrBatchFontCache.h
index fc2f3b7a29..32c3281a71 100644
--- a/src/gpu/GrBatchFontCache.h
+++ b/src/gpu/GrBatchFontCache.h
@@ -179,7 +179,7 @@ private:
kRGB_565_GrPixelConfig,
kSkia8888_GrPixelConfig
};
- SK_COMPILE_ASSERT(SK_ARRAY_COUNT(kPixelConfigs) == kMaskFormatCount, array_size_mismatch);
+ static_assert(SK_ARRAY_COUNT(kPixelConfigs) == kMaskFormatCount, "array_size_mismatch");
return kPixelConfigs[format];
}
@@ -191,7 +191,7 @@ private:
kA565_GrMaskFormat,
kARGB_GrMaskFormat,
};
- SK_COMPILE_ASSERT(SK_ARRAY_COUNT(sAtlasIndices) == kMaskFormatCount, array_size_mismatch);
+ static_assert(SK_ARRAY_COUNT(sAtlasIndices) == kMaskFormatCount, "array_size_mismatch");
SkASSERT(sAtlasIndices[format] < kMaskFormatCount);
return sAtlasIndices[format];
diff --git a/src/gpu/GrPath.cpp b/src/gpu/GrPath.cpp
index 421edd32ea..4e1119dfbb 100644
--- a/src/gpu/GrPath.cpp
+++ b/src/gpu/GrPath.cpp
@@ -18,8 +18,8 @@ inline static bool compute_key_for_line_path(const SkPath& path, const GrStrokeI
if (!path.isLine(pts)) {
return false;
}
- SK_COMPILE_ASSERT((sizeof(pts) % sizeof(uint32_t)) == 0 && sizeof(pts) > sizeof(uint32_t),
- pts_needs_padding);
+ static_assert((sizeof(pts) % sizeof(uint32_t)) == 0 && sizeof(pts) > sizeof(uint32_t),
+ "pts_needs_padding");
const int kBaseData32Cnt = 1 + sizeof(pts) / sizeof(uint32_t);
int strokeDataCnt = stroke.computeUniqueKeyFragmentData32Cnt();
@@ -39,8 +39,8 @@ inline static bool compute_key_for_oval_path(const SkPath& path, const GrStrokeI
if (!path.isOval(&rect)) {
return false;
}
- SK_COMPILE_ASSERT((sizeof(rect) % sizeof(uint32_t)) == 0 && sizeof(rect) > sizeof(uint32_t),
- rect_needs_padding);
+ static_assert((sizeof(rect) % sizeof(uint32_t)) == 0 && sizeof(rect) > sizeof(uint32_t),
+ "rect_needs_padding");
const int kBaseData32Cnt = 1 + sizeof(rect) / sizeof(uint32_t);
int strokeDataCnt = stroke.computeUniqueKeyFragmentData32Cnt();
@@ -69,8 +69,8 @@ inline static bool compute_key_for_simple_path(const SkPath& path, const GrStrok
}
// If somebody goes wild with the constant, it might cause an overflow.
- SK_COMPILE_ASSERT(kSimpleVolatilePathVerbLimit <= 100,
- big_simple_volatile_path_verb_limit_may_cause_overflow);
+ static_assert(kSimpleVolatilePathVerbLimit <= 100,
+ "big_simple_volatile_path_verb_limit_may_cause_overflow");
const int pointCnt = path.countPoints();
if (pointCnt < 0) {
@@ -121,8 +121,8 @@ inline static bool compute_key_for_simple_path(const SkPath& path, const GrStrok
path.getVerbs(reinterpret_cast<uint8_t*>(&builder[i]), verbCnt);
i += verbData32Cnt;
- SK_COMPILE_ASSERT(((sizeof(SkPoint) % sizeof(uint32_t)) == 0) &&
- sizeof(SkPoint) > sizeof(uint32_t), skpoint_array_needs_padding);
+ static_assert(((sizeof(SkPoint) % sizeof(uint32_t)) == 0) && sizeof(SkPoint) > sizeof(uint32_t),
+ "skpoint_array_needs_padding");
// Here we assume getPoints does a memcpy, so that we do not need to worry about the alignment.
path.getPoints(reinterpret_cast<SkPoint*>(&builder[i]), pointCnt);
diff --git a/src/gpu/GrStrokeInfo.cpp b/src/gpu/GrStrokeInfo.cpp
index 0ad4179add..03483afec7 100644
--- a/src/gpu/GrStrokeInfo.cpp
+++ b/src/gpu/GrStrokeInfo.cpp
@@ -36,9 +36,9 @@ void GrStrokeInfo::asUniqueKeyFragment(uint32_t* data) const {
kCapShift = kJoinShift + kJoinBits,
};
- SK_COMPILE_ASSERT(SkStrokeRec::kStyleCount <= (1 << kStyleBits), style_shift_will_be_wrong);
- SK_COMPILE_ASSERT(SkPaint::kJoinCount <= (1 << kJoinBits), cap_shift_will_be_wrong);
- SK_COMPILE_ASSERT(SkPaint::kCapCount <= (1 << kCapBits), cap_does_not_fit);
+ static_assert(SkStrokeRec::kStyleCount <= (1 << kStyleBits), "style_shift_will_be_wrong");
+ static_assert(SkPaint::kJoinCount <= (1 << kJoinBits), "cap_shift_will_be_wrong");
+ static_assert(SkPaint::kCapCount <= (1 << kCapBits), "cap_does_not_fit");
uint32_t styleKey = this->getStyle();
if (this->needToApply()) {
styleKey |= this->getJoin() << kJoinShift;
diff --git a/src/gpu/gl/GrGLPath.cpp b/src/gpu/gl/GrGLPath.cpp
index 0b35a7007f..9a4aa0cbef 100644
--- a/src/gpu/gl/GrGLPath.cpp
+++ b/src/gpu/gl/GrGLPath.cpp
@@ -105,7 +105,7 @@ void GrGLPath::InitPathObject(GrGLGpu* gpu,
if ((skPath.getSegmentMasks() & SkPath::kConic_SegmentMask) == 0) {
// This branch does type punning, converting SkPoint* to GrGLfloat*.
- SK_COMPILE_ASSERT(sizeof(SkPoint) == sizeof(GrGLfloat) * 2, sk_point_not_two_floats);
+ static_assert(sizeof(SkPoint) == sizeof(GrGLfloat) * 2, "sk_point_not_two_floats");
// This branch does not convert with SkScalarToFloat.
#ifndef SK_SCALAR_IS_FLOAT
#error Need SK_SCALAR_IS_FLOAT.