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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.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 unified diff | Download patch
« no previous file with comments | « bench/nanobench.cpp ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPdfNativeDoc.h" 8 #include "SkPdfNativeDoc.h"
9 9
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 if (!token.isKeyword("obj")) { 182 if (!token.isKeyword("obj")) {
183 SkPdfReport(kWarning_SkPdfIssueSeverity, kMissingToken_SkPdfIssu e, 183 SkPdfReport(kWarning_SkPdfIssueSeverity, kMissingToken_SkPdfIssu e,
184 "Could not find obj", NULL, NULL); 184 "Could not find obj", NULL, NULL);
185 continue; 185 continue;
186 } 186 }
187 187
188 while (fObjects.count() < id + 1) { 188 while (fObjects.count() < id + 1) {
189 reset(fObjects.append()); 189 reset(fObjects.append());
190 } 190 }
191 191
192 fObjects[id].fOffset = current - fFileContent; 192 fObjects[id].fOffset = SkToInt(current - fFileContent);
193 193
194 SkPdfNativeObject* obj = fAllocator->allocObject(); 194 SkPdfNativeObject* obj = fAllocator->allocObject();
195 current = nextObject(current, end, obj, fAllocator, this); 195 current = nextObject(current, end, obj, fAllocator, this);
196 196
197 fObjects[id].fResolvedReference = obj; 197 fObjects[id].fResolvedReference = obj;
198 fObjects[id].fObj = obj; 198 fObjects[id].fObj = obj;
199 fObjects[id].fIsReferenceResolved = true; 199 fObjects[id].fIsReferenceResolved = true;
200 } else if (token.isKeyword("trailer")) { 200 } else if (token.isKeyword("trailer")) {
201 long dummy; 201 long dummy;
202 current = readTrailer(current, end, true, &dummy, true); 202 current = readTrailer(current, end, true, &dummy, true);
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 return (SkPdfNativeObject*)ref; 573 return (SkPdfNativeObject*)ref;
574 } 574 }
575 575
576 size_t SkPdfNativeDoc::bytesUsed() const { 576 size_t SkPdfNativeDoc::bytesUsed() const {
577 return fAllocator->bytesUsed() + 577 return fAllocator->bytesUsed() +
578 fContentLength + 578 fContentLength +
579 fObjects.count() * sizeof(PublicObjectEntry) + 579 fObjects.count() * sizeof(PublicObjectEntry) +
580 fPages.count() * sizeof(SkPdfPageObjectDictionary*) + 580 fPages.count() * sizeof(SkPdfPageObjectDictionary*) +
581 sizeof(*this); 581 sizeof(*this);
582 } 582 }
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698