зеркало из https://github.com/mozilla/moz-skia.git
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6067 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
022e857abc
Коммит
1e34ff7030
|
@ -673,7 +673,7 @@ private:
|
||||||
|
|
||||||
// Chrome creates its own round rects with each corner possibly being different.
|
// Chrome creates its own round rects with each corner possibly being different.
|
||||||
// In its "zero radius" incarnation it creates degenerate round rects.
|
// In its "zero radius" incarnation it creates degenerate round rects.
|
||||||
// Note: PathTest::test_arb_round_rect_is_convex and
|
// Note: PathTest::test_arb_round_rect_is_convex and
|
||||||
// test_arb_zero_rad_round_rect_is_rect perform almost exactly
|
// test_arb_zero_rad_round_rect_is_rect perform almost exactly
|
||||||
// the same test (but with no drawing)
|
// the same test (but with no drawing)
|
||||||
class ArbRoundRectBench : public SkBenchmark {
|
class ArbRoundRectBench : public SkBenchmark {
|
||||||
|
|
|
@ -18,7 +18,7 @@ SkString* SkObjectParser::BitmapToString(const SkBitmap& bitmap) {
|
||||||
mBitmap->appendS32(bitmap.height());
|
mBitmap->appendS32(bitmap.height());
|
||||||
|
|
||||||
const char* gConfigStrings[] = {
|
const char* gConfigStrings[] = {
|
||||||
"None", "A1", "A8", "Index8", "RGB565", "ARGB4444", "ARGB8888", "RLE8"
|
"None", "A1", "A8", "Index8", "RGB565", "ARGB4444", "ARGB8888", "RLE8"
|
||||||
};
|
};
|
||||||
SkASSERT(SkBitmap::kConfigCount == 8);
|
SkASSERT(SkBitmap::kConfigCount == 8);
|
||||||
|
|
||||||
|
|
|
@ -371,7 +371,7 @@ protected:
|
||||||
fFB.drawLine(canvas, fPts);
|
fFB.drawLine(canvas, fPts);
|
||||||
}
|
}
|
||||||
fFB.drawFG(canvas);
|
fFB.drawFG(canvas);
|
||||||
|
|
||||||
{
|
{
|
||||||
SkString str;
|
SkString str;
|
||||||
str.printf("%s %s %s",
|
str.printf("%s %s %s",
|
||||||
|
|
|
@ -1032,7 +1032,7 @@ static int build_arc_points(const SkRect& oval, SkScalar startAngle,
|
||||||
return 1;
|
return 1;
|
||||||
} else if (0 == oval.width() && 0 == oval.height()) {
|
} else if (0 == oval.width() && 0 == oval.height()) {
|
||||||
// Chrome will sometimes create 0 radius round rects. Having degenerate
|
// Chrome will sometimes create 0 radius round rects. Having degenerate
|
||||||
// quad segments in the path prevents the path from being recognized as
|
// quad segments in the path prevents the path from being recognized as
|
||||||
// a rect.
|
// a rect.
|
||||||
// TODO: optimizing the case where only one of width or height is zero
|
// TODO: optimizing the case where only one of width or height is zero
|
||||||
// should also be considered. This case, however, doesn't seem to be
|
// should also be considered. This case, however, doesn't seem to be
|
||||||
|
|
|
@ -17,7 +17,7 @@ GrGLProgramStage::~GrGLProgramStage() {
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void GrGLProgramStage::setData(const GrGLUniformManager&, const GrCustomStage&) {
|
void GrGLProgramStage::setData(const GrGLUniformManager&, const GrCustomStage&) {
|
||||||
}
|
}
|
||||||
|
|
||||||
GrGLProgramStage::StageKey GrGLProgramStage::GenTextureKey(const GrCustomStage& stage,
|
GrGLProgramStage::StageKey GrGLProgramStage::GenTextureKey(const GrCustomStage& stage,
|
||||||
|
|
|
@ -292,13 +292,13 @@ const char* GrGLShaderBuilder::fragmentPosition() {
|
||||||
fFSHeader.append("layout(origin_upper_left) in vec4 gl_FragCoord;\n");
|
fFSHeader.append("layout(origin_upper_left) in vec4 gl_FragCoord;\n");
|
||||||
fSetupFragPosition = true;
|
fSetupFragPosition = true;
|
||||||
}
|
}
|
||||||
return "gl_FragCoord";
|
return "gl_FragCoord";
|
||||||
} else {
|
} else {
|
||||||
static const char* kCoordName = "fragCoordYDown";
|
static const char* kCoordName = "fragCoordYDown";
|
||||||
if (!fSetupFragPosition) {
|
if (!fSetupFragPosition) {
|
||||||
GrAssert(GrGLUniformManager::kInvalidUniformHandle == fRTHeightUniform);
|
GrAssert(GrGLUniformManager::kInvalidUniformHandle == fRTHeightUniform);
|
||||||
const char* rtHeightName;
|
const char* rtHeightName;
|
||||||
|
|
||||||
// temporarily change the stage index because we're inserting a uniform whose name
|
// temporarily change the stage index because we're inserting a uniform whose name
|
||||||
// shouldn't be mangled to be stage-specific.
|
// shouldn't be mangled to be stage-specific.
|
||||||
int oldStageIdx = fCurrentStage;
|
int oldStageIdx = fCurrentStage;
|
||||||
|
@ -308,7 +308,7 @@ const char* GrGLShaderBuilder::fragmentPosition() {
|
||||||
"RTHeight",
|
"RTHeight",
|
||||||
&rtHeightName);
|
&rtHeightName);
|
||||||
fCurrentStage = oldStageIdx;
|
fCurrentStage = oldStageIdx;
|
||||||
|
|
||||||
this->fFSCode.prependf("\tvec4 %s = vec4(gl_FragCoord.x, %s - gl_FragCoord.y, gl_FragCoord.zw);\n",
|
this->fFSCode.prependf("\tvec4 %s = vec4(gl_FragCoord.x, %s - gl_FragCoord.y, gl_FragCoord.zw);\n",
|
||||||
kCoordName, rtHeightName);
|
kCoordName, rtHeightName);
|
||||||
fSetupFragPosition = true;
|
fSetupFragPosition = true;
|
||||||
|
|
|
@ -707,7 +707,7 @@ SkPDFFont::~SkPDFFont() {
|
||||||
index = i;
|
index = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkDEBUGCODE(int indexFound;)
|
SkDEBUGCODE(int indexFound;)
|
||||||
SkASSERT(index == -1 ||
|
SkASSERT(index == -1 ||
|
||||||
(Find(SkTypeface::UniqueID(fTypeface.get()),
|
(Find(SkTypeface::UniqueID(fTypeface.get()),
|
||||||
|
@ -776,7 +776,7 @@ SkPDFFont* SkPDFFont::GetFontResource(SkTypeface* typeface, uint16_t glyphID) {
|
||||||
// This only is to catch callers who pass invalid glyph ids.
|
// This only is to catch callers who pass invalid glyph ids.
|
||||||
// If glyph id is invalid, then we will create duplicate entries
|
// If glyph id is invalid, then we will create duplicate entries
|
||||||
// for True Type fonts.
|
// for True Type fonts.
|
||||||
SkAdvancedTypefaceMetrics::FontType fontType =
|
SkAdvancedTypefaceMetrics::FontType fontType =
|
||||||
fontMetrics.get() ? fontMetrics.get()->fType :
|
fontMetrics.get() ? fontMetrics.get()->fType :
|
||||||
SkAdvancedTypefaceMetrics::kOther_Font;
|
SkAdvancedTypefaceMetrics::kOther_Font;
|
||||||
|
|
||||||
|
@ -784,7 +784,7 @@ SkPDFFont* SkPDFFont::GetFontResource(SkTypeface* typeface, uint16_t glyphID) {
|
||||||
fontType == SkAdvancedTypefaceMetrics::kTrueType_Font) {
|
fontType == SkAdvancedTypefaceMetrics::kTrueType_Font) {
|
||||||
CanonicalFonts()[relatedFontIndex].fFont->ref();
|
CanonicalFonts()[relatedFontIndex].fFont->ref();
|
||||||
return CanonicalFonts()[relatedFontIndex].fFont;
|
return CanonicalFonts()[relatedFontIndex].fFont;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SkAdvancedTypefaceMetrics::PerGlyphInfo info;
|
SkAdvancedTypefaceMetrics::PerGlyphInfo info;
|
||||||
info = SkAdvancedTypefaceMetrics::kGlyphNames_PerGlyphInfo;
|
info = SkAdvancedTypefaceMetrics::kGlyphNames_PerGlyphInfo;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче