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

Side by Side Diff: src/gpu/GrStencilAndCoverTextContext.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/gpu/GrDistanceFieldTextContext.cpp ('k') | 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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "GrStencilAndCoverTextContext.h" 8 #include "GrStencilAndCoverTextContext.h"
9 #include "GrBitmapTextContext.h" 9 #include "GrBitmapTextContext.h"
10 #include "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 SkAutoKern autokern; 138 SkAutoKern autokern;
139 139
140 SkFixed fixedSizeRatio = SkScalarToFixed(fTextRatio); 140 SkFixed fixedSizeRatio = SkScalarToFixed(fTextRatio);
141 141
142 SkFixed fx = SkScalarToFixed(x); 142 SkFixed fx = SkScalarToFixed(x);
143 SkFixed fy = SkScalarToFixed(y); 143 SkFixed fy = SkScalarToFixed(y);
144 while (text < stop) { 144 while (text < stop) {
145 const SkGlyph& glyph = glyphCacheProc(fGlyphCache, &text, 0, 0); 145 const SkGlyph& glyph = glyphCacheProc(fGlyphCache, &text, 0, 0);
146 fx += SkFixedMul_portable(autokern.adjust(glyph), fixedSizeRatio); 146 fx += SkFixedMul(autokern.adjust(glyph), fixedSizeRatio);
147 if (glyph.fWidth) { 147 if (glyph.fWidth) {
148 this->appendGlyph(glyph, SkPoint::Make(SkFixedToScalar(fx), SkFixedT oScalar(fy))); 148 this->appendGlyph(glyph, SkPoint::Make(SkFixedToScalar(fx), SkFixedT oScalar(fy)));
149 } 149 }
150 150
151 fx += SkFixedMul_portable(glyph.fAdvanceX, fixedSizeRatio); 151 fx += SkFixedMul(glyph.fAdvanceX, fixedSizeRatio);
152 fy += SkFixedMul_portable(glyph.fAdvanceY, fixedSizeRatio); 152 fy += SkFixedMul(glyph.fAdvanceY, fixedSizeRatio);
153 } 153 }
154 154
155 this->finish(); 155 this->finish();
156 } 156 }
157 157
158 void GrStencilAndCoverTextContext::onDrawPosText(GrRenderTarget* rt, 158 void GrStencilAndCoverTextContext::onDrawPosText(GrRenderTarget* rt,
159 const GrClip& clip, 159 const GrClip& clip,
160 const GrPaint& paint, 160 const GrPaint& paint,
161 const SkPaint& skPaint, 161 const SkPaint& skPaint,
162 const SkMatrix& viewMatrix, 162 const SkMatrix& viewMatrix,
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 SkGlyphCache::AttachCache(fGlyphCache); 464 SkGlyphCache::AttachCache(fGlyphCache);
465 fGlyphCache = NULL; 465 fGlyphCache = NULL;
466 466
467 fPipelineBuilder.stencil()->setDisabled(); 467 fPipelineBuilder.stencil()->setDisabled();
468 fStateRestore.set(NULL); 468 fStateRestore.set(NULL);
469 fViewMatrix = fContextInitialMatrix; 469 fViewMatrix = fContextInitialMatrix;
470 GrTextContext::finish(); 470 GrTextContext::finish();
471 } 471 }
472 472
OLDNEW
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698