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

Side by Side Diff: src/pdf/SkPDFStream.cpp

Issue 12754004: Update flag to reflect actual meaning. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/pdf/SkPDFDocument.h ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkData.h" 10 #include "SkData.h"
11 #include "SkFlate.h" 11 #include "SkFlate.h"
12 #include "SkPDFCatalog.h" 12 #include "SkPDFCatalog.h"
13 #include "SkPDFStream.h" 13 #include "SkPDFStream.h"
14 #include "SkStream.h" 14 #include "SkStream.h"
15 15
16 static bool skip_compression(SkPDFCatalog* catalog) { 16 static bool skip_compression(SkPDFCatalog* catalog) {
17 return SkToBool(catalog->getDocumentFlags() & 17 return SkToBool(catalog->getDocumentFlags() &
18 SkPDFDocument::kNoCompression_Flags); 18 SkPDFDocument::kFavorSpeedOverSize_Flags);
19 } 19 }
20 20
21 SkPDFStream::SkPDFStream(SkStream* stream) 21 SkPDFStream::SkPDFStream(SkStream* stream)
22 : fState(kUnused_State), 22 : fState(kUnused_State),
23 fData(stream) { 23 fData(stream) {
24 SkSafeRef(stream); 24 SkSafeRef(stream);
25 } 25 }
26 26
27 SkPDFStream::SkPDFStream(SkData* data) : fState(kUnused_State) { 27 SkPDFStream::SkPDFStream(SkData* data) : fState(kUnused_State) {
28 SkMemoryStream* stream = new SkMemoryStream; 28 SkMemoryStream* stream = new SkMemoryStream;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } else if (fState == kNoCompression_State && !skip_compression(catalog) && 109 } else if (fState == kNoCompression_State && !skip_compression(catalog) &&
110 SkFlate::HaveFlate()) { 110 SkFlate::HaveFlate()) {
111 if (!fSubstitute.get()) { 111 if (!fSubstitute.get()) {
112 fSubstitute.reset(new SkPDFStream(*this)); 112 fSubstitute.reset(new SkPDFStream(*this));
113 catalog->setSubstitute(this, fSubstitute.get()); 113 catalog->setSubstitute(this, fSubstitute.get());
114 } 114 }
115 return false; 115 return false;
116 } 116 }
117 return true; 117 return true;
118 } 118 }
OLDNEW
« no previous file with comments | « include/pdf/SkPDFDocument.h ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698