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

Side by Side Diff: tools/flatten.cpp

Issue 1313203003: Remove include of stdlib.h from SkTypes.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up qsort conversion. Created 5 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 | « tools/flags/SkCommandLineFlags.cpp ('k') | tools/lua/lua_app.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 2015 Google Inc. 2 * Copyright 2015 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 "SkData.h" 8 #include "SkData.h"
9 #include "SkForceLinking.h" 9 #include "SkForceLinking.h"
10 #include "SkImageGenerator.h" 10 #include "SkImageGenerator.h"
11 #include "SkPicture.h" 11 #include "SkPicture.h"
12 #include "SkPictureRecorder.h" 12 #include "SkPictureRecorder.h"
13 #include "SkStream.h" 13 #include "SkStream.h"
14
15 #include <stdlib.h>
14 #include <stdio.h> 16 #include <stdio.h>
15 17
16 __SK_FORCE_IMAGE_DECODER_LINKING; 18 __SK_FORCE_IMAGE_DECODER_LINKING;
17 19
18 #define ASSERTF(cond, fmt, ...) if (!(cond)) { fprintf(stderr, fmt"\n", __VA_ARG S__); exit(1); } 20 #define ASSERTF(cond, fmt, ...) if (!(cond)) { fprintf(stderr, fmt"\n", __VA_ARG S__); exit(1); }
19 21
20 static bool lazy_decode_bitmap(const void* src, size_t size, SkBitmap* dst) { 22 static bool lazy_decode_bitmap(const void* src, size_t size, SkBitmap* dst) {
21 SkAutoTUnref<SkData> encoded(SkData::NewWithCopy(src, size)); 23 SkAutoTUnref<SkData> encoded(SkData::NewWithCopy(src, size));
22 return encoded && SkInstallDiscardablePixelRef(encoded, dst); 24 return encoded && SkInstallDiscardablePixelRef(encoded, dst);
23 } 25 }
(...skipping 16 matching lines...) Expand all
40 SkAutoTUnref<const SkPicture> flat(recorder.endRecordingAsPicture()); 42 SkAutoTUnref<const SkPicture> flat(recorder.endRecordingAsPicture());
41 43
42 // Write out that flat.skp 44 // Write out that flat.skp
43 SkFILEWStream wstream(flatPath); 45 SkFILEWStream wstream(flatPath);
44 ASSERTF(wstream.isValid(), "Could not open %s.", flatPath); 46 ASSERTF(wstream.isValid(), "Could not open %s.", flatPath);
45 flat->serialize(&wstream); 47 flat->serialize(&wstream);
46 wstream.flush(); 48 wstream.flush();
47 49
48 return 0; 50 return 0;
49 } 51 }
OLDNEW
« no previous file with comments | « tools/flags/SkCommandLineFlags.cpp ('k') | tools/lua/lua_app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698