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 "ui/gfx/codec/png_codec.h" | 5 #include "ui/gfx/codec/png_codec.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "third_party/libpng/png.h" |
| 10 #include "third_party/skia/include/core/SkBitmap.h" |
| 11 #include "third_party/skia/include/core/SkColorPriv.h" |
| 12 #include "third_party/skia/include/core/SkUnPreMultiply.h" |
| 13 #include "third_party/zlib/zlib.h" |
9 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
10 #include "ui/gfx/skia_util.h" | 15 #include "ui/gfx/skia_util.h" |
11 #include "third_party/libpng/png.h" | |
12 #include "third_party/skia/include/core/SkBitmap.h" | |
13 #include "third_party/skia/include/core/SkUnPreMultiply.h" | |
14 #include "third_party/skia/include/core/SkColorPriv.h" | |
15 #include "third_party/zlib/zlib.h" | |
16 | 16 |
17 namespace gfx { | 17 namespace gfx { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // Converts BGRA->RGBA and RGBA->BGRA. | 21 // Converts BGRA->RGBA and RGBA->BGRA. |
22 void ConvertBetweenBGRAandRGBA(const unsigned char* input, int pixel_width, | 22 void ConvertBetweenBGRAandRGBA(const unsigned char* input, int pixel_width, |
23 unsigned char* output, bool* is_opaque) { | 23 unsigned char* output, bool* is_opaque) { |
24 for (int x = 0; x < pixel_width; x++) { | 24 for (int x = 0; x < pixel_width; x++) { |
25 const unsigned char* pixel_in = &input[x * 4]; | 25 const unsigned char* pixel_in = &input[x * 4]; |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 } | 777 } |
778 | 778 |
779 PNGCodec::Comment::Comment(const std::string& k, const std::string& t) | 779 PNGCodec::Comment::Comment(const std::string& k, const std::string& t) |
780 : key(k), text(t) { | 780 : key(k), text(t) { |
781 } | 781 } |
782 | 782 |
783 PNGCodec::Comment::~Comment() { | 783 PNGCodec::Comment::~Comment() { |
784 } | 784 } |
785 | 785 |
786 } // namespace gfx | 786 } // namespace gfx |
OLD | NEW |