aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextStrike.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrTextStrike.cpp')
-rw-r--r--src/gpu/GrTextStrike.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp
index 8c2fa0bdd2..65ead0f0bb 100644
--- a/src/gpu/GrTextStrike.cpp
+++ b/src/gpu/GrTextStrike.cpp
@@ -332,22 +332,9 @@ bool GrTextStrike::addGlyphToAtlas(GrGlyph* glyph, GrFontScaler* scaler) {
(unsigned char*)storage.get(),
width, height, DISTANCE_FIELD_RANGE);
} else {
- // TODO: Fix color emoji
- // for now, copy glyph into distance field storage
- // this is not correct, but it won't crash
- sk_bzero(dfStorage.get(), dfSize);
- unsigned char* ptr = (unsigned char*) storage.get();
- unsigned char* dfPtr = (unsigned char*) dfStorage.get();
- size_t dfStride = dfWidth*bytesPerPixel;
- dfPtr += DISTANCE_FIELD_RANGE*dfStride;
- dfPtr += DISTANCE_FIELD_RANGE*bytesPerPixel;
-
- for (int i = 0; i < height; ++i) {
- memcpy(dfPtr, ptr, stride);
-
- dfPtr += dfStride;
- ptr += stride;
- }
+ // distance fields should only be used to represent alpha masks
+ SkASSERT(false);
+ return false;
}
// copy to atlas