зеркало из https://github.com/mozilla/moz-skia.git
Fix more VS2010 warnings.
Review URL: http://codereview.appspot.com/5169053/ git-svn-id: http://skia.googlecode.com/svn/trunk@2432 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
6150c2051e
Коммит
8e06dabfe6
|
@ -40,7 +40,7 @@ void DebuggerStateView::onDraw(SkCanvas* canvas) {
|
|||
SkPaint p;
|
||||
p.setTextSize(SKDEBUGGER_TEXTSIZE);
|
||||
p.setAntiAlias(true);
|
||||
int x = 50;
|
||||
SkScalar x = 50 * SK_Scalar1;
|
||||
canvas->drawText(fPaintInfo.c_str(), fPaintInfo.size(), x, 30, p);
|
||||
canvas->drawText(fMatrix.c_str(), fMatrix.size(), x, 60, p);
|
||||
canvas->drawText(fClip.c_str(), fClip.size(), x, 90, p);
|
||||
|
|
|
@ -11,7 +11,7 @@ typedef int64_t SkDScalar;
|
|||
|
||||
static SkScalar SkDScalar_toScalar(SkDScalar value) {
|
||||
SkDScalar result = (value + (1 << 15)) >> 16;
|
||||
int top = result >> 31;
|
||||
SkDEBUGCODE(int top = static_cast<int>(result >> 31);)
|
||||
SkASSERT(top == 0 || top == -1);
|
||||
return (SkScalar)result;
|
||||
}
|
||||
|
|
|
@ -179,12 +179,12 @@ static int compare_diff_mean_mismatches (DiffRecord** lhs, DiffRecord** rhs) {
|
|||
/// Comparison routine for qsort; sorts by max(fMaxMismatch{RGB})
|
||||
/// from largest to smallest.
|
||||
static int compare_diff_max_mismatches (DiffRecord** lhs, DiffRecord** rhs) {
|
||||
float leftValue = MAX3((*lhs)->fMaxMismatchR,
|
||||
(*lhs)->fMaxMismatchG,
|
||||
(*lhs)->fMaxMismatchB);
|
||||
float rightValue = MAX3((*rhs)->fMaxMismatchR,
|
||||
(*rhs)->fMaxMismatchG,
|
||||
(*rhs)->fMaxMismatchB);
|
||||
uint32_t leftValue = MAX3((*lhs)->fMaxMismatchR,
|
||||
(*lhs)->fMaxMismatchG,
|
||||
(*lhs)->fMaxMismatchB);
|
||||
uint32_t rightValue = MAX3((*rhs)->fMaxMismatchR,
|
||||
(*rhs)->fMaxMismatchG,
|
||||
(*rhs)->fMaxMismatchB);
|
||||
if (leftValue < rightValue) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ static int compute_image_height (int height, int width) {
|
|||
float scale = (float) retval / height;
|
||||
if (width * scale > 360) {
|
||||
scale = (float) 360 / width;
|
||||
retval = height * scale;
|
||||
retval = static_cast<int>(height * scale);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
@ -549,9 +549,9 @@ static void print_page_header (SkFILEWStream* stream,
|
|||
static void print_pixel_count (SkFILEWStream* stream,
|
||||
const DiffRecord& diff) {
|
||||
stream->writeText("<br>(");
|
||||
stream->writeDecAsText(diff.fFractionDifference *
|
||||
diff.fBaseWidth *
|
||||
diff.fBaseHeight);
|
||||
stream->writeDecAsText(static_cast<int>(diff.fFractionDifference *
|
||||
diff.fBaseWidth *
|
||||
diff.fBaseHeight));
|
||||
stream->writeText(" pixels)");
|
||||
/*
|
||||
stream->writeDecAsText(diff.fWeightedFraction *
|
||||
|
@ -579,9 +579,9 @@ static void print_label_cell (SkFILEWStream* stream,
|
|||
print_pixel_count(stream, diff);
|
||||
}
|
||||
stream->writeText("<br>Average color mismatch ");
|
||||
stream->writeDecAsText(MAX3(diff.fAverageMismatchR,
|
||||
diff.fAverageMismatchG,
|
||||
diff.fAverageMismatchB));
|
||||
stream->writeDecAsText(static_cast<int>(MAX3(diff.fAverageMismatchR,
|
||||
diff.fAverageMismatchG,
|
||||
diff.fAverageMismatchB)));
|
||||
stream->writeText("<br>Max color mismatch ");
|
||||
stream->writeDecAsText(MAX3(diff.fMaxMismatchR,
|
||||
diff.fMaxMismatchG,
|
||||
|
|
Загрузка…
Ссылка в новой задаче