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

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

Issue 515493003: JPEG(JFIF only) directly embedded into PDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits from reed@ Created 6 years, 3 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
« no previous file with comments | « gyp/tests.gypi ('k') | src/pdf/SkPDFImage.h » ('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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "SkPDFDevice.h" 8 #include "SkPDFDevice.h"
9 9
10 #include "SkAnnotation.h" 10 #include "SkAnnotation.h"
(...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2175 SkPath shape; 2175 SkPath shape;
2176 shape.addRect(SkRect::MakeWH(SkIntToScalar(subset.width()), 2176 shape.addRect(SkRect::MakeWH(SkIntToScalar(subset.width()),
2177 SkIntToScalar( subset.height()))); 2177 SkIntToScalar( subset.height())));
2178 shape.transform(matrix); 2178 shape.transform(matrix);
2179 content.setShape(shape); 2179 content.setShape(shape);
2180 } 2180 }
2181 if (!content.needSource()) { 2181 if (!content.needSource()) {
2182 return; 2182 return;
2183 } 2183 }
2184 2184
2185 SkAutoTUnref<SkPDFImage> image( 2185 SkAutoTUnref<SkPDFObject> image(
2186 SkPDFImage::CreateImage(*bitmap, subset, fEncoder)); 2186 SkPDFCreateImageObject(*bitmap, subset, fEncoder));
2187 if (!image) { 2187 if (!image) {
2188 return; 2188 return;
2189 } 2189 }
2190 2190
2191 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), 2191 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()),
2192 &content.entry()->fContent); 2192 &content.entry()->fContent);
2193 } 2193 }
2194 2194
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | src/pdf/SkPDFImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698