Commit Graph

44 Commits

Author SHA1 Message Date
robertphillips@google.com
cb693198e7 Update gyp\images.gyp for move of SkJpegUtility.h from include\images to src\images (in r8267)
git-svn-id: http://skia.googlecode.com/svn/trunk@8341 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-22 16:44:14 +00:00
djsollen@google.com
6e32c4627b Remove SK_ENABLE_LIBPNG define as it is no longer needed by Android.
Review URL: https://codereview.chromium.org/12958002

git-svn-id: http://skia.googlecode.com/svn/trunk@8262 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 16:07:37 +00:00
commit-bot@chromium.org
a936e37cc7 Upstream Android modifications to the image encoders/decoders.
This CL does not update the libjpeg as that change is large enough
to warrant its own CL.


Author: djsollen@google.com

Reviewed By: reed@google.com,robertphillips@google.com,scroggo@google.com

Review URL: https://chromiumcodereview.appspot.com/12604006

git-svn-id: http://skia.googlecode.com/svn/trunk@8155 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-14 14:42:18 +00:00
borenet@google.com
327b9b205a Gyp changes for NaCl debugger
Review URL: https://codereview.chromium.org/12544011

git-svn-id: http://skia.googlecode.com/svn/trunk@8015 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-07 15:33:28 +00:00
reed@google.com
1a6880597e move SkFDStream out of images into core
git-svn-id: http://skia.googlecode.com/svn/trunk@7846 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-25 18:17:12 +00:00
scroggo@google.com
f8d7d27313 Create SkLazyPixelRef which performs lazy decoding.
The new pixel ref behaves similarly to SkImageRef, with some key differences:
It does not depend on the images project.
It requires an SkImageCache, which handles allocation and caching of the pixel
memory.
It takes a function signature for decoding which decodes into already allocated
pixel memory rather than into an SkBitmap.

Add two implementations of SkImageCache: SkLruImageCache and SkAshmemImageCache.

Replace SkSerializationHelpers::DecodeBitmap with SkPicture::InstallPixelRefProc,
and update sites that referenced it.

SkBitmapFactory now sets the pixel ref to a new object of the new
class SkLazyPixelRef, provided it has an SkImageCache for caching.

Provide an option to do lazy decodes in render_pictures and bench_pictures.

SkPicture:
Eliminate the default parameters in the constructor.
If a proc for decoding bitmaps is installed, use it to decode any encoded
data in subpictures.
When parsing deserializing subpictures, check for success.
When serializing subpictures, pass the picture's bitmap encoder to the
subpicture's call to serialize.

Update BitmapFactoryTest to test its new behavior.

BUG=https://code.google.com/p/skia/issues/detail?id=1008
BUG=https://code.google.com/p/skia/issues/detail?id=1009

Review URL: https://codereview.appspot.com/7060052

git-svn-id: http://skia.googlecode.com/svn/trunk@7835 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 21:38:35 +00:00
djsollen@google.com
528a556514 Fix android errors when unflattening an SkImageRef_ashmem object.
Review URL: https://codereview.appspot.com/7228071

git-svn-id: http://skia.googlecode.com/svn/trunk@7514 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-01 15:57:13 +00:00
reed@google.com
4c1f091b68 kill unused SkFlipPixelRef
Review URL: https://codereview.appspot.com/6949043

git-svn-id: http://skia.googlecode.com/svn/trunk@6781 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-13 16:35:37 +00:00
scroggo@google.com
9f686f3639 Create a factory to decode an SkBitmap from an SkData.
Add a test and a GM for the factory, and a PNG file for it to decode.
The PNG file is copyright-free, obtained from
http://openclipart.org/detail/29213/paper-plane-by-ddoo

In cmykjpeg, do not attempt to decode in the constructor, since it
currently crashes on Mac (if you provide the correct resource path).
Even when we fix this crash there is no need to do it in the
constructor, since we create all of the gms in order to
get their names (to determine whether to run them).

Review URL: https://codereview.appspot.com/6847122

git-svn-id: http://skia.googlecode.com/svn/trunk@6618 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:05:37 +00:00
borenet@google.com
7158e6acca Improve NaCl support
- Add nacl_make script to build Skia targets for NaCl using gyp
- Add nacl_interface for command-line apps
- Add nacl_sample as front-end for SampleApp
- Add freetype to DEPS
- Various gyp tweaks for NaCl

TODO:
- Implement GL interface
- Implement font host
- Fix plumbing so that SampleApp works properly
Review URL: https://codereview.appspot.com/6671044

git-svn-id: http://skia.googlecode.com/svn/trunk@6245 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 17:43:44 +00:00
borenet@google.com
efb1d77ad2 Build Skia as a static library
- Roll GYP so that we get non-thin archives on Linux
- Add merge_static_libs.py
- Add skia_core_lib target which builds core, ports, opts*, and utils
- Replace dependencies on core/ports/opts/utils with skia_core_libs
- Rename exportable libraries with "skia_"
Review URL: https://codereview.appspot.com/6619049

git-svn-id: http://skia.googlecode.com/svn/trunk@5889 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-10 19:45:51 +00:00
scroggo@google.com
5a7c6be72b Add the ability to provide function pointers to SkPicture serialization
and deserialization for encoding and decoding bitmaps.

Remove kForceFlattenBitmapPixels_Flag, which is no longer used.

When an SkOrderedReadBuffer needs to read a bitmap, if it does not
have an image decoder, use a dummy bitmap.

In GM, add a tolerance option for color differences, used when
testing picture serialization, so it can assume two images are the
same even though PNG encoding/decoding may have resulted in small
differences.

Create dummy implementations for SkImageDecoder and SkImageEncoder
functions in SkImageDecoder_empty so that a project that does not
want to include the images project it can still build.

Allow ports to build without images project.

In Mac's image encoder, copy 4444 to 8888 before encoding.

Add SkWriter32::reservePad, to provide a pointer to write non 4 byte
aligned data, padded with zeroes.

In bench_ and render_ pictures, pass decode function to SkPicture
creation from a stream.

BUG=https://code.google.com/p/skia/issues/detail?id=842

Review URL: https://codereview.appspot.com/6551071

git-svn-id: http://skia.googlecode.com/svn/trunk@5818 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-04 21:46:08 +00:00
caryclark@google.com
35f5ac9738 update gyp files to build on iOS
Note that there's a hack in SkImageDecoder_CG.cpp --
the necessary defines are included directly. This
is temporary until I can figure out how to include
them properly.
Review URL: https://codereview.appspot.com/6523044

git-svn-id: http://skia.googlecode.com/svn/trunk@5586 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-18 15:41:18 +00:00
borenet@google.com
af73091b56 Set bench/gm/tests as explicit dependencies of SkiaAndroidApp (trunk)
Hopefully this fixes the flaky Android build.
Review URL: https://codereview.appspot.com/6461067

git-svn-id: http://skia.googlecode.com/svn/trunk@5032 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-09 15:54:28 +00:00
robertphillips@google.com
3a4553ea57 Redelivering r3611 changes (enabling cmyk jpeg changes in .gyps)
http://codereview.appspot.com/5967047/




git-svn-id: http://skia.googlecode.com/svn/trunk@3617 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-04-05 14:52:01 +00:00
robertphillips@google.com
7800e3008f Rolling back r3611 until the Android compilation issue is resolved
git-svn-id: http://skia.googlecode.com/svn/trunk@3613 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-04-05 13:38:27 +00:00
robertphillips@google.com
f919147559 Finally enabled libjpeg functionality in .gyps
http://codereview.appspot.com/5967047/



git-svn-id: http://skia.googlecode.com/svn/trunk@3611 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-04-05 13:20:35 +00:00
bungeman@google.com
5a64e58ebb Revert 3538.
git-svn-id: http://skia.googlecode.com/svn/trunk@3539 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-29 14:51:56 +00:00
bungeman@google.com
29b63dc863 Correct dependencies in gyp files.
http://codereview.appspot.com/5934044/


git-svn-id: http://skia.googlecode.com/svn/trunk@3538 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-29 14:28:59 +00:00
djsollen@google.com
3d29b6330d Remove unused classes from the build.
Review URL: https://codereview.appspot.com/5938053

git-svn-id: http://skia.googlecode.com/svn/trunk@3529 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-28 19:36:39 +00:00
epoger@google.com
9fee7ad449 Copy libjpeg.gyp from third_party/externals/libjpeg/ to gyp/
This should get our use of libjpeg-from-source unblocked; see http://code.google.com/p/skia/issues/detail?id=543 ('wrap libjpeg.gyp from Chrome's libjpeg port, rather than making our own copy') for a better long-term solution.
Review URL: https://codereview.appspot.com/5908058

git-svn-id: http://skia.googlecode.com/svn/trunk@3496 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-26 18:29:26 +00:00
robertphillips@google.com
0a89c90d18 reverting to 3437
git-svn-id: http://skia.googlecode.com/svn/trunk@3439 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-20 15:13:04 +00:00
robertphillips@google.com
d5c9e996df Fix for CMYK jpeg decoding issue (69 - unable to read some jpeg files on android)
http://codereview.appspot.com/5785054/



git-svn-id: http://skia.googlecode.com/svn/trunk@3438 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-20 14:51:47 +00:00
epoger@google.com
aa3b6a965e Make all gyp targets automatically include common.gypi
Do this, rather than including common.gypi explicitly in all our gyp files, so that gyp files we use but do not maintain (e.g., third_party/externals/libjpeg/libjpeg.gyp) will include common.gypi too.
Review URL: https://codereview.appspot.com/5820068

git-svn-id: http://skia.googlecode.com/svn/trunk@3411 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-16 13:52:49 +00:00
tomhudson@google.com
3f5ebb431f Remove libjpeg image decoder, since we've never built it since we changed
to gyp.

http://codereview.appspot.com/5722046/



git-svn-id: http://skia.googlecode.com/svn/trunk@3302 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-02 15:38:23 +00:00
tomhudson@google.com
301968088a Remove referenecs to nonexistent file SkImageDecoder_libpvjpeg.c from gyp
http://codereview.appspot.com/5707046/



git-svn-id: http://skia.googlecode.com/svn/trunk@3275 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-28 16:46:01 +00:00
djsollen@google.com
85c1c6ed88 Enable Android GM to produce PNG images.
git-svn-id: http://skia.googlecode.com/svn/trunk@3253 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-02-24 19:45:16 +00:00
bsalomon@google.com
897e66cb0b Add windowscodecs.lib to images.gyp
Review URL: http://codereview.appspot.com/5422046/


git-svn-id: http://skia.googlecode.com/svn/trunk@2728 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-21 21:04:06 +00:00
djsollen@google.com
58629291bc Adding support to trunk for building Skia using the Android NDK.
This CL depends on a subsequent CL to add the appropriate NDK
toolchain and system sources to the skia repo.

Review URL: http://codereview.appspot.com/5306089/
Review URL: http://codereview.appspot.com/5306089

git-svn-id: http://skia.googlecode.com/svn/trunk@2592 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-11-03 13:08:29 +00:00
epoger@google.com
8846cb22ce Create new 'skia_os' variable to replace use of 'OS' in most places.
http://codereview.appspot.com/4627085



git-svn-id: http://skia.googlecode.com/svn/trunk@1782 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-01 20:20:07 +00:00
epoger@google.com
5351b373b3 combine target_defaults.gypi into common.gypi
http://codereview.appspot.com/4654080



git-svn-id: http://skia.googlecode.com/svn/trunk@1780 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-01 17:16:26 +00:00
bungeman@google.com
fe5afe5d27 Make images properly depend on utils.
http://codereview.appspot.com/4629068/


git-svn-id: http://skia.googlecode.com/svn/trunk@1699 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-24 13:58:17 +00:00
bungeman@google.com
9df621da50 Wrap SkStreams in IStreams instead of copying data around.
http://codereview.appspot.com/4630062/


git-svn-id: http://skia.googlecode.com/svn/trunk@1694 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-23 21:43:52 +00:00
bungeman@google.com
242bb89c0d Add image encoder/decoder for Windows.
http://codereview.appspot.com/4634078/


git-svn-id: http://skia.googlecode.com/svn/trunk@1676 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-22 20:42:34 +00:00
senorblanco@chromium.org
10a9465b4f Revert the changes to gyp/images.gyp in r1654, as apparently they're
necessary for gm to build correctly.



git-svn-id: http://skia.googlecode.com/svn/trunk@1655 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-20 19:56:53 +00:00
senorblanco@chromium.org
52bbe140a3 Remove some files from views.gyp that already being compiled into utils.gyp
(already done for Linux, this change does the same for Mac and Win).

Review URL:  http://codereview.appspot.com/4575044/



git-svn-id: http://skia.googlecode.com/svn/trunk@1654 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-20 19:46:42 +00:00
epoger@google.com
b1b721a7b6 remove libpng and zlib from third_party
http://codereview.appspot.com/4571077



git-svn-id: http://skia.googlecode.com/svn/trunk@1609 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-16 12:27:14 +00:00
reed@google.com
af9d9c2fc7 change GC imagedecoder to use the same colorspace between image and context,
so we get reproducible, unchanged, values.

use GC imagedecoder in gyp for mac



git-svn-id: http://skia.googlecode.com/svn/trunk@1599 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-15 17:33:29 +00:00
epoger@google.com
25e92838a9 fix gm on Mac, and Linux buildbot build, by adding zlib source to third_party
http://codereview.appspot.com/4620047/

I will try to find a better way to keep all this working (remove zlib and
libpng from third_party)



git-svn-id: http://skia.googlecode.com/svn/trunk@1595 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-15 16:05:37 +00:00
epoger@google.com
38a9134dbc add libpng source to repo and make Unix build use it
http://codereview.appspot.com/4572067



git-svn-id: http://skia.googlecode.com/svn/trunk@1591 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-15 13:45:10 +00:00
epoger@google.com
ccdbd2c522 create GYP files for these targets: tests, gm, skhello, skimage, skdiff
see http://codereview.appspot.com/4536096/



git-svn-id: http://skia.googlecode.com/svn/trunk@1479 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-02 14:38:23 +00:00
senorblanco@chromium.org
907afcadfa Add a missing include path for the linux build of utils.gyp. Remove the Linux
utils files from the build of views.a, since they're already being compiled into
utils.a, since it was causing unnecessary rebuilds (the same could probably be
done for linux and mac).  Remove the commented-out SkImageDecoder_libpvjpeg.cpp,
which has been removed from SVN.  

http://codereview.appspot.com/4532105/



git-svn-id: http://skia.googlecode.com/svn/trunk@1476 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-01 20:55:45 +00:00
senorblanco@chromium.org
aa73168094 Clean up the gyp files to reflect some files that were removed and/or renamed.
Review URL:  http://codereview.appspot.com/4536098/



git-svn-id: http://skia.googlecode.com/svn/trunk@1470 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-06-01 18:28:22 +00:00
epoger@google.com
ae85aea58e split skia.gyp into separate gypfile for each source dir
see http://codereview.appspot.com/4527084/

Now, to build out/Debug/SampleApp on Linux, do the following:

cd trunk/gyp
rm -rf Makefile *mk *.Makefile out
./gyp_skia -fmake --ignore-environment "--toplevel-dir=$PWD" \
  -Icommon.gypi "--depth=$PWD" SampleApp.gyp
make



git-svn-id: http://skia.googlecode.com/svn/trunk@1446 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-31 13:50:51 +00:00