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

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

Issue 23258004: pdfviewer: code cleanup - remove STL usage (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months 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
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h ('k') | no next file » | 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 #include "SkPdfNativeObject.h" 2 #include "SkPdfNativeObject.h"
3 3
4 // TODO(edisonn): mac builder does not find the header ... but from headers is o k 4 // TODO(edisonn): mac builder does not find the header ... but from headers is o k
5 //#include "SkPdfStreamCommonDictionary_autogen.h" 5 //#include "SkPdfStreamCommonDictionary_autogen.h"
6 #include "SkPdfHeaders_autogen.h" 6 #include "SkPdfHeaders_autogen.h"
7 7
8 #include "SkFlate.h" 8 #include "SkFlate.h"
9 #include "SkStream.h" 9 #include "SkStream.h"
10 #include "SkPdfNativeTokenizer.h" 10 #include "SkPdfNativeTokenizer.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 if (isStreamFiltered()) { 67 if (isStreamFiltered()) {
68 return true; 68 return true;
69 } 69 }
70 70
71 SkPdfStreamCommonDictionary* stream = (SkPdfStreamCommonDictionary*)this; 71 SkPdfStreamCommonDictionary* stream = (SkPdfStreamCommonDictionary*)this;
72 72
73 if (!stream->has_Filter()) { 73 if (!stream->has_Filter()) {
74 fStr.fBytes = ((fStr.fBytes >> 1) << 1) + kFilteredStreamBit; 74 fStr.fBytes = ((fStr.fBytes >> 1) << 1) + kFilteredStreamBit;
75 } else if (stream->isFilterAName(NULL)) { 75 } else if (stream->isFilterAName(NULL)) {
76 std::string filterName = stream->getFilterAsName(NULL); 76 SkString filterName = stream->getFilterAsName(NULL);
77 applyFilter(filterName.c_str()); 77 applyFilter(filterName.c_str());
78 } else if (stream->isFilterAArray(NULL)) { 78 } else if (stream->isFilterAArray(NULL)) {
79 const SkPdfArray* filters = stream->getFilterAsArray(NULL); 79 const SkPdfArray* filters = stream->getFilterAsArray(NULL);
80 int cnt = filters->size(); 80 int cnt = filters->size();
81 for (int i = cnt - 1; i >= 0; i--) { 81 for (int i = cnt - 1; i >= 0; i--) {
82 const SkPdfNativeObject* filterName = filters->objAtAIndex(i); 82 const SkPdfNativeObject* filterName = filters->objAtAIndex(i);
83 if (filterName != NULL && filterName->isName()) { 83 if (filterName != NULL && filterName->isName()) {
84 if (!applyFilter(filterName->nameValue())) { 84 if (!applyFilter(filterName->nameValue())) {
85 break; 85 break;
86 } 86 }
(...skipping 16 matching lines...) Expand all
103 delete (SkBitmap*)fData; 103 delete (SkBitmap*)fData;
104 break; 104 break;
105 default: 105 default:
106 SkASSERT(false); 106 SkASSERT(false);
107 break; 107 break;
108 } 108 }
109 } 109 }
110 fData = NULL; 110 fData = NULL;
111 fDataType = kEmpty_Data; 111 fDataType = kEmpty_Data;
112 } 112 }
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698