Fix VC++ warning and Android only code for 7317.

git-svn-id: http://skia.googlecode.com/svn/trunk@7319 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bungeman@google.com 2013-01-22 19:49:33 +00:00
parent dd4b74548a
commit ba3284e7bb
3 changed files with 7 additions and 7 deletions

View File

@ -53,10 +53,10 @@ struct SkDeviceProperties {
}
bool isOrientationKnown() {
return fGeometry & kKnown_Orientation;
return SkToBool(fGeometry & kKnown_Orientation);
}
bool isLayoutKnown() {
return fGeometry & kKnown_Layout;
return SkToBool(fGeometry & kKnown_Layout);
}
private:

View File

@ -176,7 +176,7 @@ uint32_t SkPaint::getGenerationID() const {
#ifdef SK_BUILD_FOR_ANDROID
unsigned SkPaint::getBaseGlyphCount(SkUnichar text) const {
SkAutoGlyphCache autoCache(*this, NULL);
SkAutoGlyphCache autoCache(*this, NULL, NULL);
SkGlyphCache* cache = autoCache.getCache();
return cache->getBaseGlyphCount(text);
}
@ -413,7 +413,7 @@ static void DetachDescProc(const SkDescriptor* desc, void* context) {
#ifdef SK_BUILD_FOR_ANDROID
const SkGlyph& SkPaint::getUnicharMetrics(SkUnichar text) {
SkGlyphCache* cache;
descriptorProc(NULL, DetachDescProc, &cache, true);
descriptorProc(NULL, NULL, DetachDescProc, &cache, true);
const SkGlyph& glyph = cache->getUnicharMetrics(text);
@ -423,7 +423,7 @@ const SkGlyph& SkPaint::getUnicharMetrics(SkUnichar text) {
const SkGlyph& SkPaint::getGlyphMetrics(uint16_t glyphId) {
SkGlyphCache* cache;
descriptorProc(NULL, DetachDescProc, &cache, true);
descriptorProc(NULL, NULL, DetachDescProc, &cache, true);
const SkGlyph& glyph = cache->getGlyphIDMetrics(glyphId);
@ -434,7 +434,7 @@ const SkGlyph& SkPaint::getGlyphMetrics(uint16_t glyphId) {
const void* SkPaint::findImage(const SkGlyph& glyph) {
// See ::detachCache()
SkGlyphCache* cache;
descriptorProc(NULL, DetachDescProc, &cache, true);
descriptorProc(NULL, NULL, DetachDescProc, &cache, true);
const void* image = cache->findImage(glyph);

View File

@ -2061,7 +2061,7 @@ HRESULT SkXPSDevice::CreateTypefaceUse(const SkPaint& paint,
newTypefaceUse.fontData = fontData;
newTypefaceUse.xpsFont = xpsFontResource.release();
SkAutoGlyphCache agc = SkAutoGlyphCache(paint, &SkMatrix::I());
SkAutoGlyphCache agc = SkAutoGlyphCache(paint, NULL, &SkMatrix::I());
SkGlyphCache* glyphCache = agc.getCache();
unsigned int glyphCount = glyphCache->getGlyphCount();
newTypefaceUse.glyphsUsed = new SkBitSet(glyphCount);