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

Side by Side Diff: tests/PDFJpegEmbedTest.cpp

Issue 782023002: Remove PDF JPEG shortcut, since it fails on grayscale JPEGs. (Closed) Base URL: https://skia.googlesource.com/skia.git@m40
Patch Set: Created 6 years 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 | « src/pdf/SkPDFImage.cpp ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "SkDocument.h" 8 #include "SkDocument.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkImageGenerator.h" 10 #include "SkImageGenerator.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 SkBitmap bm2(bitmap_from_data(cmykData)); 77 SkBitmap bm2(bitmap_from_data(cmykData));
78 canvas->drawBitmap(bm2, 0.0, 512.0, NULL); 78 canvas->drawBitmap(bm2, 0.0, 512.0, NULL);
79 79
80 canvas->flush(); 80 canvas->flush();
81 document->endPage(); 81 document->endPage();
82 document->close(); 82 document->close();
83 SkAutoTUnref<SkData> pdfData(pdf.copyToData()); 83 SkAutoTUnref<SkData> pdfData(pdf.copyToData());
84 SkASSERT(pdfData); 84 SkASSERT(pdfData);
85 pdf.reset(); 85 pdf.reset();
86 86
87 REPORTER_ASSERT(r, is_subset_of(mandrillData, pdfData)); 87 // Test disabled, waiting on resolution to http://skbug.com/3180
88 // REPORTER_ASSERT(r, is_subset_of(mandrillData, pdfData));
88 89
89 // This JPEG uses a nonstandard colorspace - it can not be 90 // This JPEG uses a nonstandard colorspace - it can not be
90 // embedded into the PDF directly. 91 // embedded into the PDF directly.
91 REPORTER_ASSERT(r, !is_subset_of(cmykData, pdfData)); 92 REPORTER_ASSERT(r, !is_subset_of(cmykData, pdfData));
92 93
93 // The following is for debugging purposes only. 94 // The following is for debugging purposes only.
94 const char* outputPath = getenv("SKIA_TESTS_PDF_JPEG_EMBED_OUTPUT_PATH"); 95 const char* outputPath = getenv("SKIA_TESTS_PDF_JPEG_EMBED_OUTPUT_PATH");
95 if (outputPath) { 96 if (outputPath) {
96 SkFILEWStream output(outputPath); 97 SkFILEWStream output(outputPath);
97 if (output.isValid()) { 98 if (output.isValid()) {
98 output.write(pdfData->data(), pdfData->size()); 99 output.write(pdfData->data(), pdfData->size());
99 } 100 }
100 } 101 }
101 } 102 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698