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

Side by Side Diff: src/pdf/SkPDFCatalog.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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | src/pdf/SkPDFDocument.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 /* 2 /*
3 * Copyright 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
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 9
10 #include "SkPDFCatalog.h" 10 #include "SkPDFCatalog.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 } 191 }
192 return object; 192 return object;
193 } 193 }
194 194
195 off_t SkPDFCatalog::setSubstituteResourcesOffsets(off_t fileOffset, 195 off_t SkPDFCatalog::setSubstituteResourcesOffsets(off_t fileOffset,
196 bool firstPage) { 196 bool firstPage) {
197 SkTSet<SkPDFObject*>* targetSet = getSubstituteList(firstPage); 197 SkTSet<SkPDFObject*>* targetSet = getSubstituteList(firstPage);
198 off_t offsetSum = fileOffset; 198 off_t offsetSum = fileOffset;
199 for (int i = 0; i < targetSet->count(); ++i) { 199 for (int i = 0; i < targetSet->count(); ++i) {
200 offsetSum += setFileOffset((*targetSet)[i], offsetSum); 200 offsetSum += SkToOffT(setFileOffset((*targetSet)[i], offsetSum));
201 } 201 }
202 return offsetSum - fileOffset; 202 return offsetSum - fileOffset;
203 } 203 }
204 204
205 void SkPDFCatalog::emitSubstituteResources(SkWStream *stream, bool firstPage) { 205 void SkPDFCatalog::emitSubstituteResources(SkWStream *stream, bool firstPage) {
206 SkTSet<SkPDFObject*>* targetSet = getSubstituteList(firstPage); 206 SkTSet<SkPDFObject*>* targetSet = getSubstituteList(firstPage);
207 for (int i = 0; i < targetSet->count(); ++i) { 207 for (int i = 0; i < targetSet->count(); ++i) {
208 (*targetSet)[i]->emit(stream, this, true); 208 (*targetSet)[i]->emit(stream, this, true);
209 } 209 }
210 } 210 }
211 211
212 SkTSet<SkPDFObject*>* SkPDFCatalog::getSubstituteList(bool firstPage) { 212 SkTSet<SkPDFObject*>* SkPDFCatalog::getSubstituteList(bool firstPage) {
213 return firstPage ? &fSubstituteResourcesFirstPage : 213 return firstPage ? &fSubstituteResourcesFirstPage :
214 &fSubstituteResourcesRemaining; 214 &fSubstituteResourcesRemaining;
215 } 215 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698