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

Unified Diff: src/device/xps/SkXPSDevice.cpp

Issue 801413002: fix last warnings on w64 and turn on w.a.e. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix/simplify memset bench name printing Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/common_variables.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/device/xps/SkXPSDevice.cpp
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp
index 5f24c12c88894c587dac4e144748ba2a6ea23093..45036b2aa8f800741634b76aab5ca6904a30d5c5 100644
--- a/src/device/xps/SkXPSDevice.cpp
+++ b/src/device/xps/SkXPSDevice.cpp
@@ -385,7 +385,7 @@ static HRESULT subset_typeface(SkXPSDevice::TypefaceUse* current) {
ttcfHeader->numOffsets = SkEndian_SwapBE32(ttcCount);
SK_OT_ULONG* offsetPtr = SkTAfter<SK_OT_ULONG>(ttcfHeader);
for (int i = 0; i < ttcCount; ++i, ++offsetPtr) {
- *offsetPtr = SkEndian_SwapBE32(extra);
+ *offsetPtr = SkEndian_SwapBE32(SkToU32(extra));
}
// Fix up offsets in sfnt table entries.
@@ -395,7 +395,7 @@ static HRESULT subset_typeface(SkXPSDevice::TypefaceUse* current) {
SkTAfter<SkSFNTHeader::TableDirectoryEntry>(sfntHeader);
for (int i = 0; i < numTables; ++i, ++tableDirectory) {
tableDirectory->offset = SkEndian_SwapBE32(
- SkEndian_SwapBE32(tableDirectory->offset) + extra);
+ SkToU32(SkEndian_SwapBE32(SkToU32(tableDirectory->offset)) + extra));
}
} else {
extra = 0;
@@ -2074,7 +2074,7 @@ static void text_draw_init(const SkPaint& paint,
SkBitSet& glyphsUsed,
SkDraw& myDraw, SkXPSDrawProcs& procs) {
procs.fD1GProc = xps_draw_1_glyph;
- size_t numGlyphGuess;
+ int numGlyphGuess;
switch (paint.getTextEncoding()) {
case SkPaint::kUTF8_TextEncoding:
numGlyphGuess = SkUTF8_CountUnichars(
@@ -2084,10 +2084,10 @@ static void text_draw_init(const SkPaint& paint,
case SkPaint::kUTF16_TextEncoding:
numGlyphGuess = SkUTF16_CountUnichars(
static_cast<const uint16_t *>(text),
- byteLength);
+ SkToInt(byteLength));
break;
case SkPaint::kGlyphID_TextEncoding:
- numGlyphGuess = byteLength / 2;
+ numGlyphGuess = SkToInt(byteLength / 2);
break;
default:
SK_ALWAYSBREAK(true);
« no previous file with comments | « gyp/common_variables.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698