зеркало из https://github.com/mozilla/moz-skia.git
Remove warnings (trailing \, signed vs unsigned, parenthesization).
Convert some tabs into spaces. git-svn-id: http://skia.googlecode.com/svn/trunk@2541 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
71dd3e0359
Коммит
83a444602e
|
@ -133,7 +133,9 @@ static void do_fuzz(SkCanvas* canvas) {
|
|||
switch (R(3)) {
|
||||
case 0: mode = SkXfermode::kSrc_Mode; break;
|
||||
case 1: mode = SkXfermode::kXor_Mode; break;
|
||||
case 2: mode = SkXfermode::kSrcOver_Mode; break;
|
||||
case 2:
|
||||
default: // silence warning
|
||||
mode = SkXfermode::kSrcOver_Mode; break;
|
||||
}
|
||||
paint.setXfermodeMode(mode);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ static void blit_lcd16_row(SkPMColor dst[], const uint16_t src[],
|
|||
int dstG = SkGetPackedG32(d);
|
||||
int dstB = SkGetPackedB32(d);
|
||||
|
||||
// LCD blitting is only supported if the dst is known/required\
|
||||
// LCD blitting is only supported if the dst is known/required
|
||||
// to be opaque
|
||||
dst[i] = SkPackARGB32(0xFF,
|
||||
blend32(srcR, dstR, maskR),
|
||||
|
|
|
@ -1338,8 +1338,8 @@ static void D1G_NoBounder_RectClip(const SkDraw1Glyph& state,
|
|||
int top = SkFixedFloor(fy);
|
||||
SkASSERT(glyph.fWidth > 0 && glyph.fHeight > 0);
|
||||
SkASSERT(NULL == state.fBounder);
|
||||
SkASSERT(NULL == state.fClip && state.fAAClip ||
|
||||
state.fClip && NULL == state.fAAClip && state.fClip->isRect());
|
||||
SkASSERT((NULL == state.fClip && state.fAAClip) ||
|
||||
(state.fClip && NULL == state.fAAClip && state.fClip->isRect()));
|
||||
|
||||
left += glyph.fLeft;
|
||||
top += glyph.fTop;
|
||||
|
|
|
@ -121,7 +121,7 @@ static void test_blur(skiatest::Reporter* reporter) {
|
|||
paint.setMaskFilter(filter);
|
||||
filter->unref();
|
||||
|
||||
for (int test = 0; test < SK_ARRAY_COUNT(tests); ++test) {
|
||||
for (size_t test = 0; test < SK_ARRAY_COUNT(tests); ++test) {
|
||||
SkPath path;
|
||||
tests[test].addPath(&path);
|
||||
SkPath strokedPath;
|
||||
|
|
|
@ -92,7 +92,7 @@ void test_matrix_max_stretch(skiatest::Reporter* reporter) {
|
|||
SkMatrix baseMats[] = {scale, rot90Scale, rotate,
|
||||
translate, perspX, perspY};
|
||||
SkMatrix mats[2*SK_ARRAY_COUNT(baseMats)];
|
||||
for (int i = 0; i < SK_ARRAY_COUNT(baseMats); ++i) {
|
||||
for (size_t i = 0; i < SK_ARRAY_COUNT(baseMats); ++i) {
|
||||
mats[i] = baseMats[i];
|
||||
bool invertable = mats[i].invert(&mats[i + SK_ARRAY_COUNT(baseMats)]);
|
||||
REPORTER_ASSERT(reporter, invertable);
|
||||
|
@ -125,7 +125,7 @@ void test_matrix_max_stretch(skiatest::Reporter* reporter) {
|
|||
static const SkScalar gMaxStretchTol = (97 * SK_Scalar1) / 100;
|
||||
SkScalar max = 0;
|
||||
SkVector vectors[1000];
|
||||
for (int i = 0; i < SK_ARRAY_COUNT(vectors); ++i) {
|
||||
for (size_t i = 0; i < SK_ARRAY_COUNT(vectors); ++i) {
|
||||
vectors[i].fX = rand.nextSScalar1();
|
||||
vectors[i].fY = rand.nextSScalar1();
|
||||
if (!vectors[i].normalize()) {
|
||||
|
@ -134,7 +134,7 @@ void test_matrix_max_stretch(skiatest::Reporter* reporter) {
|
|||
}
|
||||
}
|
||||
mat.mapVectors(vectors, SK_ARRAY_COUNT(vectors));
|
||||
for (int i = 0; i < SK_ARRAY_COUNT(vectors); ++i) {
|
||||
for (size_t i = 0; i < SK_ARRAY_COUNT(vectors); ++i) {
|
||||
SkScalar d = vectors[i].length();
|
||||
REPORTER_ASSERT(reporter, SkScalarDiv(d, stretch) < gStretchTol);
|
||||
if (max < d) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче