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

Side by Side Diff: gm/gmmain.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, 10 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 | « no previous file | include/core/SkBitmap.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 /* 8 /*
9 * Code for the "gm" (Golden Master) rendering comparison tool. 9 * Code for the "gm" (Golden Master) rendering comparison tool.
10 * 10 *
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 static SkData* encode_to_dct_data(size_t*, const SkBitmap& bitmap) { 1491 static SkData* encode_to_dct_data(size_t*, const SkBitmap& bitmap) {
1492 // Filter output of warnings that JPEG is not available for the image. 1492 // Filter output of warnings that JPEG is not available for the image.
1493 if (bitmap.width() >= 65500 || bitmap.height() >= 65500) return NULL; 1493 if (bitmap.width() >= 65500 || bitmap.height() >= 65500) return NULL;
1494 if (FLAGS_pdfJpegQuality == -1) return NULL; 1494 if (FLAGS_pdfJpegQuality == -1) return NULL;
1495 1495
1496 SkBitmap bm = bitmap; 1496 SkBitmap bm = bitmap;
1497 #if defined(SK_BUILD_FOR_MAC) 1497 #if defined(SK_BUILD_FOR_MAC)
1498 // Workaround bug #1043 where bitmaps with referenced pixels cause 1498 // Workaround bug #1043 where bitmaps with referenced pixels cause
1499 // CGImageDestinationFinalize to crash 1499 // CGImageDestinationFinalize to crash
1500 SkBitmap copy; 1500 SkBitmap copy;
1501 bitmap.deepCopyTo(&copy, bitmap.config()); 1501 bitmap.deepCopyTo(&copy);
1502 bm = copy; 1502 bm = copy;
1503 #endif 1503 #endif
1504 1504
1505 SkPixelRef* pr = bm.pixelRef(); 1505 SkPixelRef* pr = bm.pixelRef();
1506 if (pr != NULL) { 1506 if (pr != NULL) {
1507 SkData* data = pr->refEncodedData(); 1507 SkData* data = pr->refEncodedData();
1508 if (data != NULL) { 1508 if (data != NULL) {
1509 return data; 1509 return data;
1510 } 1510 }
1511 } 1511 }
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 if (FLAGS_forceBWtext) { 2420 if (FLAGS_forceBWtext) {
2421 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); 2421 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref();
2422 } 2422 }
2423 } 2423 }
2424 2424
2425 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 2425 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
2426 int main(int argc, char * const argv[]) { 2426 int main(int argc, char * const argv[]) {
2427 return tool_main(argc, (char**) argv); 2427 return tool_main(argc, (char**) argv);
2428 } 2428 }
2429 #endif 2429 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkBitmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698