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

Side by Side Diff: tools/render_pdfs_main.cpp

Issue 178003003: Do not define SK_SUPPORT_DEEPCOPYTO_CONFIG in Skia. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix error of unused-function Created 6 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 | « tests/GpuBitmapCopyTest.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 2012 Google Inc. 2 * Copyright 2012 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkForceLinking.h" 10 #include "SkForceLinking.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 static SkData* encode_to_dct_data(size_t*, const SkBitmap& bitmap) { 86 static SkData* encode_to_dct_data(size_t*, const SkBitmap& bitmap) {
87 if (gJpegQuality == -1) { 87 if (gJpegQuality == -1) {
88 return NULL; 88 return NULL;
89 } 89 }
90 90
91 SkBitmap bm = bitmap; 91 SkBitmap bm = bitmap;
92 #if defined(SK_BUILD_FOR_MAC) 92 #if defined(SK_BUILD_FOR_MAC)
93 // Workaround bug #1043 where bitmaps with referenced pixels cause 93 // Workaround bug #1043 where bitmaps with referenced pixels cause
94 // CGImageDestinationFinalize to crash 94 // CGImageDestinationFinalize to crash
95 SkBitmap copy; 95 SkBitmap copy;
96 bitmap.deepCopyTo(&copy, bitmap.config()); 96 bitmap.deepCopyTo(&copy);
97 bm = copy; 97 bm = copy;
98 #endif 98 #endif
99 99
100 return SkImageEncoder::EncodeData(bm, 100 return SkImageEncoder::EncodeData(bm,
101 SkImageEncoder::kJPEG_Type, 101 SkImageEncoder::kJPEG_Type,
102 gJpegQuality); 102 gJpegQuality);
103 } 103 }
104 104
105 /** Builds the output filename. path = dir/name, and it replaces expected 105 /** Builds the output filename. path = dir/name, and it replaces expected
106 * .skp extension with .pdf extention. 106 * .skp extension with .pdf extention.
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 295 }
296 #endif 296 #endif
297 return 0; 297 return 0;
298 } 298 }
299 299
300 #if !defined SK_BUILD_FOR_IOS 300 #if !defined SK_BUILD_FOR_IOS
301 int main(int argc, char * const argv[]) { 301 int main(int argc, char * const argv[]) {
302 return tool_main(argc, (char**) argv); 302 return tool_main(argc, (char**) argv);
303 } 303 }
304 #endif 304 #endif
OLDNEW
« no previous file with comments | « tests/GpuBitmapCopyTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698