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

Side by Side Diff: tests/PDFJpegEmbedTest.cpp

Issue 1278403006: SkPDF: clean up overuse of SK_SUPPORT_PDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-11 (Tuesday) 16:25:36 EDT Created 5 years, 4 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 | « tests/PDFInvalidBitmapTest.cpp ('k') | tests/PDFOpaqueSrcModeToSrcOverTest.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 * 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"
11 #include "SkData.h" 11 #include "SkData.h"
12 #include "SkStream.h" 12 #include "SkStream.h"
13 13
14 #include "Resources.h" 14 #include "Resources.h"
15 #include "Test.h" 15 #include "Test.h"
16 16
17 #if SK_SUPPORT_PDF
18
19 // Returned bitmap is lazy. Only lazy bitmaps hold onto the original data. 17 // Returned bitmap is lazy. Only lazy bitmaps hold onto the original data.
20 static SkBitmap bitmap_from_data(SkData* data) { 18 static SkBitmap bitmap_from_data(SkData* data) {
21 SkASSERT(data); 19 SkASSERT(data);
22 SkBitmap bm; 20 SkBitmap bm;
23 SkInstallDiscardablePixelRef(data, &bm); 21 SkInstallDiscardablePixelRef(data, &bm);
24 return bm; 22 return bm;
25 } 23 }
26 24
27 static bool is_subset_of(SkData* smaller, SkData* larger) { 25 static bool is_subset_of(SkData* smaller, SkData* larger) {
28 SkASSERT(smaller && larger); 26 SkASSERT(smaller && larger);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (kTests[i].type != info.fType) { 118 if (kTests[i].type != info.fType) {
121 ERRORF(r, "%s failed jfif type test", kTests[i].path); 119 ERRORF(r, "%s failed jfif type test", kTests[i].path);
122 continue; 120 continue;
123 } 121 }
124 if (r->verbose()) { 122 if (r->verbose()) {
125 SkDebugf("\nJpegIdentification: %s [%d x %d]\n", kTests[i].path, 123 SkDebugf("\nJpegIdentification: %s [%d x %d]\n", kTests[i].path,
126 info.fWidth, info.fHeight); 124 info.fWidth, info.fHeight);
127 } 125 }
128 } 126 }
129 } 127 }
130 #endif // SK_SUPPORT_PDF
OLDNEW
« no previous file with comments | « tests/PDFInvalidBitmapTest.cpp ('k') | tests/PDFOpaqueSrcModeToSrcOverTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698