Remove all uses of getCache with get.
Holding off on removing definition until android cleans up its code. Change-Id: I19cce13d6d1f10f172770a926966761686bc7d6a Reviewed-on: https://skia-review.googlesource.com/113168 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
parent
03cd6e6dec
commit
c2ef4ab423
@ -47,7 +47,7 @@ private:
|
||||
void onDelayedSetup() override {
|
||||
SkPaint defaultPaint;
|
||||
SkAutoGlyphCache agc(defaultPaint, nullptr, &SkMatrix::I());
|
||||
SkGlyphCache* cache = agc.getCache();
|
||||
SkGlyphCache* cache = agc.get();
|
||||
for (int i = 0; i < kNumGlyphs; ++i) {
|
||||
SkGlyphID id = cache->unicharToGlyph(kGlyphs[i]);
|
||||
cache->getScalerContext()->getPath(SkPackedGlyphID(id), &fGlyphs[i]);
|
||||
|
@ -21,7 +21,7 @@ static void do_font_stuff(SkPaint* paint) {
|
||||
for (SkScalar i = 8; i < 64; i++) {
|
||||
paint->setTextSize(i);
|
||||
SkAutoGlyphCacheNoGamma autoCache(*paint, nullptr, nullptr);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
uint16_t glyphs['z'];
|
||||
for (int c = ' '; c < 'z'; c++) {
|
||||
glyphs[c] = cache->unicharToGlyph(c);
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
PathText() {
|
||||
SkPaint defaultPaint;
|
||||
SkAutoGlyphCache agc(defaultPaint, nullptr, &SkMatrix::I());
|
||||
SkGlyphCache* cache = agc.getCache();
|
||||
SkGlyphCache* cache = agc.get();
|
||||
SkPath glyphPaths[52];
|
||||
for (int i = 0; i < 52; ++i) {
|
||||
// I and l are rects on OS X ...
|
||||
|
@ -431,7 +431,7 @@ int SkPaint::textToGlyphs(const void* textData, size_t byteLength, uint16_t glyp
|
||||
}
|
||||
|
||||
SkAutoGlyphCache autoCache(*this, nullptr, nullptr);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
|
||||
const char* text = (const char*)textData;
|
||||
const char* stop = text + byteLength;
|
||||
@ -489,7 +489,7 @@ bool SkPaint::containsText(const void* textData, size_t byteLength) const {
|
||||
}
|
||||
|
||||
SkAutoGlyphCache autoCache(*this, nullptr, nullptr);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
|
||||
switch (this->getTextEncoding()) {
|
||||
case SkPaint::kUTF8_TextEncoding: {
|
||||
@ -539,7 +539,7 @@ void SkPaint::glyphsToUnichars(const uint16_t glyphs[], int count, SkUnichar tex
|
||||
|
||||
SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
|
||||
SkAutoGlyphCache autoCache(*this, &props, nullptr);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
|
||||
for (int index = 0; index < count; index++) {
|
||||
textData[index] = cache->glyphToUnichar(glyphs[index]);
|
||||
@ -805,7 +805,7 @@ SkScalar SkPaint::measureText(const void* textData, size_t length, SkRect* bound
|
||||
SkScalar scale = canon.getScale();
|
||||
|
||||
SkAutoGlyphCache autoCache(paint, nullptr, nullptr);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
|
||||
SkScalar width = 0;
|
||||
|
||||
@ -859,7 +859,7 @@ size_t SkPaint::breakText(const void* textD, size_t length, SkScalar maxWidth,
|
||||
}
|
||||
|
||||
SkAutoGlyphCache autoCache(paint, nullptr, nullptr);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
|
||||
GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(paint.getTextEncoding(),
|
||||
paint.isDevKernText(),
|
||||
@ -965,7 +965,7 @@ int SkPaint::getTextWidths(const void* textData, size_t byteLength,
|
||||
SkScalar scale = canon.getScale();
|
||||
|
||||
SkAutoGlyphCache autoCache(paint, nullptr, nullptr);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(paint.getTextEncoding(),
|
||||
paint.isDevKernText(),
|
||||
nullptr != bounds);
|
||||
|
@ -505,7 +505,7 @@ void GrAtlasTextContext::DrawBmpPosTextAsPaths(GrAtlasTextBlob* blob, int runInd
|
||||
pathPaint.isDevKernText(),
|
||||
true);
|
||||
SkAutoGlyphCache autoCache(pathPaint, &props, nullptr);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
|
||||
const char* stop = text + byteLength;
|
||||
const char* lastText = text;
|
||||
|
@ -1877,7 +1877,7 @@ HRESULT SkXPSDevice::CreateTypefaceUse(const SkPaint& paint,
|
||||
newTypefaceUse.xpsFont = xpsFontResource.release();
|
||||
|
||||
SkAutoGlyphCache agc(paint, &this->surfaceProps(), &SkMatrix::I());
|
||||
SkGlyphCache* glyphCache = agc.getCache();
|
||||
SkGlyphCache* glyphCache = agc.get();
|
||||
unsigned int glyphCount = glyphCache->getGlyphCount();
|
||||
newTypefaceUse.glyphsUsed = new SkBitSet(glyphCount);
|
||||
|
||||
@ -2064,7 +2064,7 @@ void SkXPSDevice::drawText(const void* text, size_t byteLen,
|
||||
const SkMatrix& matrix = SkMatrix::I();
|
||||
|
||||
SkAutoGlyphCache autoCache(paint, &this->surfaceProps(), &matrix);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
|
||||
// Advance width and offsets for glyphs measured in hundredths of the font em size
|
||||
// (XPS Spec 5.1.3).
|
||||
@ -2122,7 +2122,7 @@ void SkXPSDevice::drawPosText(const void* text, size_t byteLen,
|
||||
const SkMatrix& matrix = SkMatrix::I();
|
||||
|
||||
SkAutoGlyphCache autoCache(paint, &this->surfaceProps(), &matrix);
|
||||
SkGlyphCache* cache = autoCache.getCache();
|
||||
SkGlyphCache* cache = autoCache.get();
|
||||
|
||||
// Advance width and offsets for glyphs measured in hundredths of the font em size
|
||||
// (XPS Spec 5.1.3).
|
||||
|
Loading…
Reference in New Issue
Block a user