aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-12 19:53:16 +0000
committerGravatar edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-12 19:53:16 +0000
commit8c020612bad088d1a26dd663f0a806deeef8029b (patch)
treeddfbddd98d4fe8383678e9a458516da1b1fde419
parent632b9ccebf9a39049579c7312e49d36df552cfd8 (diff)
Update flag to reflect actual meaning.
Review URL: https://codereview.chromium.org/12754004 git-svn-id: http://skia.googlecode.com/svn/trunk@8118 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--include/pdf/SkPDFDocument.h5
-rw-r--r--src/pdf/SkPDFStream.cpp2
-rw-r--r--tests/PDFPrimitivesTest.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/include/pdf/SkPDFDocument.h b/include/pdf/SkPDFDocument.h
index 167634e0fe..cb786c7133 100644
--- a/include/pdf/SkPDFDocument.h
+++ b/include/pdf/SkPDFDocument.h
@@ -29,7 +29,10 @@ class SkWStream;
class SkPDFDocument {
public:
enum Flags {
- kNoCompression_Flags = 0x01, //!< mask disable stream compression.
+ kNoCompression_Flags = 0x01, //!< DEPRECATED.
+ kFavorSpeedOverSize_Flags = 0x01, //!< Don't compress the stream, but
+ // if it is already compressed return
+ // the compressed stream.
kNoLinks_Flags = 0x02, //!< do not honor link annotations.
kDraftMode_Flags = 0x01,
diff --git a/src/pdf/SkPDFStream.cpp b/src/pdf/SkPDFStream.cpp
index 38e874ea1b..a6b2ec8b8e 100644
--- a/src/pdf/SkPDFStream.cpp
+++ b/src/pdf/SkPDFStream.cpp
@@ -15,7 +15,7 @@
static bool skip_compression(SkPDFCatalog* catalog) {
return SkToBool(catalog->getDocumentFlags() &
- SkPDFDocument::kNoCompression_Flags);
+ SkPDFDocument::kFavorSpeedOverSize_Flags);
}
SkPDFStream::SkPDFStream(SkStream* stream)
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 9d52fcdc49..cc89d6b806 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -51,7 +51,7 @@ static void CheckObjectOutput(skiatest::Reporter* reporter, SkPDFObject* obj,
bool indirect, bool compression) {
SkPDFDocument::Flags docFlags = (SkPDFDocument::Flags) 0;
if (!compression) {
- docFlags = SkTBitOr(docFlags, SkPDFDocument::kNoCompression_Flags);
+ docFlags = SkTBitOr(docFlags, SkPDFDocument::kFavorSpeedOverSize_Flags);
}
SkPDFCatalog catalog(docFlags);
size_t directSize = obj->getOutputSize(&catalog, false);