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

Side by Side Diff: experimental/PdfViewer/src/SkPdfDiffEncoder.cpp

Issue 1018953003: Add SkEncodedFormat, used by SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use a common enum for SkImageEncoder and SkImageDecoder and SkCodec Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPdfDiffEncoder.h" 8 #include "SkPdfDiffEncoder.h"
9 #include "SkPdfNativeTokenizer.h" 9 #include "SkPdfNativeTokenizer.h"
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 canvas.flush(); 112 canvas.flush();
113 113
114 SkString out; 114 SkString out;
115 115
116 // TODO(edisonn): overlay on top of image inf about the clip , grafi c state, the stack 116 // TODO(edisonn): overlay on top of image inf about the clip , grafi c state, the stack
117 117
118 out.appendf("/tmp/log_step_by_step/step-%i-%s.png", gOpCounter, gLas tKeyword.c_str()); 118 out.appendf("/tmp/log_step_by_step/step-%i-%s.png", gOpCounter, gLas tKeyword.c_str());
119 119
120 SkImageEncoder::EncodeFile(out.c_str(), bitmap, SkImageEncoder::kPNG _Type, 100); 120 SkImageEncoder::EncodeFile(out.c_str(), bitmap, kPNG_SkEncodedFormat , 100);
121 } 121 }
122 } 122 }
123 123
124 if (token->fType == kKeyword_TokenType && token->fKeyword && token->fKeyword Length > 0) { 124 if (token->fType == kKeyword_TokenType && token->fKeyword && token->fKeyword Length > 0) {
125 gLastKeyword.set(token->fKeyword, token->fKeywordLength); 125 gLastKeyword.set(token->fKeyword, token->fKeywordLength);
126 } else { 126 } else {
127 gLastKeyword.reset(); 127 gLastKeyword.reset();
128 } 128 }
129 #endif 129 #endif
130 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698