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

Side by Side Diff: src/fonts/SkRandomScalerContext.cpp

Issue 1862643002: "Fix" compiler issue in SkRandomScalerContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « 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 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 "SkRandomScalerContext.h" 8 #include "SkRandomScalerContext.h"
9 #include "SkGlyph.h" 9 #include "SkGlyph.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return fProxy->charToGlyphID(uni); 53 return fProxy->charToGlyphID(uni);
54 } 54 }
55 55
56 void SkRandomScalerContext::generateAdvance(SkGlyph* glyph) { 56 void SkRandomScalerContext::generateAdvance(SkGlyph* glyph) {
57 fProxy->getAdvance(glyph); 57 fProxy->getAdvance(glyph);
58 } 58 }
59 59
60 void SkRandomScalerContext::generateMetrics(SkGlyph* glyph) { 60 void SkRandomScalerContext::generateMetrics(SkGlyph* glyph) {
61 // Here we will change the mask format of the glyph 61 // Here we will change the mask format of the glyph
62 // NOTE this is being overridden by the base class 62 // NOTE this is being overridden by the base class
63 SkMask::Format format; 63 SkMask::Format format = SkMask::kARGB32_Format; // init to handle defective compilers
64 switch (glyph->getGlyphID() % 4) { 64 switch (glyph->getGlyphID() % 4) {
65 case 0: 65 case 0:
66 format = SkMask::kLCD16_Format; 66 format = SkMask::kLCD16_Format;
67 break; 67 break;
68 case 1: 68 case 1:
69 format = SkMask::kA8_Format; 69 format = SkMask::kA8_Format;
70 break; 70 break;
71 case 2: 71 case 2:
72 format = SkMask::kARGB32_Format; 72 format = SkMask::kARGB32_Format;
73 break; 73 break;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 int SkRandomTypeface::onGetTableTags(SkFontTableTag tags[]) const { 248 int SkRandomTypeface::onGetTableTags(SkFontTableTag tags[]) const {
249 return fProxy->getTableTags(tags); 249 return fProxy->getTableTags(tags);
250 } 250 }
251 251
252 size_t SkRandomTypeface::onGetTableData(SkFontTableTag tag, size_t offset, 252 size_t SkRandomTypeface::onGetTableData(SkFontTableTag tag, size_t offset,
253 size_t length, void* data) const { 253 size_t length, void* data) const {
254 return fProxy->getTableData(tag, offset, length, data); 254 return fProxy->getTableData(tag, offset, length, data);
255 } 255 }
256 256
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