Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8404 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
48552314f6
commit
37cbc7fd01
@ -83,7 +83,7 @@ SkTypeface* SkFontMgr::matchFamilyStyle(const char familyName[],
|
||||
return this->onMatchFamilyStyle(familyName, fs);
|
||||
}
|
||||
|
||||
SkTypeface* SkFontMgr::matchFaceStyle(const SkTypeface* face,
|
||||
SkTypeface* SkFontMgr::matchFaceStyle(const SkTypeface* face,
|
||||
const SkFontStyle& fs) {
|
||||
return this->onMatchFaceStyle(face, fs);
|
||||
}
|
||||
@ -111,4 +111,3 @@ SkFontMgr* SkFontMgr::RefDefault() {
|
||||
return SkRef(gFM);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -615,7 +615,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path,
|
||||
|
||||
GrEffectRef* hairLineEffect = GrEdgeEffect::Create(GrEdgeEffect::kHairLine_EdgeType);
|
||||
GrEffectRef* hairQuadEffect = GrEdgeEffect::Create(GrEdgeEffect::kHairQuad_EdgeType);
|
||||
|
||||
|
||||
target->setIndexSourceToBuffer(fLinesIndexBuffer);
|
||||
int lines = 0;
|
||||
int nBufLines = fLinesIndexBuffer->maxQuads();
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
builder->fsCodeAppendf("\t\t\tvec2 gF = vec2(2.0*%s.x*duvdx.x - duvdx.y,\n"
|
||||
"\t\t\t 2.0*%s.x*duvdy.x - duvdy.y);\n",
|
||||
fsName, fsName);
|
||||
builder->fsCodeAppendf("\t\t\tedgeAlpha = (%s.x*%s.x - %s.y);\n", fsName, fsName,
|
||||
builder->fsCodeAppendf("\t\t\tedgeAlpha = (%s.x*%s.x - %s.y);\n", fsName, fsName,
|
||||
fsName);
|
||||
builder->fsCodeAppendf("\t\t\tedgeAlpha = "
|
||||
"clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);\n\t\t}\n");
|
||||
|
@ -13,7 +13,7 @@
|
||||
class GrGLEdgeEffect;
|
||||
|
||||
/**
|
||||
* The output of this effect is one of three different edge types: hairlines, quads,
|
||||
* The output of this effect is one of three different edge types: hairlines, quads,
|
||||
* and hairline quads.
|
||||
*/
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
static SkAutoTUnref<GrEffectRef> gUnref0(gEdgeEffectRef[0]);
|
||||
static SkAutoTUnref<GrEffectRef> gUnref1(gEdgeEffectRef[1]);
|
||||
static SkAutoTUnref<GrEffectRef> gUnref2(gEdgeEffectRef[2]);
|
||||
|
||||
|
||||
gEdgeEffectRef[type]->ref();
|
||||
return gEdgeEffectRef[type];
|
||||
}
|
||||
|
@ -163,13 +163,13 @@ void GrGLProgram::BuildDesc(const GrDrawState& drawState,
|
||||
hasCoverage = requiresAttributeCoverage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (hasCoverage) {
|
||||
// color filter is applied between color/coverage computation
|
||||
if (SkXfermode::kDst_Mode != desc->fColorFilterXfermode) {
|
||||
desc->fFirstCoverageStage = firstCoverageStage;
|
||||
}
|
||||
|
||||
|
||||
// If we're stenciling then we want to discard samples that have zero coverage
|
||||
if (drawState.getStencil().doesWrite()) {
|
||||
desc->fDiscardIfZeroCoverage = true;
|
||||
|
@ -429,7 +429,7 @@ public:
|
||||
{
|
||||
SkASSERT(fontRef);
|
||||
}
|
||||
|
||||
|
||||
SkTypeface_Mac(const SkFontStyle& fs, SkFontID fontID, bool isFixedPitch,
|
||||
CTFontRef fontRef, const char name[])
|
||||
: SkTypeface(fontstyle2stylebits(fs), fontID, isFixedPitch)
|
||||
@ -439,7 +439,7 @@ public:
|
||||
{
|
||||
SkASSERT(fontRef);
|
||||
}
|
||||
|
||||
|
||||
SkString fName;
|
||||
AutoCFRelease<CTFontRef> fFontRef;
|
||||
SkFontStyle fFontStyle;
|
||||
@ -1918,7 +1918,7 @@ static SkFontStyle desc2fontstyle(CTFontDescriptorRef desc) {
|
||||
if (!find_dict_float(dict, kCTFontSlantTrait, &slant)) {
|
||||
slant = 0;
|
||||
}
|
||||
|
||||
|
||||
return SkFontStyle(unit_weight_to_fontstyle(weight),
|
||||
unit_width_to_fontstyle(width),
|
||||
slant ? SkFontStyle::kItalic_Slant
|
||||
@ -1932,14 +1932,14 @@ static SkTypeface* createFromDesc(CFStringRef cfFamilyName,
|
||||
if (NULL == ctFont) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SkString str;
|
||||
CFStringToSkString(cfFamilyName, &str);
|
||||
|
||||
|
||||
bool isFixedPitch;
|
||||
(void)computeStyleBits(ctFont, &isFixedPitch);
|
||||
SkFontID fontID = CTFontRef_to_SkFontID(ctFont);
|
||||
|
||||
|
||||
return new SkTypeface_Mac(desc2fontstyle(desc), fontID, isFixedPitch,
|
||||
ctFont, str.c_str());
|
||||
}
|
||||
@ -1951,7 +1951,7 @@ public:
|
||||
, fFamilyName(familyName) {
|
||||
CFRetain(familyName);
|
||||
}
|
||||
|
||||
|
||||
virtual ~SkFontStyleSet_Mac() {
|
||||
CFSafeRelease(fArray);
|
||||
CFRelease(fFamilyName);
|
||||
@ -1978,10 +1978,10 @@ public:
|
||||
virtual SkTypeface* createTypeface(int index) SK_OVERRIDE {
|
||||
SkASSERT((unsigned)index < (unsigned)CFArrayGetCount(fArray));
|
||||
CTFontDescriptorRef desc = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fArray, index);
|
||||
|
||||
|
||||
return createFromDesc(fFamilyName, desc);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
CFArrayRef fArray;
|
||||
CFStringRef fFamilyName;
|
||||
@ -2035,10 +2035,10 @@ protected:
|
||||
CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
|
||||
&kCFTypeDictionaryKeyCallBacks,
|
||||
&kCFTypeDictionaryValueCallBacks));
|
||||
|
||||
|
||||
CFDictionaryAddValue(cfAttr, kCTFontFamilyNameAttribute,
|
||||
this->stringAt(index));
|
||||
|
||||
|
||||
AutoCFRelease<CTFontDescriptorRef> desc(
|
||||
CTFontDescriptorCreateWithAttributes(cfAttr));
|
||||
return SkNEW_ARGS(SkFontStyleSet_Mac, (this->stringAt(index), desc));
|
||||
|
@ -26,4 +26,3 @@ SkTypeface* SkFontHost::CreateTypefaceFromFile(char const*) {
|
||||
SkDEBUGFAIL("SkFontHost::CreateTypefaceFromFile unimplemented");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ void GrGLProgram::Desc::setRandom(SkMWCRandom* random,
|
||||
#endif
|
||||
|
||||
fDiscardIfZeroCoverage = random->nextBool();
|
||||
|
||||
|
||||
if (gpu->caps()->dualSourceBlendingSupport()) {
|
||||
fDualSrcOutput = random->nextULessThan(kDualSrcOutputCnt);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user