aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextContext.cpp
diff options
context:
space:
mode:
authorGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-29 07:01:48 +0000
committerGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-29 07:01:48 +0000
commite5d7015cde3b6f2a3929b8e378822e3d7be223d4 (patch)
tree49be18041cd7c5abe2f32dfba88d4ea3d3ed5882 /src/gpu/GrTextContext.cpp
parente8612d9a8d616c2ed0195421a0675e10b0c2d230 (diff)
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@13228 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrTextContext.cpp')
-rw-r--r--src/gpu/GrTextContext.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index ab9ef85f1d..0c9e149f75 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -13,7 +13,7 @@
#include "SkGr.h"
GrTextContext::GrTextContext(GrContext* context, const GrPaint& paint,
- const SkPaint& skPaint, const SkDeviceProperties& properties) :
+ const SkPaint& skPaint, const SkDeviceProperties& properties) :
fContext(context), fPaint(paint), fSkPaint(skPaint),
fDeviceProperties(properties) {
@@ -37,19 +37,19 @@ void GrTextContext::MeasureText(SkGlyphCache* cache, SkDrawCacheProc glyphCacheP
const char text[], size_t byteLength, SkVector* stopVector) {
SkFixed x = 0, y = 0;
const char* stop = text + byteLength;
-
+
SkAutoKern autokern;
-
+
while (text < stop) {
// don't need x, y here, since all subpixel variants will have the
// same advance
const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0);
-
+
x += autokern.adjust(glyph) + glyph.fAdvanceX;
y += glyph.fAdvanceY;
}
stopVector->set(SkFixedToScalar(x), SkFixedToScalar(y));
-
+
SkASSERT(text == stop);
}
@@ -61,7 +61,7 @@ static void GlyphCacheAuxProc(void* data) {
GrFontScaler* GrTextContext::GetGrFontScaler(SkGlyphCache* cache) {
void* auxData;
GrFontScaler* scaler = NULL;
-
+
if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) {
scaler = (GrFontScaler*)auxData;
}
@@ -69,7 +69,6 @@ GrFontScaler* GrTextContext::GetGrFontScaler(SkGlyphCache* cache) {
scaler = SkNEW_ARGS(SkGrFontScaler, (cache));
cache->setAuxProc(GlyphCacheAuxProc, scaler);
}
-
+
return scaler;
}
-