aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/pdf/SkPDFGraphicState.h4
-rw-r--r--src/pdf/SkPDFDocument.cpp4
-rwxr-xr-xsrc/pdf/SkPDFFont.cpp3
-rw-r--r--src/pdf/SkPDFUtils.cpp2
4 files changed, 8 insertions, 5 deletions
diff --git a/include/pdf/SkPDFGraphicState.h b/include/pdf/SkPDFGraphicState.h
index 49809a4c03..0bdd6f104e 100644
--- a/include/pdf/SkPDFGraphicState.h
+++ b/include/pdf/SkPDFGraphicState.h
@@ -86,7 +86,9 @@ private:
explicit GSCanonicalEntry(SkPDFGraphicState* gs)
: fGraphicState(gs),
fPaint(&gs->fPaint) {}
- explicit GSCanonicalEntry(const SkPaint* paint) : fPaint(paint) {}
+ explicit GSCanonicalEntry(const SkPaint* paint)
+ : fGraphicState(NULL),
+ fPaint(paint) {}
};
// This should be made a hash table if performance is a problem.
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp
index 95370b4642..fce100ba52 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -36,7 +36,9 @@ void addResourcesToCatalog(int firstIndex, bool firstPage,
}
}
-SkPDFDocument::SkPDFDocument() : fXRefFileOffset(0) {
+SkPDFDocument::SkPDFDocument()
+ : fXRefFileOffset(0),
+ fSecondPageFirstResourceIndex(0) {
fDocCatalog = new SkPDFDict("Catalog");
fDocCatalog->unref(); // SkRefPtr and new both took a reference.
fCatalog.addObject(fDocCatalog.get(), true);
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index 277ed12ac3..f570a1f51a 100755
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -47,7 +47,8 @@ bool parsePFBSection(const uint8_t** src, size_t* len, int sectionType,
if (*len < 6)
return false;
- *size = buf[2] | (buf[3] << 8) | (buf[4] << 16) | (buf[5] << 24);
+ *size = (size_t)buf[2] | ((size_t)buf[3] << 8) | ((size_t)buf[4] << 16) |
+ ((size_t)buf[5] << 24);
size_t consumed = *size + 6;
if (consumed > *len)
return false;
diff --git a/src/pdf/SkPDFUtils.cpp b/src/pdf/SkPDFUtils.cpp
index a838427c73..fcad8a6d07 100644
--- a/src/pdf/SkPDFUtils.cpp
+++ b/src/pdf/SkPDFUtils.cpp
@@ -133,8 +133,6 @@ void SkPDFUtils::EmitPath(const SkPath& path, SkWStream* content) {
case SkPath::kClose_Verb:
ClosePath(content);
break;
- case SkPath::kDone_Verb:
- break;
default:
SkASSERT(false);
break;