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

Side by Side Diff: webkit/support/webkit_support_gfx.cc

Issue 11632002: Use generated shim headers for zlib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 #include "webkit/support/webkit_support_gfx.h" 6 #include "webkit/support/webkit_support_gfx.h"
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
11 extern "C" {
12 #include "third_party/libpng/png.h" 11 #include "third_party/libpng/png.h"
13
14 #if defined(USE_SYSTEM_ZLIB)
15 #include <zlib.h>
16 #else
17 #include "third_party/zlib/zlib.h" 12 #include "third_party/zlib/zlib.h"
18 #endif
19 }
20 13
21 namespace webkit_support { 14 namespace webkit_support {
22 15
23 // Define macro here to make webkit_support_gfx independent of target base. 16 // Define macro here to make webkit_support_gfx independent of target base.
24 // Note that the NOTREACHED() macro will result in a crash. This is preferable 17 // Note that the NOTREACHED() macro will result in a crash. This is preferable
25 // to calling exit() / abort(), since the latter may not surfce the problem as 18 // to calling exit() / abort(), since the latter may not surfce the problem as
26 // crash reports, making it hard to tell where the problem is. 19 // crash reports, making it hard to tell where the problem is.
27 #define NOTREACHED(msg) *((volatile int*)0) = 3 20 #define NOTREACHED(msg) *((volatile int*)0) = 3
28 #define DCHECK(condition) \ 21 #define DCHECK(condition) \
29 if (!(condition)) fprintf(stderr, "DCHECK failed: " #condition ".") 22 if (!(condition)) fprintf(stderr, "DCHECK failed: " #condition ".")
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 const std::string& checksum, 673 const std::string& checksum,
681 std::vector<unsigned char>* output) { 674 std::vector<unsigned char>* output) {
682 std::vector<Comment> comments; 675 std::vector<Comment> comments;
683 comments.push_back(Comment("checksum", checksum)); 676 comments.push_back(Comment("checksum", checksum));
684 return Encode(input, FORMAT_RGBA, 677 return Encode(input, FORMAT_RGBA,
685 width, height, row_byte_width, discard_transparency, 678 width, height, row_byte_width, discard_transparency,
686 comments, output); 679 comments, output);
687 } 680 }
688 681
689 } // namespace webkit_support 682 } // namespace webkit_support
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698