OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |