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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp

Issue 100323003: Remove SkPdfNativeDoc::tokenizerOfStream. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 SkPdfPageObjectDictionary* current = fPages[page]; 472 SkPdfPageObjectDictionary* current = fPages[page];
473 while (!current->has_MediaBox() && current->has_Parent()) { 473 while (!current->has_MediaBox() && current->has_Parent()) {
474 current = (SkPdfPageObjectDictionary*)current->Parent(this); 474 current = (SkPdfPageObjectDictionary*)current->Parent(this);
475 } 475 }
476 if (current) { 476 if (current) {
477 return current->MediaBox(this); 477 return current->MediaBox(this);
478 } 478 }
479 return SkRect::MakeEmpty(); 479 return SkRect::MakeEmpty();
480 } 480 }
481 481
482 SkPdfNativeTokenizer* SkPdfNativeDoc::tokenizerOfStream(SkPdfNativeObject* strea m,
483 SkPdfAllocator* allocato r) {
484 if (stream == NULL) {
485 return NULL;
486 }
487
488 return new SkPdfNativeTokenizer(stream, allocator, this);
489 }
490
491 size_t SkPdfNativeDoc::objects() const { 482 size_t SkPdfNativeDoc::objects() const {
492 return fObjects.count(); 483 return fObjects.count();
493 } 484 }
494 485
495 SkPdfNativeObject* SkPdfNativeDoc::object(int i) { 486 SkPdfNativeObject* SkPdfNativeDoc::object(int i) {
496 SkASSERT(!(i < 0 || i > fObjects.count())); 487 SkASSERT(!(i < 0 || i > fObjects.count()));
497 488
498 if (i < 0 || i > fObjects.count()) { 489 if (i < 0 || i > fObjects.count()) {
499 return NULL; 490 return NULL;
500 } 491 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 return (SkPdfNativeObject*)ref; 573 return (SkPdfNativeObject*)ref;
583 } 574 }
584 575
585 size_t SkPdfNativeDoc::bytesUsed() const { 576 size_t SkPdfNativeDoc::bytesUsed() const {
586 return fAllocator->bytesUsed() + 577 return fAllocator->bytesUsed() +
587 fContentLength + 578 fContentLength +
588 fObjects.count() * sizeof(PublicObjectEntry) + 579 fObjects.count() * sizeof(PublicObjectEntry) +
589 fPages.count() * sizeof(SkPdfPageObjectDictionary*) + 580 fPages.count() * sizeof(SkPdfPageObjectDictionary*) +
590 sizeof(*this); 581 sizeof(*this);
591 } 582 }
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.h ('k') | experimental/PdfViewer/src/SkPdfContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698