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

Side by Side Diff: ui/gfx/codec/png_codec.cc

Issue 11632002: Use generated shim headers for zlib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-upload 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 "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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
11 #include "ui/gfx/skia_util.h" 11 #include "ui/gfx/skia_util.h"
12 #include "third_party/skia/include/core/SkBitmap.h" 12 #include "third_party/skia/include/core/SkBitmap.h"
13 #include "third_party/skia/include/core/SkUnPreMultiply.h" 13 #include "third_party/skia/include/core/SkUnPreMultiply.h"
14 #include "third_party/skia/include/core/SkColorPriv.h" 14 #include "third_party/skia/include/core/SkColorPriv.h"
15 15
16 extern "C" { 16 extern "C" {
17 #include "third_party/libpng/png.h" 17 #include "third_party/libpng/png.h"
18
19 #if defined(USE_SYSTEM_ZLIB)
20 #include <zlib.h>
21 #else
22 #include "third_party/zlib/zlib.h" 18 #include "third_party/zlib/zlib.h"
Mark Mentovai 2012/12/18 19:48:17 Same question here.
Paweł Hajdan Jr. 2012/12/18 20:57:41 Done.
23 #endif
24 } 19 }
25 20
26 namespace gfx { 21 namespace gfx {
27 22
28 namespace { 23 namespace {
29 24
30 // Converts BGRA->RGBA and RGBA->BGRA. 25 // Converts BGRA->RGBA and RGBA->BGRA.
31 void ConvertBetweenBGRAandRGBA(const unsigned char* input, int pixel_width, 26 void ConvertBetweenBGRAandRGBA(const unsigned char* input, int pixel_width,
32 unsigned char* output, bool* is_opaque) { 27 unsigned char* output, bool* is_opaque) {
33 for (int x = 0; x < pixel_width; x++) { 28 for (int x = 0; x < pixel_width; x++) {
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 } 774 }
780 775
781 PNGCodec::Comment::Comment(const std::string& k, const std::string& t) 776 PNGCodec::Comment::Comment(const std::string& k, const std::string& t)
782 : key(k), text(t) { 777 : key(k), text(t) {
783 } 778 }
784 779
785 PNGCodec::Comment::~Comment() { 780 PNGCodec::Comment::~Comment() {
786 } 781 }
787 782
788 } // namespace gfx 783 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698