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

Unified Diff: src/pdf/SkPDFImage.cpp

Issue 936403002: PDF: why do we have flags no one uses (or can use)? (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFPage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFImage.cpp
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp
index dab74736847b9d6096d04567d85c1742c542a04d..6f743fd16216cf19a26fbc94feccdeb0b8b6813f 100644
--- a/src/pdf/SkPDFImage.cpp
+++ b/src/pdf/SkPDFImage.cpp
@@ -22,11 +22,6 @@
static const int kNoColorTransform = 0;
-static bool skip_compression(SkPDFCatalog* catalog) {
- return SkToBool(catalog->getDocumentFlags() &
- SkPDFDocument::kFavorSpeedOverSize_Flags);
-}
-
static size_t get_uncompressed_size(const SkBitmap& bitmap,
const SkIRect& srcRect) {
switch (bitmap.colorType()) {
@@ -603,8 +598,7 @@ SkPDFImage::SkPDFImage(SkPDFImage& pdfImage)
bool SkPDFImage::populate(SkPDFCatalog* catalog) {
if (getState() == kUnused_State) {
// Initializing image data for the first time.
- if (!skip_compression(catalog) && fEncoder &&
- get_uncompressed_size(fBitmap, fSrcRect) > 1) {
+ if (fEncoder && get_uncompressed_size(fBitmap, fSrcRect) > 1) {
SkBitmap subset;
// Extract subset
if (!fBitmap.extractSubset(&subset, fSrcRect)) {
@@ -633,11 +627,9 @@ bool SkPDFImage::populate(SkPDFCatalog* catalog) {
return INHERITED::populate(catalog);
}
#ifndef SK_NO_FLATE
- else if (getState() == kNoCompression_State && !skip_compression(catalog)) {
+ else if (getState() == kNoCompression_State) {
#else // SK_NO_FLATE
- else if (getState() == kNoCompression_State &&
- !skip_compression(catalog) &&
- fEncoder) {
+ else if (getState() == kNoCompression_State && fEncoder) {
#endif // SK_NO_FLATE
// Compression has not been requested when the stream was first created,
// but the new catalog wants it compressed.
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFPage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698