public:
SkUnencodedText(const SkPdfString* obj) {
text = (void*)obj->c_str();
- len = obj->lenstr();
+ len = (int) obj->lenstr();
}
};
unsigned long ch4 = ch;
char utf8[10];
- int len = SkUTF8_FromUnichar(ch4, utf8);
+ size_t len = SkUTF8_FromUnichar((SkUnichar) ch4, utf8);
canvas->drawText(utf8, len, SkDoubleToScalar(0), SkDoubleToScalar(0), *paint);
const unsigned char* current = fFileContent + startOffset;
const unsigned char* end = fFileContent + fContentLength;
- SkPdfNativeTokenizer tokenizer(current, end - current, fAllocator, this);
+ SkPdfNativeTokenizer tokenizer(current, (int) (end - current), fAllocator, this);
SkPdfNativeObject idObj;
SkPdfNativeObject generationObj;
return;
}
- int cnt = kids->size();
+ int cnt = (int) kids->size();
for (int i = 0; i < cnt; i++) {
SkPdfNativeObject* obj = resolveReference(kids->objAtAIndex(i));
if (fMapper->mapPageObjectDictionary(obj) != kPageObjectDictionary_SkPdfNativeObjectType) {
applyFilter(filterName.c_str());
} else if (stream->isFilterAArray(NULL)) {
const SkPdfArray* filters = stream->getFilterAsArray(NULL);
- int cnt = filters->size();
+ int cnt = (int) filters->size();
for (int i = cnt - 1; i >= 0; i--) {
const SkPdfNativeObject* filterName = filters->objAtAIndex(i);
if (filterName != NULL && filterName->isName()) {
while ((key = iter.next(&obj)) != NULL) {
appendSpaces(&str, level + 2);
str.appendf("/%s %s\n", key,
- obj->toString(0, level + strlen(key) + 4).c_str());
+ obj->toString(0, level + (int) strlen(key) + 4).c_str());
}
appendSpaces(&str, level);
str.append(">>");
const char* key;
int value = 0;
while ((key = iter.next(&value)) != NULL) {
- printf("%s: %s -> count %i\n", gRenderStatsNames[i], key, value);
+ SkDebugf("%s: %s -> count %i\n", gRenderStatsNames[i], key, value);
}
}
}
if (colorSpace->isName()) {
colorOperator->fColorSpace = colorSpace->strRef();
} else if (colorSpace->isArray()) {
- int cnt = colorSpace->size();
+ size_t cnt = colorSpace->size();
if (cnt == 0) {
SkPdfReport(kIgnoreError_SkPdfIssueSeverity, kIncostistentSizes_SkPdfIssue,
"color space has length 0", colorSpace, pdfContext);
return kIgnoreError_SkPdfResult;
}
- int cnt = intervals->size();
+ int cnt = (int) intervals->size();
if (cnt >= 256) {
// TODO(edisonn): alloc memory
SkPdfReport(kCodeWarning_SkPdfIssueSeverity, kNYI_SkPdfIssue,
}
SkXfermode::Mode modes[256];
- int cnt = blendModes->size();
+ int cnt = (int) blendModes->size();
for (int i = 0; i < cnt; i++) {
SkPdfNativeObject* name = blendModes->objAtAIndex(i);
if (!name || !name->isName()) {