OLD | NEW |
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 |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 bool discard_transparency, | 669 bool discard_transparency, |
670 const std::string& checksum, | 670 const std::string& checksum, |
671 std::vector<unsigned char>* output) { | 671 std::vector<unsigned char>* output) { |
672 std::vector<Comment> comments; | 672 std::vector<Comment> comments; |
673 comments.push_back(Comment("checksum", checksum)); | 673 comments.push_back(Comment("checksum", checksum)); |
674 return Encode(input, FORMAT_BGRA, | 674 return Encode(input, FORMAT_BGRA, |
675 width, height, row_byte_width, discard_transparency, | 675 width, height, row_byte_width, discard_transparency, |
676 comments, output); | 676 comments, output); |
677 } | 677 } |
678 | 678 |
| 679 bool EncodeRGBAPNGWithChecksum(const unsigned char* input, |
| 680 int width, |
| 681 int height, |
| 682 int row_byte_width, |
| 683 bool discard_transparency, |
| 684 const std::string& checksum, |
| 685 std::vector<unsigned char>* output) { |
| 686 std::vector<Comment> comments; |
| 687 comments.push_back(Comment("checksum", checksum)); |
| 688 return Encode(input, FORMAT_RGBA, |
| 689 width, height, row_byte_width, discard_transparency, |
| 690 comments, output); |
| 691 } |
| 692 |
679 } // namespace webkit_support | 693 } // namespace webkit_support |
OLD | NEW |