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/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "third_party/libpng/png.h" | 9 #include "third_party/libpng/png.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
11 #include "third_party/skia/include/core/SkColorPriv.h" | 11 #include "third_party/skia/include/core/SkColorPriv.h" |
12 #include "third_party/skia/include/core/SkUnPreMultiply.h" | 12 #include "third_party/skia/include/core/SkUnPreMultiply.h" |
13 #include "third_party/zlib/zlib.h" | 13 #include "third_party/zlib/zlib.h" |
14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/geometry/size.h" |
15 #include "ui/gfx/skia_util.h" | 15 #include "ui/gfx/skia_util.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++) { |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 } | 801 } |
802 | 802 |
803 PNGCodec::Comment::Comment(const std::string& k, const std::string& t) | 803 PNGCodec::Comment::Comment(const std::string& k, const std::string& t) |
804 : key(k), text(t) { | 804 : key(k), text(t) { |
805 } | 805 } |
806 | 806 |
807 PNGCodec::Comment::~Comment() { | 807 PNGCodec::Comment::~Comment() { |
808 } | 808 } |
809 | 809 |
810 } // namespace gfx | 810 } // namespace gfx |
OLD | NEW |