Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@8003 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-03-06 07:01:46 +00:00
Родитель 64494e99af
Коммит 64334352cc
9 изменённых файлов: 18 добавлений и 19 удалений

Просмотреть файл

@ -166,7 +166,7 @@ static bool intersect3(const Cubic& cubic1, double t1s, double t1e, const Cubic&
&& to2 - offset <= tLimits2[1][1] && tLimits2[1][0] <= to2 + offset);
SkDebugf("%.*s %s 1 c1Bottom=%1.9g c1Top=%1.9g c2Bottom=%1.9g c2Top=%1.9g"
" 1-o=%1.9g 1+o=%1.9g 2-o=%1.9g 2+o=%1.9g offset=%1.9g\n",
i.depth()*2, tab, __FUNCTION__, c1Bottom, c1Top, 0., 1.,
i.depth()*2, tab, __FUNCTION__, c1Bottom, c1Top, 0., 1.,
to1 - offset, to1 + offset, to2 - offset, to2 + offset, offset);
SkDebugf("%.*s %s 1 to1=%1.9g to2=%1.9g c1Min=%1.9g c1Max=%1.9g c2Min=%1.9g"
" c2Max=%1.9g\n", i.depth()*2, tab, __FUNCTION__, to1, to2, c1Min, c1Max, c2Min, c2Max);
@ -206,7 +206,7 @@ static bool intersect3(const Cubic& cubic1, double t1s, double t1e, const Cubic&
&& to2 - offset <= tLimits2[1][1] && tLimits2[1][0] <= to2 + offset);
SkDebugf("%.*s %s 2 c1Bottom=%1.9g c1Top=%1.9g c2Bottom=%1.9g c2Top=%1.9g"
" 1-o=%1.9g 1+o=%1.9g 2-o=%1.9g 2+o=%1.9g offset=%1.9g\n",
i.depth()*2, tab, __FUNCTION__, 0., 1., c2Bottom, c2Top,
i.depth()*2, tab, __FUNCTION__, 0., 1., c2Bottom, c2Top,
to1 - offset, to1 + offset, to2 - offset, to2 + offset, offset);
SkDebugf("%.*s %s 2 to1=%1.9g to2=%1.9g c1Min=%1.9g c1Max=%1.9g c2Min=%1.9g"
" c2Max=%1.9g\n", i.depth()*2, tab, __FUNCTION__, to1, to2, c1Min, c1Max, c2Min, c2Max);
@ -230,7 +230,7 @@ static bool intersect3(const Cubic& cubic1, double t1s, double t1e, const Cubic&
&& to2 - offset <= tLimits2[1][1] && tLimits2[1][0] <= to2 + offset);
SkDebugf("%.*s %s 3 c1Bottom=%1.9g c1Top=%1.9g c2Bottom=%1.9g c2Top=%1.9g"
" 1-o=%1.9g 1+o=%1.9g 2-o=%1.9g 2+o=%1.9g offset=%1.9g\n",
i.depth()*2, tab, __FUNCTION__, 0., 1., c2Bottom, c2Top,
i.depth()*2, tab, __FUNCTION__, 0., 1., c2Bottom, c2Top,
to1 - offset, to1 + offset, to2 - offset, to2 + offset, offset);
SkDebugf("%.*s %s 3 to1=%1.9g to2=%1.9g c1Min=%1.9g c1Max=%1.9g c2Min=%1.9g"
" c2Max=%1.9g\n", i.depth()*2, tab, __FUNCTION__, to1, to2, c1Min, c1Max, c2Min, c2Max);
@ -241,7 +241,7 @@ static bool intersect3(const Cubic& cubic1, double t1s, double t1e, const Cubic&
i.used() > 0 ? i.fT[0][i.used() - 1] : -1);
#endif
}
#else
#else
double c1Bottom = tIdx == 0 ? 0 :
(t1Start + (t1 - t1Start) * locals.fT[0][tIdx - 1] + to1) / 2;
double c1Min = SkTMax(c1Bottom, to1 - offset);
@ -275,7 +275,7 @@ static bool intersect3(const Cubic& cubic1, double t1s, double t1e, const Cubic&
&& to2 - offset <= 0.211327209 && 0.211327209 <= to2 + offset);
SkDebugf("%s c1Bottom=%1.9g c1Top=%1.9g c2Bottom=%1.9g c2Top=%1.9g"
" 1-o=%1.9g 1+o=%1.9g 2-o=%1.9g 2+o=%1.9g offset=%1.9g\n",
__FUNCTION__, c1Bottom, c1Top, c2Bottom, c2Top,
__FUNCTION__, c1Bottom, c1Top, c2Bottom, c2Top,
to1 - offset, to1 + offset, to2 - offset, to2 + offset, offset);
SkDebugf("%s to1=%1.9g to2=%1.9g c1Min=%1.9g c1Max=%1.9g c2Min=%1.9g"
" c2Max=%1.9g\n", __FUNCTION__, to1, to2, c1Min, c1Max, c2Min, c2Max);

Просмотреть файл

@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "DataTypes.h"
#include "EdgeWalker_Test.h"
#include "Intersection_Tests.h"

Просмотреть файл

@ -4218,7 +4218,7 @@ the same winding is shared by both.
SkASSERT(&span == &span.fOther->fTs[span.fOtherIndex].fOther->
fTs[span.fOther->fTs[span.fOtherIndex].fOtherIndex]);
SkDebugf(") t=%1.9g [%d] (%1.9g,%1.9g) tEnd=%1.9g newWindSum=%d windSum=",
span.fT, span.fOther->fTs[span.fOtherIndex].fOtherIndex, pt.fX, pt.fY,
span.fT, span.fOther->fTs[span.fOtherIndex].fOtherIndex, pt.fX, pt.fY,
(&span)[1].fT, winding);
if (span.fWindSum == SK_MinS32) {
SkDebugf("?");
@ -4304,7 +4304,7 @@ the same winding is shared by both.
}
}
}
SkDebugf("%s [%d] %s", __FUNCTION__, index,
SkDebugf("%s [%d] %s", __FUNCTION__, index,
angle.unsortable() ? "*** UNSORTABLE *** " : "");
#if COMPACT_DEBUG_SORT
SkDebugf("id=%d %s start=%d (%1.9g,%,1.9g) end=%d (%1.9g,%,1.9g)",

Просмотреть файл

@ -380,4 +380,3 @@ private:
typedef SkFILEStream SkURLStream;
#endif

Просмотреть файл

@ -105,7 +105,7 @@ public:
// all above modes can be expressed as pair of src/dst Coeffs
kCoeffModesCnt,
// Following blend modes are defined in the CSS Compositing standard:
// Following blend modes are defined in the CSS Compositing standard:
// https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending
kScreen_Mode = kCoeffModesCnt,
kOverlay_Mode,

Просмотреть файл

@ -61,7 +61,7 @@ static int count_tables(SkStream* stream, int ttcIndex, size_t* offsetToDir) {
if ((unsigned)ttcIndex >= count) {
return 0;
}
if (ttcIndex > 0) { // need to read more of the shared header
stream->rewind();
size_t amount = sizeof(shared) + ttcIndex * sizeof(uint32_t);
@ -138,7 +138,7 @@ int SkFontStream::CountTTCEntries(SkStream* stream) {
return SkEndian_SwapBE32(shared.fCollection.fNumOffsets);
} else {
return 0;
}
}
}
int SkFontStream::GetTableTags(SkStream* stream, int ttcIndex,

Просмотреть файл

@ -443,8 +443,8 @@ static inline int Lum(int r, int g, int b)
static inline int min2(int a, int b) { return a < b ? a : b; }
static inline int max2(int a, int b) { return a > b ? a : b; }
#define minimum(a, b, c) min2(min2(a, b), c)
#define maximum(a, b, c) max2(max2(a, b), c)
#define minimum(a, b, c) min2(min2(a, b), c)
#define maximum(a, b, c) max2(max2(a, b), c)
static inline int Sat(int r, int g, int b) {
return maximum(r, g, b) - minimum(r, g, b);
@ -549,7 +549,7 @@ static SkPMColor hue_modeproc(SkPMColor src, SkPMColor dst) {
// kSaturation_Mode
// B(Cb, Cs) = SetLum(SetSat(Cb, Sat(Cs)), Lum(Cb))
// Create a color with the saturation of the source color and the hue and luminosity of the backdrop color.
// Create a color with the saturation of the source color and the hue and luminosity of the backdrop color.
static SkPMColor saturation_modeproc(SkPMColor src, SkPMColor dst) {
int sr = SkGetPackedR32(src);
int sg = SkGetPackedG32(src);
@ -587,7 +587,7 @@ static SkPMColor saturation_modeproc(SkPMColor src, SkPMColor dst) {
// kColor_Mode
// B(Cb, Cs) = SetLum(Cs, Lum(Cb))
// Create a color with the hue and saturation of the source color and the luminosity of the backdrop color.
// Create a color with the hue and saturation of the source color and the luminosity of the backdrop color.
static SkPMColor color_modeproc(SkPMColor src, SkPMColor dst) {
int sr = SkGetPackedR32(src);
int sg = SkGetPackedG32(src);
@ -623,7 +623,7 @@ static SkPMColor color_modeproc(SkPMColor src, SkPMColor dst) {
// kLuminosity_Mode
// B(Cb, Cs) = SetLum(Cb, Lum(Cs))
// Create a color with the luminosity of the source color and the hue and saturation of the backdrop color.
// Create a color with the luminosity of the source color and the hue and saturation of the backdrop color.
static SkPMColor luminosity_modeproc(SkPMColor src, SkPMColor dst) {
int sr = SkGetPackedR32(src);
int sg = SkGetPackedG32(src);

Просмотреть файл

@ -15,7 +15,7 @@ static const char* blend_mode_from_xfermode(SkXfermode::Mode mode) {
switch (mode) {
case SkXfermode::kSrcOver_Mode: return "Normal";
// kModulate is not really like multipy but similar most of the time.
case SkXfermode::kModulate_Mode:
case SkXfermode::kModulate_Mode:
case SkXfermode::kMultiply_Mode: return "Multiply";
case SkXfermode::kScreen_Mode: return "Screen";
case SkXfermode::kOverlay_Mode: return "Overlay";

Просмотреть файл

@ -271,7 +271,7 @@ SkStream* SkFontHost::OpenStream(uint32_t id) {
if (NULL == face) {
return NULL;
}
int ttcIndex;
// We should return ttcIndex from this call.
return open_stream(face, &ttcIndex);