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

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

Issue 977273003: Merged https://codereview.chromium.org/922273002/ to M41 (Closed) Base URL: https://skia.googlesource.com/skia.git@m41
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/effects/GrYUVtoRGBEffect.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 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 * FT_PIXEL_MODE_GRAY N Y NR N Y 170 * FT_PIXEL_MODE_GRAY N Y NR N Y
171 * FT_PIXEL_MODE_GRAY2 NP NP NR NP NP 171 * FT_PIXEL_MODE_GRAY2 NP NP NR NP NP
172 * FT_PIXEL_MODE_GRAY4 NP NP NR NP NP 172 * FT_PIXEL_MODE_GRAY4 NP NP NR NP NP
173 * FT_PIXEL_MODE_LCD NP NP NR NP NP 173 * FT_PIXEL_MODE_LCD NP NP NR NP NP
174 * FT_PIXEL_MODE_LCD_V NP NP NR NP NP 174 * FT_PIXEL_MODE_LCD_V NP NP NR NP NP
175 * FT_PIXEL_MODE_BGRA N N NR Y N 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() == static_cast<int>(srcFTBitmap.width));
181 SkASSERT(dstMask.fBounds.height() == srcFTBitmap.rows); 181 SkASSERT(dstMask.fBounds.height() == static_cast<int>(srcFTBitmap.rows));
sugoi1 2015/03/10 14:58:20 I had to also add this small fix (that's already i
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.
186 const int srcPitch = srcFTBitmap.pitch; 186 const int srcPitch = srcFTBitmap.pitch;
187 const size_t srcRowBytes = SkTAbs(srcPitch); 187 const size_t srcRowBytes = SkTAbs(srcPitch);
188 188
189 uint8_t* dst = dstMask.fImage; 189 uint8_t* dst = dstMask.fImage;
190 const SkMask::Format dstFormat = static_cast<SkMask::Format>(dstMask.fFormat ); 190 const SkMask::Format dstFormat = static_cast<SkMask::Format>(dstMask.fFormat );
191 const size_t dstRowBytes = dstMask.fRowBytes; 191 const size_t dstRowBytes = dstMask.fRowBytes;
(...skipping 364 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/gpu/effects/GrYUVtoRGBEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698