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

Side by Side Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 1000933003: Remove SkLONGLONG. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months 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
« no previous file with comments | « src/core/SkMath.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | 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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrDistanceFieldTextContext.h" 8 #include "GrDistanceFieldTextContext.h"
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "GrBitmapTextContext.h" 10 #include "GrBitmapTextContext.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 240
241 SkAutoKern autokern; 241 SkAutoKern autokern;
242 const char* stop = text + byteLength; 242 const char* stop = text + byteLength;
243 while (textPtr < stop) { 243 while (textPtr < stop) {
244 // don't need x, y here, since all subpixel variants will have the 244 // don't need x, y here, since all subpixel variants will have the
245 // same advance 245 // same advance
246 const SkGlyph& glyph = glyphCacheProc(cache, &textPtr, 0, 0); 246 const SkGlyph& glyph = glyphCacheProc(cache, &textPtr, 0, 0);
247 247
248 SkFixed width = glyph.fAdvanceX + autokern.adjust(glyph); 248 SkFixed width = glyph.fAdvanceX + autokern.adjust(glyph);
249 positions.push_back(SkFixedToScalar(stopX + SkFixedMul_portable(origin, width))); 249 positions.push_back(SkFixedToScalar(stopX + SkFixedMul(origin, width)));
250 250
251 SkFixed height = glyph.fAdvanceY; 251 SkFixed height = glyph.fAdvanceY;
252 positions.push_back(SkFixedToScalar(stopY + SkFixedMul_portable(origin, height))); 252 positions.push_back(SkFixedToScalar(stopY + SkFixedMul(origin, height))) ;
253 253
254 stopX += width; 254 stopX += width;
255 stopY += height; 255 stopY += height;
256 } 256 }
257 SkASSERT(textPtr == stop); 257 SkASSERT(textPtr == stop);
258 258
259 // now adjust starting point depending on alignment 259 // now adjust starting point depending on alignment
260 SkScalar alignX = SkFixedToScalar(stopX); 260 SkScalar alignX = SkFixedToScalar(stopX);
261 SkScalar alignY = SkFixedToScalar(stopY); 261 SkScalar alignY = SkFixedToScalar(stopY);
262 if (skPaint.getTextAlign() == SkPaint::kCenter_Align) { 262 if (skPaint.getTextAlign() == SkPaint::kCenter_Align) {
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 } 718 }
719 } 719 }
720 720
721 inline void GrDistanceFieldTextContext::finish() { 721 inline void GrDistanceFieldTextContext::finish() {
722 this->flush(); 722 this->flush();
723 fTotalVertexCount = 0; 723 fTotalVertexCount = 0;
724 724
725 GrTextContext::finish(); 725 GrTextContext::finish();
726 } 726 }
727 727
OLDNEW
« no previous file with comments | « src/core/SkMath.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698