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

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

Issue 10886050: Add code to insure we are using the correct library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed DEPS Created 8 years, 3 months 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
« no previous file with comments | « ui/gfx/codec/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/jpeg_codec.h" 5 #include "ui/gfx/codec/jpeg_codec.h"
6 6
7 #include <setjmp.h> 7 #include <setjmp.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 11 #include "third_party/skia/include/core/SkBitmap.h"
12 #include "third_party/skia/include/core/SkColorPriv.h" 12 #include "third_party/skia/include/core/SkColorPriv.h"
13 13
14 extern "C" { 14 extern "C" {
15 #if defined(USE_SYSTEM_LIBJPEG) 15 #if defined(USE_SYSTEM_LIBJPEG)
16 #include <jpeglib.h> 16 #include <jpeglib.h>
17 #elif defined(USE_LIBJPEG_TURBO)
18 #include "third_party/libjpeg_turbo/jpeglib.h"
17 #else 19 #else
18 #include "jpeglib.h" 20 #include "third_party/libjpeg/jpeglib.h"
19 #endif 21 #endif
20 } 22 }
21 23
22 namespace gfx { 24 namespace gfx {
23 25
24 // Encoder/decoder shared stuff ------------------------------------------------ 26 // Encoder/decoder shared stuff ------------------------------------------------
25 27
26 namespace { 28 namespace {
27 29
28 // used to pass error info through the JPEG library 30 // used to pass error info through the JPEG library
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 601
600 SkBitmap* bitmap = new SkBitmap(); 602 SkBitmap* bitmap = new SkBitmap();
601 bitmap->setConfig(SkBitmap::kARGB_8888_Config, w, h); 603 bitmap->setConfig(SkBitmap::kARGB_8888_Config, w, h);
602 bitmap->allocPixels(); 604 bitmap->allocPixels();
603 memcpy(bitmap->getAddr32(0, 0), &data_vector[0], data_length); 605 memcpy(bitmap->getAddr32(0, 0), &data_vector[0], data_length);
604 606
605 return bitmap; 607 return bitmap;
606 } 608 }
607 609
608 } // namespace gfx 610 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/codec/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698