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/GrBitmapTextContext.cpp

Issue 939123002: Make fID and MixedID calculations private (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Support android build 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
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 "GrBitmapTextContext.h" 8 #include "GrBitmapTextContext.h"
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "GrDefaultGeoProcFactory.h" 10 #include "GrDefaultGeoProcFactory.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 fTotalVertexCount = kVerticesPerGlyph*numGlyphs; 131 fTotalVertexCount = kVerticesPerGlyph*numGlyphs;
132 132
133 const char* stop = text + byteLength; 133 const char* stop = text + byteLength;
134 134
135 SkAutoKern autokern; 135 SkAutoKern autokern;
136 136
137 SkFixed fxMask = ~0; 137 SkFixed fxMask = ~0;
138 SkFixed fyMask = ~0; 138 SkFixed fyMask = ~0;
139 SkFixed halfSampleX, halfSampleY; 139 SkFixed halfSampleX, halfSampleY;
140 if (cache->isSubpixel()) { 140 if (cache->isSubpixel()) {
141 halfSampleX = halfSampleY = (SK_FixedHalf >> SkGlyph::kSubBits); 141 halfSampleX = halfSampleY = SkGlyph::kSubpixelRound;
142 SkAxisAlignment baseline = SkComputeAxisAlignmentForHText(viewMatrix); 142 SkAxisAlignment baseline = SkComputeAxisAlignmentForHText(viewMatrix);
143 if (kX_SkAxisAlignment == baseline) { 143 if (kX_SkAxisAlignment == baseline) {
144 fyMask = 0; 144 fyMask = 0;
145 halfSampleY = SK_FixedHalf; 145 halfSampleY = SK_FixedHalf;
146 } else if (kY_SkAxisAlignment == baseline) { 146 } else if (kY_SkAxisAlignment == baseline) {
147 fxMask = 0; 147 fxMask = 0;
148 halfSampleX = SK_FixedHalf; 148 halfSampleX = SK_FixedHalf;
149 } 149 }
150 } else { 150 } else {
151 halfSampleX = halfSampleY = SK_FixedHalf; 151 halfSampleX = halfSampleY = SK_FixedHalf;
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 } 597 }
598 } 598 }
599 599
600 inline void GrBitmapTextContext::finish() { 600 inline void GrBitmapTextContext::finish() {
601 this->flush(); 601 this->flush();
602 fTotalVertexCount = 0; 602 fTotalVertexCount = 0;
603 603
604 GrTextContext::finish(); 604 GrTextContext::finish();
605 } 605 }
606 606
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698