Skip to content

Commit

Permalink
Integrates libjpeg-turbo into Chromium (Chromium side)
Browse files Browse the repository at this point in the history
This change is the Chromium-side change that integrates libjpeg-turbo into Chromium. (We need another change for WebKit.) It adds a GYP option 'libjpeg_turbo' so we can switch from libjpeg to libjpeg-turbo and use libjpeg-turbo when its value is 1. (Unfortunately, its value must be 0 for now to avoid build breaks until we land all changes required for libjpeg-turbo.)

BUG=48789
TEST=build Chromium.
Review URL: http://codereview.chromium.org/5292007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68453 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
hbono@chromium.org committed Dec 7, 2010
1 parent 740bbbe commit 19fe8f0
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/app.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
'../testing/gtest.gyp:gtest',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../third_party/libjpeg/libjpeg.gyp:libjpeg',
'../third_party/libpng/libpng.gyp:libpng',
'../third_party/zlib/zlib.gyp:zlib',
'<(libjpeg_gyp_path):libjpeg',
],
'sources': [
'animation_container_unittest.cc',
Expand Down
2 changes: 1 addition & 1 deletion app/app_base.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
'../skia/skia.gyp:skia',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../third_party/libjpeg/libjpeg.gyp:libjpeg',
'../third_party/libpng/libpng.gyp:libpng',
'../third_party/sqlite/sqlite.gyp:sqlite',
'../third_party/zlib/zlib.gyp:zlib',
'<(libjpeg_gyp_path):libjpeg',
],
'include_dirs': [
'../third_party/mesa/MesaLib/include',
Expand Down
2 changes: 1 addition & 1 deletion build/all.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
'../third_party/ffmpeg/ffmpeg.gyp:*',
'../third_party/iccjpeg/iccjpeg.gyp:*',
'../third_party/icu/icu.gyp:*',
'../third_party/libjpeg/libjpeg.gyp:*',
'../third_party/libpng/libpng.gyp:*',
'../third_party/libwebp/libwebp.gyp:*',
'../third_party/libxml/libxml.gyp:*',
Expand All @@ -51,6 +50,7 @@
'../webkit/webkit.gyp:*',
'util/build_util.gyp:*',
'temp_gyp/googleurl.gyp:*',
'<(libjpeg_gyp_path):*',
],
'conditions': [
['javascript_engine=="v8"', {
Expand Down
10 changes: 10 additions & 0 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@
# Remoting compilation is enabled by default. Set to 0 to disable.
'remoting%': 1,

# Use libjpeg-turbo as the JPEG codec used by Chromium.
'use_libjpeg_turbo%': 0,

'library%': '<(library)',

# Variable 'component' is for cases where we would like to build some
Expand Down Expand Up @@ -400,6 +403,13 @@
}, {
'use_cups%': 0,
}],
# Set the relative path from this file to the GYP file of the JPEG
# library used by Chromium.
['use_libjpeg_turbo==1', {
'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
}, {
'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
}], # use_libjpeg_turbo==1
],

# NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
Expand Down
2 changes: 1 addition & 1 deletion chrome/chrome.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,6 @@
'../third_party/codesighs/codesighs.gyp:*',
'../third_party/iccjpeg/iccjpeg.gyp:*',
'../third_party/icu/icu.gyp:*',
'../third_party/libjpeg/libjpeg.gyp:*',
'../third_party/libpng/libpng.gyp:*',
'../third_party/libwebp/libwebp.gyp:*',
'../third_party/libxslt/libxslt.gyp:*',
Expand All @@ -1668,6 +1667,7 @@
'../sandbox/sandbox.gyp:*',
'../tools/memory_watcher/memory_watcher.gyp:*',
'../v8/tools/gyp/v8.gyp:v8_shell',
'<(libjpeg_gyp_path):*',
],
'conditions': [
['win_use_allocator_shim==1', {
Expand Down
2 changes: 1 addition & 1 deletion gfx/codec/jpeg_codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern "C" {
#if defined(USE_SYSTEM_LIBJPEG)
#include <jpeglib.h>
#else
#include "third_party/libjpeg/jpeglib.h"
#include "jpeglib.h"
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion gfx/gfx.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
'../skia/skia.gyp:skia',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../third_party/libjpeg/libjpeg.gyp:libjpeg',
'../third_party/libpng/libpng.gyp:libpng',
'../third_party/zlib/zlib.gyp:zlib',
'gfx_resources',
'<(libjpeg_gyp_path):libjpeg',
],
'sources': [
'blit.cc',
Expand Down
2 changes: 1 addition & 1 deletion third_party/iccjpeg/iccjpeg.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'product_name': 'iccjpeg',
'type': '<(library)',
'dependencies': [
'../libjpeg/libjpeg.gyp:libjpeg',
'<(libjpeg_gyp_path):libjpeg',
],
'sources': [
'iccjpeg.c',
Expand Down

0 comments on commit 19fe8f0

Please sign in to comment.