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

Unified Diff: src/pdf/SkPDFDocument.cpp

Issue 798723002: More win64 warning fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@size_t
Patch Set: off_t is signed 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 | « src/pdf/SkPDFCatalog.cpp ('k') | src/sfnt/SkOTUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDocument.cpp
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp
index 79699a0292f13c8290bb82fdcbd166c2e6e7d985..9b1458f8324079e560a92afb7f1c0ea9bf174a1f 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -160,14 +160,12 @@ bool SkPDFDocument::emitPDF(SkWStream* stream) {
perform_font_subsetting(fCatalog.get(), fPages, &fSubstitutes);
// Figure out the size of things and inform the catalog of file offsets.
- off_t fileOffset = headerSize();
- fileOffset += fCatalog->setFileOffset(fDocCatalog, fileOffset);
- fileOffset += fCatalog->setFileOffset(fPages[0], fileOffset);
- fileOffset += fPages[0]->getPageSize(fCatalog.get(),
- (size_t) fileOffset);
+ off_t fileOffset = SkToOffT(this->headerSize());
+ fileOffset += SkToOffT(fCatalog->setFileOffset(fDocCatalog, fileOffset));
+ fileOffset += SkToOffT(fCatalog->setFileOffset(fPages[0], fileOffset));
+ fileOffset += fPages[0]->getPageSize(fCatalog.get(), fileOffset);
for (int i = 0; i < fFirstPageResources->count(); i++) {
- fileOffset += fCatalog->setFileOffset((*fFirstPageResources)[i],
- fileOffset);
+ fileOffset += SkToOffT(fCatalog->setFileOffset((*fFirstPageResources)[i], fileOffset));
}
// Add the size of resources of substitute objects used on page 1.
fileOffset += fCatalog->setSubstituteResourcesOffsets(fileOffset, true);
@@ -177,7 +175,7 @@ bool SkPDFDocument::emitPDF(SkWStream* stream) {
}
for (int i = 0; i < fPageTree.count(); i++) {
- fileOffset += fCatalog->setFileOffset(fPageTree[i], fileOffset);
+ fileOffset += SkToOffT(fCatalog->setFileOffset(fPageTree[i], fileOffset));
}
for (int i = 1; i < fPages.count(); i++) {
@@ -185,12 +183,10 @@ bool SkPDFDocument::emitPDF(SkWStream* stream) {
}
for (int i = 0; i < fOtherPageResources->count(); i++) {
- fileOffset += fCatalog->setFileOffset(
- (*fOtherPageResources)[i], fileOffset);
+ fileOffset += SkToOffT(fCatalog->setFileOffset((*fOtherPageResources)[i], fileOffset));
}
- fileOffset += fCatalog->setSubstituteResourcesOffsets(fileOffset,
- false);
+ fileOffset += fCatalog->setSubstituteResourcesOffsets(fileOffset, false);
fXRefFileOffset = fileOffset;
}
« no previous file with comments | « src/pdf/SkPDFCatalog.cpp ('k') | src/sfnt/SkOTUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698