Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@6521 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2012-11-21 02:02:25 +00:00
Родитель 158c59524c
Коммит b0a327e939
19 изменённых файлов: 28 добавлений и 28 удалений

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

@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be * Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. * found in the LICENSE file.
*/ */
#include "Simplify.h" #include "Simplify.h"
namespace Op { namespace Op {
@ -298,7 +298,7 @@ void operate(const SkPath& one, const SkPath& two, ShapeOp op, SkPath& result) {
} while (addIntersectTs(current, next) && nextPtr != listEnd); } while (addIntersectTs(current, next) && nextPtr != listEnd);
} while (currentPtr != listEnd); } while (currentPtr != listEnd);
// eat through coincident edges // eat through coincident edges
int total = 0; int total = 0;
int index; int index;
for (index = 0; index < contourList.count(); ++index) { for (index = 0; index < contourList.count(); ++index) {

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

@ -3392,7 +3392,7 @@ public:
SkDebugf(" windValue=%d\n", fTs[i].fWindValue); SkDebugf(" windValue=%d\n", fTs[i].fWindValue);
} }
} }
// This isn't useful yet -- but leaving it in for now in case i think of something // This isn't useful yet -- but leaving it in for now in case i think of something
// to use it for // to use it for
void validateActiveSpans() const { void validateActiveSpans() const {

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

@ -138,7 +138,7 @@ private:
MatrixProc chooseMatrixProc(bool trivial_matrix); MatrixProc chooseMatrixProc(bool trivial_matrix);
bool chooseProcs(const SkMatrix& inv, const SkPaint&); bool chooseProcs(const SkMatrix& inv, const SkPaint&);
ShaderProc32 chooseShaderProc32(); ShaderProc32 chooseShaderProc32();
// Return false if we failed to setup for fast translate (e.g. overflow) // Return false if we failed to setup for fast translate (e.g. overflow)
bool setupForTranslate(); bool setupForTranslate();

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

@ -1812,7 +1812,7 @@ void SkFontHost::FilterRec(SkScalerContext::Rec* rec, SkTypeface*) {
rec->fFlags &= ~flagsWeDontSupport; rec->fFlags &= ~flagsWeDontSupport;
bool lcdSupport = supports_LCD(); bool lcdSupport = supports_LCD();
// Only two levels of hinting are supported. // Only two levels of hinting are supported.
// kNo_Hinting means avoid CoreGraphics outline dilation. // kNo_Hinting means avoid CoreGraphics outline dilation.
// kNormal_Hinting means CoreGraphics outline dilation is allowed. // kNormal_Hinting means CoreGraphics outline dilation is allowed.

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

@ -26,7 +26,7 @@ struct SkOTTableOS2 {
union Version { union Version {
SK_OT_USHORT version; SK_OT_USHORT version;
//original V0 TT //original V0 TT
struct VA : SkOTTableOS2_VA { } vA; struct VA : SkOTTableOS2_VA { } vA;
struct V0 : SkOTTableOS2_V0 { } v0; struct V0 : SkOTTableOS2_V0 { } v0;

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

@ -21,7 +21,7 @@ struct SkOTTableOS2_V0 {
//SkOTTableOS2_VA::VERSION and SkOTTableOS2_V0::VERSION are both 0. //SkOTTableOS2_VA::VERSION and SkOTTableOS2_V0::VERSION are both 0.
//The only way to differentiate these two versions is by the size of the table. //The only way to differentiate these two versions is by the size of the table.
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(0); static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(0);
SK_OT_SHORT xAvgCharWidth; SK_OT_SHORT xAvgCharWidth;
struct WeightClass { struct WeightClass {
SK_TYPED_ENUM(Value, SK_OT_USHORT, SK_TYPED_ENUM(Value, SK_OT_USHORT,

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

@ -19,7 +19,7 @@
struct SkOTTableOS2_V1 { struct SkOTTableOS2_V1 {
SK_OT_USHORT version; SK_OT_USHORT version;
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(1); static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(1);
SK_OT_SHORT xAvgCharWidth; SK_OT_SHORT xAvgCharWidth;
struct WeightClass { struct WeightClass {
SK_TYPED_ENUM(Value, SK_OT_USHORT, SK_TYPED_ENUM(Value, SK_OT_USHORT,

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

@ -19,7 +19,7 @@
struct SkOTTableOS2_V2 { struct SkOTTableOS2_V2 {
SK_OT_USHORT version; SK_OT_USHORT version;
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(2); static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(2);
SK_OT_SHORT xAvgCharWidth; SK_OT_SHORT xAvgCharWidth;
struct WeightClass { struct WeightClass {
SK_TYPED_ENUM(Value, SK_OT_USHORT, SK_TYPED_ENUM(Value, SK_OT_USHORT,

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

@ -19,7 +19,7 @@
struct SkOTTableOS2_V3 { struct SkOTTableOS2_V3 {
SK_OT_USHORT version; SK_OT_USHORT version;
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(3); static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(3);
SK_OT_SHORT xAvgCharWidth; SK_OT_SHORT xAvgCharWidth;
struct WeightClass { struct WeightClass {
SK_TYPED_ENUM(Value, SK_OT_USHORT, SK_TYPED_ENUM(Value, SK_OT_USHORT,

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

@ -19,7 +19,7 @@
struct SkOTTableOS2_V4 { struct SkOTTableOS2_V4 {
SK_OT_USHORT version; SK_OT_USHORT version;
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(4); static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(4);
SK_OT_SHORT xAvgCharWidth; SK_OT_SHORT xAvgCharWidth;
struct WeightClass { struct WeightClass {
SK_TYPED_ENUM(Value, SK_OT_USHORT, SK_TYPED_ENUM(Value, SK_OT_USHORT,

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

@ -22,7 +22,7 @@ struct SkOTTableOS2_VA {
//SkOTTableOS2_VA::VERSION and SkOTTableOS2_V0::VERSION are both 0. //SkOTTableOS2_VA::VERSION and SkOTTableOS2_V0::VERSION are both 0.
//The only way to differentiate these two versions is by the size of the table. //The only way to differentiate these two versions is by the size of the table.
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(0); static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(0);
SK_OT_SHORT xAvgCharWidth; SK_OT_SHORT xAvgCharWidth;
struct WeightClass { struct WeightClass {
SK_TYPED_ENUM(Value, SK_OT_USHORT, SK_TYPED_ENUM(Value, SK_OT_USHORT,

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

@ -26,7 +26,7 @@ struct SkOTTableGlyph {
static const SK_OT_CHAR TAG2 = 'y'; static const SK_OT_CHAR TAG2 = 'y';
static const SK_OT_CHAR TAG3 = 'f'; static const SK_OT_CHAR TAG3 = 'f';
static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableGlyph>::value; static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableGlyph>::value;
class Iterator { class Iterator {
public: public:
Iterator(const SkOTTableGlyph& glyf, Iterator(const SkOTTableGlyph& glyf,
@ -36,7 +36,7 @@ struct SkOTTableGlyph {
, fLocaFormat(SkOTTableHead::IndexToLocFormat::ShortOffsets == locaFormat.value ? 0 : 1) , fLocaFormat(SkOTTableHead::IndexToLocFormat::ShortOffsets == locaFormat.value ? 0 : 1)
, fCurrentGlyphOffset(0) , fCurrentGlyphOffset(0)
{ fLocaPtr.shortOffset = reinterpret_cast<const SK_OT_USHORT*>(&loca); } { fLocaPtr.shortOffset = reinterpret_cast<const SK_OT_USHORT*>(&loca); }
void advance(uint16_t num) { void advance(uint16_t num) {
fLocaPtr.shortOffset += num << fLocaFormat; fLocaPtr.shortOffset += num << fLocaFormat;
fCurrentGlyphOffset = fLocaFormat ? SkEndian_SwapBE32(*fLocaPtr.longOffset) fCurrentGlyphOffset = fLocaFormat ? SkEndian_SwapBE32(*fLocaPtr.longOffset)
@ -70,15 +70,15 @@ struct SkOTTableGlyphData {
SK_OT_FWORD yMin; SK_OT_FWORD yMin;
SK_OT_FWORD xMax; SK_OT_FWORD xMax;
SK_OT_FWORD yMax; SK_OT_FWORD yMax;
struct Simple { struct Simple {
SK_OT_USHORT endPtsOfContours[1/*numberOfContours*/]; SK_OT_USHORT endPtsOfContours[1/*numberOfContours*/];
struct Instructions { struct Instructions {
SK_OT_USHORT length; SK_OT_USHORT length;
SK_OT_BYTE data[1/*length*/]; SK_OT_BYTE data[1/*length*/];
}; };
union Flags { union Flags {
struct Field { struct Field {
SK_OT_BYTE_BITFIELD( SK_OT_BYTE_BITFIELD(
@ -101,11 +101,11 @@ struct SkOTTableGlyphData {
SK_OT_BYTE value; SK_OT_BYTE value;
} raw; } raw;
}; };
//xCoordinates //xCoordinates
//yCoordinates //yCoordinates
}; };
struct Composite { struct Composite {
struct Component { struct Component {
union Flags { union Flags {
@ -140,7 +140,7 @@ struct SkOTTableGlyphData {
static const SK_OT_USHORT MORE_COMPONENTS_Mask = SkTEndian_SwapBE16(1 << 5); static const SK_OT_USHORT MORE_COMPONENTS_Mask = SkTEndian_SwapBE16(1 << 5);
static const SK_OT_USHORT WE_HAVE_AN_X_AND_Y_SCALE_Mask = SkTEndian_SwapBE16(1 << 6); static const SK_OT_USHORT WE_HAVE_AN_X_AND_Y_SCALE_Mask = SkTEndian_SwapBE16(1 << 6);
static const SK_OT_USHORT WE_HAVE_A_TWO_BY_TWO_Mask = SkTEndian_SwapBE16(1 << 7); static const SK_OT_USHORT WE_HAVE_A_TWO_BY_TWO_Mask = SkTEndian_SwapBE16(1 << 7);
static const SK_OT_USHORT WE_HAVE_INSTRUCTIONS_Mask = SkTEndian_SwapBE16(1 << 8); static const SK_OT_USHORT WE_HAVE_INSTRUCTIONS_Mask = SkTEndian_SwapBE16(1 << 8);
static const SK_OT_USHORT USE_MY_METRICS_Mask = SkTEndian_SwapBE16(1 << 9); static const SK_OT_USHORT USE_MY_METRICS_Mask = SkTEndian_SwapBE16(1 << 9);
static const SK_OT_USHORT OVERLAP_COMPOUND_Mask = SkTEndian_SwapBE16(1 << 10); static const SK_OT_USHORT OVERLAP_COMPOUND_Mask = SkTEndian_SwapBE16(1 << 10);
@ -200,7 +200,7 @@ struct SkOTTableGlyphData {
} byteIndex; } byteIndex;
} transform; } transform;
} component;//[] last element does not set MORE_COMPONENTS } component;//[] last element does not set MORE_COMPONENTS
/** Comes after the last Component if the last component has WE_HAVE_INSTR. */ /** Comes after the last Component if the last component has WE_HAVE_INSTR. */
struct Instructions { struct Instructions {
SK_OT_USHORT length; SK_OT_USHORT length;

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

@ -19,7 +19,7 @@ struct SkOTTableIndexToLocation {
static const SK_OT_CHAR TAG2 = 'c'; static const SK_OT_CHAR TAG2 = 'c';
static const SK_OT_CHAR TAG3 = 'a'; static const SK_OT_CHAR TAG3 = 'a';
static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableIndexToLocation>::value; static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableIndexToLocation>::value;
union Offsets { union Offsets {
SK_OT_USHORT shortOffset[1]; SK_OT_USHORT shortOffset[1];
SK_OT_ULONG longOffset[1]; SK_OT_ULONG longOffset[1];

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

@ -23,7 +23,7 @@ struct SkOTTableMaximumProfile {
union Version { union Version {
SK_OT_Fixed version; SK_OT_Fixed version;
struct CFF : SkOTTableMaximumProfile_CFF { } cff; struct CFF : SkOTTableMaximumProfile_CFF { } cff;
struct TT : SkOTTableMaximumProfile_TT { } tt; struct TT : SkOTTableMaximumProfile_TT { } tt;
} version; } version;

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

@ -16,7 +16,7 @@
struct SkOTTableMaximumProfile_CFF { struct SkOTTableMaximumProfile_CFF {
SK_OT_Fixed version; SK_OT_Fixed version;
static const SK_OT_Fixed VERSION = SkTEndian_SwapBE32(0x00005000); static const SK_OT_Fixed VERSION = SkTEndian_SwapBE32(0x00005000);
SK_OT_USHORT numGlyphs; SK_OT_USHORT numGlyphs;
}; };

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

@ -17,7 +17,7 @@
struct SkOTTableMaximumProfile_TT { struct SkOTTableMaximumProfile_TT {
SK_OT_Fixed version; SK_OT_Fixed version;
static const SK_OT_Fixed VERSION = SkTEndian_SwapBE32(0x00010000); static const SK_OT_Fixed VERSION = SkTEndian_SwapBE32(0x00010000);
SK_OT_USHORT numGlyphs; SK_OT_USHORT numGlyphs;
SK_OT_USHORT maxPoints; SK_OT_USHORT maxPoints;
SK_OT_USHORT maxContours; SK_OT_USHORT maxContours;

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

@ -20,7 +20,7 @@ extern const uint8_t SK_OT_GlyphData_NoOutline[] = {
0x0,0x0, //SkOTTableGlyphData::yMin 0x0,0x0, //SkOTTableGlyphData::yMin
0x0,0x0, //SkOTTableGlyphData::xMax 0x0,0x0, //SkOTTableGlyphData::xMax
0x0,0x0, //SkOTTableGlyphData::yMax 0x0,0x0, //SkOTTableGlyphData::yMax
0x0,0x0, //SkOTTableGlyphDataInstructions::length 0x0,0x0, //SkOTTableGlyphDataInstructions::length
}; };

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

@ -52,7 +52,7 @@ struct SkSFNTHeader {
SK_SFNT_USHORT searchRange; SK_SFNT_USHORT searchRange;
SK_SFNT_USHORT entrySelector; SK_SFNT_USHORT entrySelector;
SK_SFNT_USHORT rangeShift; SK_SFNT_USHORT rangeShift;
struct TableDirectoryEntry { struct TableDirectoryEntry {
SK_SFNT_ULONG tag; SK_SFNT_ULONG tag;
SK_SFNT_ULONG checksum; SK_SFNT_ULONG checksum;

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

@ -42,7 +42,7 @@ static void test_strokerect(skiatest::Reporter* reporter) {
paint.getFillPath(path, &fillPath); paint.getFillPath(path, &fillPath);
REPORTER_ASSERT(reporter, equal(outer, fillPath.getBounds())); REPORTER_ASSERT(reporter, equal(outer, fillPath.getBounds()));
bool isMiter = SkPaint::kMiter_Join == joins[i]; bool isMiter = SkPaint::kMiter_Join == joins[i];
SkRect nested[2]; SkRect nested[2];
REPORTER_ASSERT(reporter, fillPath.isNestedRects(nested) == isMiter); REPORTER_ASSERT(reporter, fillPath.isNestedRects(nested) == isMiter);