Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7439 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
24d10cb635
commit
cdcb2ce274
@ -146,7 +146,7 @@ static bool pointInTriangle(const _Point& pt, const _Line* testLines[]) {
|
||||
}
|
||||
|
||||
// returns false if there's more than one intercept or the intercept doesn't match the point
|
||||
// returns true if the intercept was successfully added or if the
|
||||
// returns true if the intercept was successfully added or if the
|
||||
// original quads need to be subdivided
|
||||
static bool addIntercept(const Quadratic& q1, const Quadratic& q2, double tMin, double tMax,
|
||||
Intersections& i, bool* subDivide) {
|
||||
|
@ -1084,7 +1084,7 @@ public:
|
||||
const SkPath* nativePath() const {
|
||||
return fPathPtr;
|
||||
}
|
||||
|
||||
|
||||
void nudge() {
|
||||
if (fEmpty || !AlmostEqualUlps(fDefer[1].fX, fFirstPt.fX)
|
||||
|| !AlmostEqualUlps(fDefer[1].fY, fFirstPt.fY)) {
|
||||
|
@ -16,7 +16,7 @@ static void test_giant_dash(SkCanvas* canvas) {
|
||||
|
||||
paint.setStrokeWidth(2);
|
||||
paint.setPathEffect(new SkDashPathEffect(intervals, 2, 0))->unref();
|
||||
|
||||
|
||||
SkScalar big = 500 * 1000;
|
||||
|
||||
canvas->drawLine(10, 10, big, 10, paint);
|
||||
@ -207,7 +207,7 @@ protected:
|
||||
|
||||
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
|
||||
if (false) {
|
||||
test_giant_dash(canvas); return;
|
||||
test_giant_dash(canvas); return;
|
||||
}
|
||||
if (false) {
|
||||
test_grad(canvas); return;
|
||||
|
@ -11,12 +11,12 @@
|
||||
class SkString;
|
||||
|
||||
/**
|
||||
* Add 'flagStr' to 'string' and set 'needSeparator' to true only if 'flag' is
|
||||
* true. If 'needSeparator' is true append a '|' before 'flagStr'. This method
|
||||
* is used to streamline the creation of ASCII flag strings within the toString
|
||||
* Add 'flagStr' to 'string' and set 'needSeparator' to true only if 'flag' is
|
||||
* true. If 'needSeparator' is true append a '|' before 'flagStr'. This method
|
||||
* is used to streamline the creation of ASCII flag strings within the toString
|
||||
* methods.
|
||||
*/
|
||||
void SkAddFlagToString(SkString* string, bool flag,
|
||||
void SkAddFlagToString(SkString* string, bool flag,
|
||||
const char* flagStr, bool* needSeparator);
|
||||
|
||||
|
||||
|
@ -910,7 +910,7 @@ private:
|
||||
// for use with textures released from an GrAutoScratchTexture.
|
||||
void addExistingTextureToCache(GrTexture* texture);
|
||||
|
||||
/**
|
||||
/**
|
||||
* These functions create premul <-> unpremul effects if it is possible to generate a pair
|
||||
* of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. Otherwise, they
|
||||
* return NULL.
|
||||
|
@ -17,4 +17,3 @@ void SkAddFlagToString(SkString* string, bool flag, const char* flagStr, bool* n
|
||||
*needSeparator = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,11 +136,11 @@ void SkBlurDrawLooper::toString(SkString* str) const {
|
||||
str->append("None");
|
||||
} else {
|
||||
bool needsSeparator = false;
|
||||
SkAddFlagToString(str, SkToBool(kIgnoreTransform_BlurFlag & fBlurFlags), "IgnoreTransform",
|
||||
SkAddFlagToString(str, SkToBool(kIgnoreTransform_BlurFlag & fBlurFlags), "IgnoreTransform",
|
||||
&needsSeparator);
|
||||
SkAddFlagToString(str, SkToBool(kOverrideColor_BlurFlag & fBlurFlags), "OverrideColor",
|
||||
&needsSeparator);
|
||||
SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "HighQuality",
|
||||
SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "HighQuality",
|
||||
&needsSeparator);
|
||||
}
|
||||
str->append(")");
|
||||
|
@ -261,31 +261,31 @@ void SkLayerDrawLooper::toString(SkString* str) const {
|
||||
str->append("None");
|
||||
} else {
|
||||
bool needSeparator = false;
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kAntiAlias_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kAntiAlias_Flag & rec->fInfo.fFlagsMask),
|
||||
"AntiAlias", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kFilterBitmap_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kFilterBitmap_Flag & rec->fInfo.fFlagsMask),
|
||||
"FilterBitmap", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kDither_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kDither_Flag & rec->fInfo.fFlagsMask),
|
||||
"Dither", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kUnderlineText_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kUnderlineText_Flag & rec->fInfo.fFlagsMask),
|
||||
"UnderlineText", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kStrikeThruText_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kStrikeThruText_Flag & rec->fInfo.fFlagsMask),
|
||||
"StrikeThruText", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kFakeBoldText_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kFakeBoldText_Flag & rec->fInfo.fFlagsMask),
|
||||
"FakeBoldText", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kLinearText_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kLinearText_Flag & rec->fInfo.fFlagsMask),
|
||||
"LinearText", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kSubpixelText_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kSubpixelText_Flag & rec->fInfo.fFlagsMask),
|
||||
"SubpixelText", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kDevKernText_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kDevKernText_Flag & rec->fInfo.fFlagsMask),
|
||||
"DevKernText", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kLCDRenderText_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kLCDRenderText_Flag & rec->fInfo.fFlagsMask),
|
||||
"LCDRenderText", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kEmbeddedBitmapText_Flag & rec->fInfo.fFlagsMask),
|
||||
"EmbeddedBitmapText", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kAutoHinting_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kAutoHinting_Flag & rec->fInfo.fFlagsMask),
|
||||
"Autohinted", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kVerticalText_Flag & rec->fInfo.fFlagsMask),
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kVerticalText_Flag & rec->fInfo.fFlagsMask),
|
||||
"VerticalText", &needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(SkPaint::kGenA8FromLCD_Flag & rec->fInfo.fFlagsMask),
|
||||
"GenA8FromLCD", &needSeparator);
|
||||
@ -301,17 +301,17 @@ void SkLayerDrawLooper::toString(SkString* str) const {
|
||||
bool needSeparator = false;
|
||||
SkAddFlagToString(str, SkToBool(kStyle_Bit & rec->fInfo.fPaintBits), "Style",
|
||||
&needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(kTextSkewX_Bit & rec->fInfo.fPaintBits), "TextSkewX",
|
||||
SkAddFlagToString(str, SkToBool(kTextSkewX_Bit & rec->fInfo.fPaintBits), "TextSkewX",
|
||||
&needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(kPathEffect_Bit & rec->fInfo.fPaintBits), "PathEffect",
|
||||
&needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(kMaskFilter_Bit & rec->fInfo.fPaintBits), "MaskFilter",
|
||||
&needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(kShader_Bit & rec->fInfo.fPaintBits), "Shader",
|
||||
SkAddFlagToString(str, SkToBool(kShader_Bit & rec->fInfo.fPaintBits), "Shader",
|
||||
&needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(kColorFilter_Bit & rec->fInfo.fPaintBits), "ColorFilter",
|
||||
SkAddFlagToString(str, SkToBool(kColorFilter_Bit & rec->fInfo.fPaintBits), "ColorFilter",
|
||||
&needSeparator);
|
||||
SkAddFlagToString(str, SkToBool(kXfermode_Bit & rec->fInfo.fPaintBits), "Xfermode",
|
||||
SkAddFlagToString(str, SkToBool(kXfermode_Bit & rec->fInfo.fPaintBits), "Xfermode",
|
||||
&needSeparator);
|
||||
}
|
||||
str->append(") ");
|
||||
|
@ -148,7 +148,7 @@ public:
|
||||
}
|
||||
|
||||
static bool StageUsesTexCoords(GrVertexLayout layout, int stageIdx);
|
||||
|
||||
|
||||
private:
|
||||
// non-stage bits start at this index.
|
||||
static const int STAGE_BIT_CNT = kNumStages * kMaxTexCoords;
|
||||
|
@ -568,8 +568,8 @@ private:
|
||||
// counts number of uses of vertex/index pool in the geometry stack
|
||||
int fVertexPoolUseCnt;
|
||||
int fIndexPoolUseCnt;
|
||||
// these are mutable so they can be created on-demand
|
||||
mutable GrVertexBuffer* fUnitSquareVertexBuffer;
|
||||
// these are mutable so they can be created on-demand
|
||||
mutable GrVertexBuffer* fUnitSquareVertexBuffer;
|
||||
mutable GrIndexBuffer* fQuadIndexBuffer;
|
||||
bool fContextIsDirty;
|
||||
ResourceList fResourceList;
|
||||
|
Loading…
Reference in New Issue
Block a user