Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: src/core/SkScalerContext.cpp

Issue 99323002: Fix truncation of glyphs in SkScalerContext.cpp (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkScalerContext.h" 10 #include "SkScalerContext.h"
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 552
553 for (int y = 0; y < height; ++y) { 553 for (int y = 0; y < height; ++y) {
554 for (int i = 0; i < octs; ++i) { 554 for (int i = 0; i < octs; ++i) {
555 *dst++ = pack_8_to_1(src); 555 *dst++ = pack_8_to_1(src);
556 src += 8; 556 src += 8;
557 } 557 }
558 if (leftOverBits > 0) { 558 if (leftOverBits > 0) {
559 unsigned bits = 0; 559 unsigned bits = 0;
560 int shift = 7; 560 int shift = 7;
561 for (int i = 0; i < leftOverBits; ++i, --shift) { 561 for (int i = 0; i < leftOverBits; ++i, --shift) {
562 bits |= convert_8_to_1(*src++ >> 7) << shift; 562 bits |= convert_8_to_1(*src++) << shift;
563 } 563 }
564 *dst++ = bits; 564 *dst++ = bits;
565 } 565 }
566 src += srcPad; 566 src += srcPad;
567 dst += dstPad; 567 dst += dstPad;
568 } 568 }
569 } 569 }
570 570
571 static void generateMask(const SkMask& mask, const SkPath& path, 571 static void generateMask(const SkMask& mask, const SkPath& path,
572 const SkMaskGamma::PreBlend& maskPreBlend) { 572 const SkMaskGamma::PreBlend& maskPreBlend) {
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, 980 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc,
981 bool allowFailure) const { 981 bool allowFailure) const {
982 SkScalerContext* c = this->onCreateScalerContext(desc); 982 SkScalerContext* c = this->onCreateScalerContext(desc);
983 983
984 if (!c && !allowFailure) { 984 if (!c && !allowFailure) {
985 c = SkNEW_ARGS(SkScalerContext_Empty, 985 c = SkNEW_ARGS(SkScalerContext_Empty,
986 (const_cast<SkTypeface*>(this), desc)); 986 (const_cast<SkTypeface*>(this), desc));
987 } 987 }
988 return c; 988 return c;
989 } 989 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698