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

Side by Side Diff: src/ports/SkFontHost_FreeType_common.cpp

Issue 728673002: remove unused kLCD_MaskFormat (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove associated Gr enum Created 6 years, 1 month 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/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontHost_mac.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 2006-2012 The Android Open Source Project 2 * Copyright 2006-2012 The Android Open Source Project
3 * Copyright 2012 Mozilla Foundation 3 * Copyright 2012 Mozilla Foundation
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 SkDEBUGFAIL("unsupported FT_Pixel_Mode for LCD16"); 158 SkDEBUGFAIL("unsupported FT_Pixel_Mode for LCD16");
159 break; 159 break;
160 } 160 }
161 } 161 }
162 162
163 /** 163 /**
164 * Copies a FT_Bitmap into an SkMask with the same dimensions. 164 * Copies a FT_Bitmap into an SkMask with the same dimensions.
165 * 165 *
166 * Yes, No, Never Requested, Never Produced 166 * Yes, No, Never Requested, Never Produced
167 * 167 *
168 * kBW kA8 k3D kARGB32 kLCD16 kLCD32 168 * kBW kA8 k3D kARGB32 kLCD16
169 * FT_PIXEL_MODE_MONO Y Y NR N Y NR 169 * FT_PIXEL_MODE_MONO Y Y NR N Y
170 * FT_PIXEL_MODE_GRAY N Y NR N Y NR 170 * FT_PIXEL_MODE_GRAY N Y NR N Y
171 * FT_PIXEL_MODE_GRAY2 NP NP NR NP NP NR 171 * FT_PIXEL_MODE_GRAY2 NP NP NR NP NP
172 * FT_PIXEL_MODE_GRAY4 NP NP NR NP NP NR 172 * FT_PIXEL_MODE_GRAY4 NP NP NR NP NP
173 * FT_PIXEL_MODE_LCD NP NP NR NP NP NR 173 * FT_PIXEL_MODE_LCD NP NP NR NP NP
174 * FT_PIXEL_MODE_LCD_V NP NP NR NP NP NR 174 * FT_PIXEL_MODE_LCD_V NP NP NR NP NP
175 * FT_PIXEL_MODE_BGRA N N NR Y N NR 175 * FT_PIXEL_MODE_BGRA N N NR Y N
176 * 176 *
177 * TODO: All of these N need to be Y or otherwise ruled out. 177 * TODO: All of these N need to be Y or otherwise ruled out.
178 */ 178 */
179 static void copyFTBitmap(const FT_Bitmap& srcFTBitmap, SkMask& dstMask) { 179 static void copyFTBitmap(const FT_Bitmap& srcFTBitmap, SkMask& dstMask) {
180 SkASSERT(dstMask.fBounds.width() == srcFTBitmap.width); 180 SkASSERT(dstMask.fBounds.width() == srcFTBitmap.width);
181 SkASSERT(dstMask.fBounds.height() == srcFTBitmap.rows); 181 SkASSERT(dstMask.fBounds.height() == srcFTBitmap.rows);
182 182
183 const uint8_t* src = reinterpret_cast<const uint8_t*>(srcFTBitmap.buffer); 183 const uint8_t* src = reinterpret_cast<const uint8_t*>(srcFTBitmap.buffer);
184 const FT_Pixel_Mode srcFormat = static_cast<FT_Pixel_Mode>(srcFTBitmap.pixel _mode); 184 const FT_Pixel_Mode srcFormat = static_cast<FT_Pixel_Mode>(srcFTBitmap.pixel _mode);
185 // FT_Bitmap::pitch is an int and allowed to be negative. 185 // FT_Bitmap::pitch is an int and allowed to be negative.
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 556
557 FT_Error err = FT_Outline_Decompose(&face->glyph->outline, &funcs, path); 557 FT_Error err = FT_Outline_Decompose(&face->glyph->outline, &funcs, path);
558 558
559 if (err != 0) { 559 if (err != 0) {
560 path->reset(); 560 path->reset();
561 return; 561 return;
562 } 562 }
563 563
564 path->close(); 564 path->close();
565 } 565 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698