Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@8168 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-03-15 07:05:19 +00:00
parent 2bbc0e1182
commit c49cabfe5c
8 changed files with 33 additions and 33 deletions

View File

@ -27,7 +27,7 @@ public:
kExtraBold_Weight = 800,
kBlack_Weight = 900
};
enum Width {
kUltraCondensed_Width = 1,
kExtraCondensed_Width = 2,
@ -43,7 +43,7 @@ public:
enum Flags {
kItalic_Flag = 1 << 0,
};
SkFontStyle();
SkFontStyle(int weight, int width, unsigned flags);
@ -76,7 +76,7 @@ public:
* SkData contains an array of [const char*]
*/
SkData* refFamilyNames();
/**
* Given a familyName, if a corresponding family is found, return
* the array of available styles in SkData (as [SkFontStyle]).
@ -103,14 +103,14 @@ public:
* the returned object if it is not null.
*/
SkTypeface* createFromData(SkData*, int ttcIndex = 0);
/**
* Create a typeface for the specified stream and TTC index
* (pass 0 for none) or NULL if the stream is not recognized. The caller
* must call unref() on the returned object if it is not null.
*/
SkTypeface* createFromStream(SkStream*, int ttcIndex = 0);
/**
* Create a typeface for the specified fileName and TTC index
* (pass 0 for none) or NULL if the file is not found, or its contents are
@ -118,7 +118,7 @@ public:
* if it is not null.
*/
SkTypeface* createFromFile(const char path[], int ttcIndex = 0);
private:
typedef SkRefCnt INHERITED;
};

View File

@ -72,7 +72,7 @@
'../third_party/externals/libwebp/dsp/dec_neon.c',
],
# behavior similar dsp_neon.c.neon in an Android.mk
'cflags!': [
'cflags!': [
'-mfpu=vfpv3-d16',
'-fno-rtti', # supresses warnings about invalid option of non-C++ code
],

View File

@ -52,32 +52,32 @@ public:
/** LCDs either have their color elements arranged horizontally or
vertically. When rendering subpixel glyphs we need to know which way
round they are.
Note, if you change this after startup, you'll need to flush the glyph
cache because it'll have the wrong type of masks cached.
@deprecated use SkPixelGeometry instead.
*/
enum LCDOrientation {
kHorizontal_LCDOrientation = 0, //!< this is the default
kVertical_LCDOrientation = 1
};
/** @deprecated set on Device creation. */
static void SetSubpixelOrientation(LCDOrientation orientation);
/** @deprecated get from Device. */
static LCDOrientation GetSubpixelOrientation();
/** LCD color elements can vary in order. For subpixel text we need to know
the order which the LCDs uses so that the color fringes are in the
correct place.
Note, if you change this after startup, you'll need to flush the glyph
cache because it'll have the wrong type of masks cached.
kNONE_LCDOrder means that the subpixel elements are not spatially
separated in any usable fashion.
@deprecated use SkPixelGeometry instead.
*/
enum LCDOrder {
@ -85,13 +85,13 @@ public:
kBGR_LCDOrder = 1,
kNONE_LCDOrder = 2
};
/** @deprecated set on Device creation. */
static void SetSubpixelOrder(LCDOrder order);
/** @deprecated get from Device. */
static LCDOrder GetSubpixelOrder();
#ifdef SK_BUILD_FOR_ANDROID
#ifdef SK_BUILD_FOR_ANDROID
/**
* Return the number of font units per em.
*
@ -100,7 +100,7 @@ public:
*/
static uint32_t GetUnitsPerEm(SkFontID fontID);
#endif
/** If Skia is running in a constrained environment and the typeface
implementation is handle based, the typeface data may become
unavailable asynchronously. If a font host or scaler context method is
@ -108,13 +108,13 @@ public:
make the handle contained in the typeface useable.
*/
static void EnsureTypefaceAccessible(const SkTypeface& typeface);
/**
* Return a subclass of SkScalarContext
* DEPRECATED -- will be moved to SkTypeface
*/
static SkScalerContext* CreateScalerContext(const SkDescriptor* desc);
/**
* DEPRECATED -- will be DESTROYED
*
@ -134,31 +134,31 @@ public:
*/
static SkFontID NextLogicalFont(SkFontID currFontID, SkFontID origFontID);
///// public HACK FOR FREETYPE -- will be fixed
/** Return a new stream to read the font data, or null if the uniqueID does
not match an existing typeface. .The caller must call stream->unref()
when it is finished reading the data.
*/
static SkStream* OpenStream(SkFontID uniqueID);
/** Some fonts are stored in files. If that is true for the fontID, then
this returns the byte length of the full file path. If path is not null,
then the full path is copied into path (allocated by the caller), up to
length bytes. If index is not null, then it is set to the truetype
collection index for this font, or 0 if the font is not in a collection.
Note: GetFileName does not assume that path is a null-terminated string,
so when it succeeds, it only copies the bytes of the file name and
nothing else (i.e. it copies exactly the number of bytes returned by the
function. If the caller wants to treat path[] as a C string, it must be
sure that it is allocated at least 1 byte larger than the returned size,
and it must copy in the terminating 0.
If the fontID does not correspond to a file, then the function returns
0, and the path and index parameters are ignored.
@param fontID The font whose file name is being queried
@param path Either NULL, or storage for receiving up to length bytes
of the font's file name. Allocated by the caller.
@ -171,7 +171,7 @@ public:
*/
static size_t GetFileName(SkFontID fontID, char path[], size_t length,
int32_t* index);
// END_HACK for freetype
private:

View File

@ -27,7 +27,7 @@ static inline SkTypeface* ref_or_default(SkTypeface* face) {
class SkAutoResolveDefaultTypeface : public SkAutoTUnref<SkTypeface> {
public:
SkAutoResolveDefaultTypeface() : INHERITED(SkTypeface::RefDefault()) {}
SkAutoResolveDefaultTypeface(SkTypeface* face)
: INHERITED(ref_or_default(face)) {}

View File

@ -188,8 +188,8 @@ bool SkImageDecoder::buildTileIndex(SkStream* stream,
}
void SkImageDecoder::cropBitmap(SkBitmap *dst, SkBitmap *src, int sampleSize,
int dstX, int dstY, int width, int height,
int srcX, int srcY) {
int dstX, int dstY, int width, int height,
int srcX, int srcY) {
int w = width / sampleSize;
int h = height / sampleSize;
// if the destination has no pixels then we must allocate them.

View File

@ -204,7 +204,7 @@ bool SkGIFImageDecoder::onDecode(SkStream* sk_stream, SkBitmap* bm, Mode mode) {
width, height)) {
return error_return(gif, *bm, "chooseFromOneChoice");
}
if (SkImageDecoder::kDecodeBounds_Mode == mode) {
bm->setConfig(SkBitmap::kIndex8_Config, width, height);
return true;

View File

@ -110,7 +110,7 @@ bool SkWBMPImageDecoder::onDecode(SkStream* stream, SkBitmap* decodedBitmap,
int width = head.fWidth;
int height = head.fHeight;
if (SkImageDecoder::kDecodeBounds_Mode == mode) {
decodedBitmap->setConfig(SkBitmap::kIndex8_Config, width, height);
decodedBitmap->setIsOpaque(true);

View File

@ -1161,7 +1161,7 @@ SkStream* SkFontHost::OpenStream(SkFontID uniqueID) {
size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length, int32_t* index) {
return 0;
}
SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc) {
return SkNEW_ARGS(SkScalerContext_Windows, (desc));
}