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

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

Issue 977623002: Glyph positions maintain 32 bit integer part. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Warnings as errors on Windows. 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/GrBitmapTextContext.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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // transform is not part of SkPaint::measureText API, and thus we use the 181 // transform is not part of SkPaint::measureText API, and thus we use the
182 // same glyphs as what were measured. 182 // same glyphs as what were measured.
183 183
184 this->init(rt, clip, paint, skPaint, byteLength, kMaxPerformance_RenderMode, viewMatrix); 184 this->init(rt, clip, paint, skPaint, byteLength, kMaxPerformance_RenderMode, viewMatrix);
185 185
186 SkDrawCacheProc glyphCacheProc = fSkPaint.getDrawCacheProc(); 186 SkDrawCacheProc glyphCacheProc = fSkPaint.getDrawCacheProc();
187 187
188 const char* stop = text + byteLength; 188 const char* stop = text + byteLength;
189 189
190 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition); 190 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition);
191 SkTextAlignProcScalar alignProc(fSkPaint.getTextAlign()); 191 SkTextAlignProc alignProc(fSkPaint.getTextAlign());
192 while (text < stop) { 192 while (text < stop) {
193 const SkGlyph& glyph = glyphCacheProc(fGlyphCache, &text, 0, 0); 193 const SkGlyph& glyph = glyphCacheProc(fGlyphCache, &text, 0, 0);
194 if (glyph.fWidth) { 194 if (glyph.fWidth) {
195 SkPoint tmsLoc; 195 SkPoint tmsLoc;
196 tmsProc(pos, &tmsLoc); 196 tmsProc(pos, &tmsLoc);
197 SkPoint loc; 197 SkPoint loc;
198 alignProc(tmsLoc, glyph, &loc); 198 alignProc(tmsLoc, glyph, &loc);
199 199
200 this->appendGlyph(glyph, loc); 200 this->appendGlyph(glyph, loc);
201 } 201 }
(...skipping 261 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/GrBitmapTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698