Fixed a few warnings
Removed a few warnings from the Skia code.
Review URL: https://codereview.chromium.org/12469003
git-svn-id: http://skia.googlecode.com/svn/trunk@7996 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 4ae2c47..3f37297 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -423,7 +423,7 @@
*/
class AutoColorRestore : public ::GrNoncopyable {
public:
- AutoColorRestore() : fDrawState(NULL) {}
+ AutoColorRestore() : fDrawState(NULL), fOldColor(0) {}
AutoColorRestore(GrDrawState* drawState, GrColor color) {
fDrawState = NULL;
diff --git a/src/ports/SkFontConfigInterface_direct.cpp b/src/ports/SkFontConfigInterface_direct.cpp
index 83e01c1..7e7ab9e 100644
--- a/src/ports/SkFontConfigInterface_direct.cpp
+++ b/src/ports/SkFontConfigInterface_direct.cpp
@@ -196,17 +196,6 @@
return class_a != OTHER && class_a == class_b;
}
-inline unsigned FileFaceIdToFileId(unsigned filefaceid)
-{
- return filefaceid >> 4;
-}
-
-inline unsigned FileIdAndFaceIndexToFileFaceId(unsigned fileid, int face_index)
-{
- SkASSERT((face_index & 0xfu) == face_index);
- return (fileid << 4) | face_index;
-}
-
// Normally we only return exactly the font asked for. In last-resort
// cases, the request either doesn't specify a font or is one of the
// basic font names like "Sans", "Serif" or "Monospace". This function
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 47e77ac..b98cdcd 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -244,7 +244,7 @@
return count;
}
- static void sk_stream_close( FT_Stream stream) {}
+ static void sk_stream_close(FT_Stream) {}
}
SkFaceRec::SkFaceRec(SkStream* strm, uint32_t fontID)
@@ -1181,7 +1181,7 @@
return;
}
- generateGlyphPath(fFace, glyph, path);
+ generateGlyphPath(fFace, path);
// The path's origin from FreeType is always the horizontal layout origin.
// Offset the path so that it is relative to the vertical origin if needed.
diff --git a/src/ports/SkFontHost_FreeType_common.cpp b/src/ports/SkFontHost_FreeType_common.cpp
index a6fb0dc..2c48684 100644
--- a/src/ports/SkFontHost_FreeType_common.cpp
+++ b/src/ports/SkFontHost_FreeType_common.cpp
@@ -293,7 +293,6 @@
}
void SkScalerContext_FreeType_Base::generateGlyphPath(FT_Face face,
- const SkGlyph& glyph,
SkPath* path)
{
if (fRec.fFlags & SkScalerContext::kEmbolden_Flag) {
diff --git a/src/ports/SkFontHost_FreeType_common.h b/src/ports/SkFontHost_FreeType_common.h
index 01100de..db32bc8 100644
--- a/src/ports/SkFontHost_FreeType_common.h
+++ b/src/ports/SkFontHost_FreeType_common.h
@@ -37,7 +37,7 @@
protected:
void generateGlyphImage(FT_Face face, const SkGlyph& glyph);
- void generateGlyphPath(FT_Face face, const SkGlyph& glyph, SkPath* path);
+ void generateGlyphPath(FT_Face face, SkPath* path);
void emboldenOutline(FT_Face face, FT_Outline* outline);
};