зеркало из https://github.com/mozilla/moz-skia.git
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:
Родитель
158c59524c
Коммит
b0a327e939
|
@ -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 "Simplify.h"
|
||||
|
||||
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 (currentPtr != listEnd);
|
||||
// eat through coincident edges
|
||||
|
||||
|
||||
int total = 0;
|
||||
int index;
|
||||
for (index = 0; index < contourList.count(); ++index) {
|
||||
|
|
|
@ -3392,7 +3392,7 @@ public:
|
|||
SkDebugf(" windValue=%d\n", fTs[i].fWindValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This isn't useful yet -- but leaving it in for now in case i think of something
|
||||
// to use it for
|
||||
void validateActiveSpans() const {
|
||||
|
|
|
@ -138,7 +138,7 @@ private:
|
|||
MatrixProc chooseMatrixProc(bool trivial_matrix);
|
||||
bool chooseProcs(const SkMatrix& inv, const SkPaint&);
|
||||
ShaderProc32 chooseShaderProc32();
|
||||
|
||||
|
||||
// Return false if we failed to setup for fast translate (e.g. overflow)
|
||||
bool setupForTranslate();
|
||||
|
||||
|
|
|
@ -1812,7 +1812,7 @@ void SkFontHost::FilterRec(SkScalerContext::Rec* rec, SkTypeface*) {
|
|||
rec->fFlags &= ~flagsWeDontSupport;
|
||||
|
||||
bool lcdSupport = supports_LCD();
|
||||
|
||||
|
||||
// Only two levels of hinting are supported.
|
||||
// kNo_Hinting means avoid CoreGraphics outline dilation.
|
||||
// kNormal_Hinting means CoreGraphics outline dilation is allowed.
|
||||
|
|
|
@ -26,7 +26,7 @@ struct SkOTTableOS2 {
|
|||
|
||||
union Version {
|
||||
SK_OT_USHORT version;
|
||||
|
||||
|
||||
//original V0 TT
|
||||
struct VA : SkOTTableOS2_VA { } vA;
|
||||
struct V0 : SkOTTableOS2_V0 { } v0;
|
||||
|
|
|
@ -21,7 +21,7 @@ struct SkOTTableOS2_V0 {
|
|||
//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.
|
||||
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(0);
|
||||
|
||||
|
||||
SK_OT_SHORT xAvgCharWidth;
|
||||
struct WeightClass {
|
||||
SK_TYPED_ENUM(Value, SK_OT_USHORT,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
struct SkOTTableOS2_V1 {
|
||||
SK_OT_USHORT version;
|
||||
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(1);
|
||||
|
||||
|
||||
SK_OT_SHORT xAvgCharWidth;
|
||||
struct WeightClass {
|
||||
SK_TYPED_ENUM(Value, SK_OT_USHORT,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
struct SkOTTableOS2_V2 {
|
||||
SK_OT_USHORT version;
|
||||
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(2);
|
||||
|
||||
|
||||
SK_OT_SHORT xAvgCharWidth;
|
||||
struct WeightClass {
|
||||
SK_TYPED_ENUM(Value, SK_OT_USHORT,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
struct SkOTTableOS2_V3 {
|
||||
SK_OT_USHORT version;
|
||||
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(3);
|
||||
|
||||
|
||||
SK_OT_SHORT xAvgCharWidth;
|
||||
struct WeightClass {
|
||||
SK_TYPED_ENUM(Value, SK_OT_USHORT,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
struct SkOTTableOS2_V4 {
|
||||
SK_OT_USHORT version;
|
||||
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(4);
|
||||
|
||||
|
||||
SK_OT_SHORT xAvgCharWidth;
|
||||
struct WeightClass {
|
||||
SK_TYPED_ENUM(Value, SK_OT_USHORT,
|
||||
|
|
|
@ -22,7 +22,7 @@ struct SkOTTableOS2_VA {
|
|||
//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.
|
||||
static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(0);
|
||||
|
||||
|
||||
SK_OT_SHORT xAvgCharWidth;
|
||||
struct WeightClass {
|
||||
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 TAG3 = 'f';
|
||||
static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableGlyph>::value;
|
||||
|
||||
|
||||
class Iterator {
|
||||
public:
|
||||
Iterator(const SkOTTableGlyph& glyf,
|
||||
|
@ -36,7 +36,7 @@ struct SkOTTableGlyph {
|
|||
, fLocaFormat(SkOTTableHead::IndexToLocFormat::ShortOffsets == locaFormat.value ? 0 : 1)
|
||||
, fCurrentGlyphOffset(0)
|
||||
{ fLocaPtr.shortOffset = reinterpret_cast<const SK_OT_USHORT*>(&loca); }
|
||||
|
||||
|
||||
void advance(uint16_t num) {
|
||||
fLocaPtr.shortOffset += num << fLocaFormat;
|
||||
fCurrentGlyphOffset = fLocaFormat ? SkEndian_SwapBE32(*fLocaPtr.longOffset)
|
||||
|
@ -70,15 +70,15 @@ struct SkOTTableGlyphData {
|
|||
SK_OT_FWORD yMin;
|
||||
SK_OT_FWORD xMax;
|
||||
SK_OT_FWORD yMax;
|
||||
|
||||
|
||||
struct Simple {
|
||||
SK_OT_USHORT endPtsOfContours[1/*numberOfContours*/];
|
||||
|
||||
|
||||
struct Instructions {
|
||||
SK_OT_USHORT length;
|
||||
SK_OT_BYTE data[1/*length*/];
|
||||
};
|
||||
|
||||
|
||||
union Flags {
|
||||
struct Field {
|
||||
SK_OT_BYTE_BITFIELD(
|
||||
|
@ -101,11 +101,11 @@ struct SkOTTableGlyphData {
|
|||
SK_OT_BYTE value;
|
||||
} raw;
|
||||
};
|
||||
|
||||
|
||||
//xCoordinates
|
||||
//yCoordinates
|
||||
};
|
||||
|
||||
|
||||
struct Composite {
|
||||
struct Component {
|
||||
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 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_INSTRUCTIONS_Mask = SkTEndian_SwapBE16(1 << 8);
|
||||
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);
|
||||
|
@ -200,7 +200,7 @@ struct SkOTTableGlyphData {
|
|||
} byteIndex;
|
||||
} transform;
|
||||
} component;//[] last element does not set MORE_COMPONENTS
|
||||
|
||||
|
||||
/** Comes after the last Component if the last component has WE_HAVE_INSTR. */
|
||||
struct Instructions {
|
||||
SK_OT_USHORT length;
|
||||
|
|
|
@ -19,7 +19,7 @@ struct SkOTTableIndexToLocation {
|
|||
static const SK_OT_CHAR TAG2 = 'c';
|
||||
static const SK_OT_CHAR TAG3 = 'a';
|
||||
static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableIndexToLocation>::value;
|
||||
|
||||
|
||||
union Offsets {
|
||||
SK_OT_USHORT shortOffset[1];
|
||||
SK_OT_ULONG longOffset[1];
|
||||
|
|
|
@ -23,7 +23,7 @@ struct SkOTTableMaximumProfile {
|
|||
|
||||
union Version {
|
||||
SK_OT_Fixed version;
|
||||
|
||||
|
||||
struct CFF : SkOTTableMaximumProfile_CFF { } cff;
|
||||
struct TT : SkOTTableMaximumProfile_TT { } tt;
|
||||
} version;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
struct SkOTTableMaximumProfile_CFF {
|
||||
SK_OT_Fixed version;
|
||||
static const SK_OT_Fixed VERSION = SkTEndian_SwapBE32(0x00005000);
|
||||
|
||||
|
||||
SK_OT_USHORT numGlyphs;
|
||||
};
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
struct SkOTTableMaximumProfile_TT {
|
||||
SK_OT_Fixed version;
|
||||
static const SK_OT_Fixed VERSION = SkTEndian_SwapBE32(0x00010000);
|
||||
|
||||
|
||||
SK_OT_USHORT numGlyphs;
|
||||
SK_OT_USHORT maxPoints;
|
||||
SK_OT_USHORT maxContours;
|
||||
|
|
|
@ -20,7 +20,7 @@ extern const uint8_t SK_OT_GlyphData_NoOutline[] = {
|
|||
0x0,0x0, //SkOTTableGlyphData::yMin
|
||||
0x0,0x0, //SkOTTableGlyphData::xMax
|
||||
0x0,0x0, //SkOTTableGlyphData::yMax
|
||||
|
||||
|
||||
0x0,0x0, //SkOTTableGlyphDataInstructions::length
|
||||
};
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ struct SkSFNTHeader {
|
|||
SK_SFNT_USHORT searchRange;
|
||||
SK_SFNT_USHORT entrySelector;
|
||||
SK_SFNT_USHORT rangeShift;
|
||||
|
||||
|
||||
struct TableDirectoryEntry {
|
||||
SK_SFNT_ULONG tag;
|
||||
SK_SFNT_ULONG checksum;
|
||||
|
|
|
@ -42,7 +42,7 @@ static void test_strokerect(skiatest::Reporter* reporter) {
|
|||
paint.getFillPath(path, &fillPath);
|
||||
|
||||
REPORTER_ASSERT(reporter, equal(outer, fillPath.getBounds()));
|
||||
|
||||
|
||||
bool isMiter = SkPaint::kMiter_Join == joins[i];
|
||||
SkRect nested[2];
|
||||
REPORTER_ASSERT(reporter, fillPath.isNestedRects(nested) == isMiter);
|
||||
|
|
Загрузка…
Ссылка в новой задаче