| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/15647010
git-svn-id: http://skia.googlecode.com/svn/trunk@9367 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
| |
Remove CreateDefaultDecoder call, since the function was removed.
Review URL: https://codereview.chromium.org/16256003
git-svn-id: http://skia.googlecode.com/svn/trunk@9365 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SkImage calls functions on SkImageDecoder and SkImageEncoder. This
is desired behavior, and it is also desired to include SkImage as
a part of core. In order to keep core from depending on images,
update SkImageDecoder_empty.cpp to implement all of SkImageDecoder
and SkImageEncoder. This file will be built by chrome (in
https://codereview.chromium.org/15960015).
Move force_linking from SkImageDecoder.cpp to its own file. It must
be called to force linking with the image decoders if desired. Call
the function in tools that need it:
sk_image
render_pictures
render_pdfs
sk_hello
filter
bench_pictures
debugger
SkImageDecoder:
Derive from SkNoncopyable, instead of duplicating its
hiding of constructors.
skhello:
Return rather than trying to write a null SkData to the stream.
Revert "Hamfistedly removed core dependence on images"
(commit 0f05f682a90bc125323677abf3476e1027d174f5) and
"Move SkImage::encode to SkImage_Codec.cpp."
(commit 83e47a954d0bf65439f3d9c0c93213063dd70da3.)
These two commits were temporary fixes that this change
cleans up.
SkSnapshot.cpp:
Check for a NULL encoder returned by SkImageEncoder::Create.
BUG=https://code.google.com/p/skia/issues/detail?id=1275
R=djsollen@google.com, robertphillips@google.com
Review URL: https://codereview.chromium.org/15806010
git-svn-id: http://skia.googlecode.com/svn/trunk@9364 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
| |
R=reed@google.com
Review URL: https://codereview.chromium.org/15179008
git-svn-id: http://skia.googlecode.com/svn/trunk@9218 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@9207 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In SkImageDecoder::DecodeMemoryToTarget, if SkBitmapToImageInfo fails due to an unsupported config, copy to 8888.
Needed for https://codereview.chromium.org/15145004/ and
https://codereview.chromium.org/12851012/ for all bitmaps to be
decoded properly in render_pictures and bench_pictures.
R=reed@google.com
Review URL: https://codereview.chromium.org/14772035
git-svn-id: http://skia.googlecode.com/svn/trunk@9196 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
| |
BUG=
R=scroggo@google.com
Review URL: https://codereview.chromium.org/15002004
git-svn-id: http://skia.googlecode.com/svn/trunk@9193 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
| |
Also use SkToU32 instead of a flat cast.
R=djsollen@google.com
Review URL: https://codereview.chromium.org/14565005
git-svn-id: http://skia.googlecode.com/svn/trunk@9139 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
| |
R=djsollen@google.com, scroggo@google.com
Author: reed@google.com
Review URL: https://chromiumcodereview.appspot.com/14057013
git-svn-id: http://skia.googlecode.com/svn/trunk@9075 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add tests in skimage to perform region decoding. Write out a
PNG of the region as well as a bitmap obtained with extractSubset
for comparison.
Rename decodeRegion to decodeSubset, so it will not be confused
with SkRegion. (Leave a function called decodeRegion which calls
decodeSubset.)
Clean up some comments.
Use png_set_interlaced_pass instead of modifying pass directly.
Make some changes to region decoding to fix problems I discovered
during testing:
Only call getAddr within a valid range.
Check for a NULL fInputStream.
Return a boolean for whether cropBitmap succeeded.
In cropBitmap, do not attempt to draw to a bitmap to an Index8
bitmap, which crashes. Use extractSubset instead.
Remove an assert.
R=djsollen@google.com
Review URL: https://codereview.chromium.org/14567011
git-svn-id: http://skia.googlecode.com/svn/trunk@8996 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add conditional defines for deprecated NULL type casts.
* Use wrapper functions for accessing png_structp & png_infop fields
(direct access is deprecated).
Tested on Fedora 17 (libpng 1.5) and Ubuntu 12.04 (libpng 1.2).
Note: there is one png_structp direct field acces left in
SkPNGImageDecoder::onDecodeRegion() for which libpng does not provide a
wrapper method (png_ptr->pass = 0). That should be OK for now as the code
is only enabled when SK_BUILD_FOR_ANDROID is set, and the Android libpng
version is striclty controlled. But it may become an issue in the future
when/if Android decides to update libpng, so we should investigate a
solution.
R=scroggo@google.com, reed@google.com, djsollen@google.com
Author: fmalita@google.com
Review URL: https://chromiumcodereview.appspot.com/14645018
git-svn-id: http://skia.googlecode.com/svn/trunk@8956 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/14646025
git-svn-id: http://skia.googlecode.com/svn/trunk@8943 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
| |
Remove an unused function warning.
Review URL: https://codereview.chromium.org/14785008
git-svn-id: http://skia.googlecode.com/svn/trunk@8942 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, each tool that wanted to use image decoders
but did not specifically reference them had to create a
dummy function that references them in order to ensure
they are not stripped by the linker.
Instead of making each tool reference each image decoder,
do it once in SkImageDecoder.cpp. Now each tool will have
image decoders linked in, assuming it includes the images
project.
This fixes a bug where SKPs with encoded data could not
be read by bench_ or render_pictures.
R=djsollen@google.com, robertphillips@google.com
Review URL: https://codereview.chromium.org/14678003
git-svn-id: http://skia.googlecode.com/svn/trunk@8941 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
skimage_main.cpp:
More changes in the interest of testing our decoders.
force_all_opaque before writing PNG files.
Test reencoding the image to its original type (if possible), and
then test redecoding it (to make sure the encoding was successful).
Add an option to turn off this behavior.
Merge decodeFileAndWrite with decodeFile.
SkImageDecoder:
Add kUnknown_Type to SkImageEncoder::Types.
Add a static function to get the Format of an SkStream.
In getFormatName(), remove an incorrect assert.
When calling the flavor of DecodeStream that returns the Format,
check the stream if the decoder returns kUnknown_Format.
BUG=https://code.google.com/p/skia/issues/detail?id=1241
Review URL: https://codereview.chromium.org/14363003
git-svn-id: http://skia.googlecode.com/svn/trunk@8862 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
| |
https://codereview.chromium.org/14267031/
git-svn-id: http://skia.googlecode.com/svn/trunk@8831 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the SkImageEncoder_Factory on all platforms. On Windows and Mac,
register the platform's image encoder as an option for
SkImageEncoder::Create. Also add more types that can be decoded.
Update comments for SkImageDecoder to be more accurate.
Add more types to SkImageEncoder::Type, and return the correct type of
encoder, if it exists.
Use a custom version of SkImageDecoder::Factory on Windows and Mac to
check the stream for registered decoders before defaulting to the platform's
version. Share code with the existing SkImageDecoder::Factory method.
Preparation for testing decoders and encoders:
BUG=https://code.google.com/p/skia/issues/detail?id=1241
Review URL: https://codereview.chromium.org/14298010
git-svn-id: http://skia.googlecode.com/svn/trunk@8730 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
| |
When encoding to JPEG, do not switch to JDCT_IFAST unless
DCT_IFAST_SUPPORTED is defined.
Review URL: https://codereview.chromium.org/14031013
git-svn-id: http://skia.googlecode.com/svn/trunk@8728 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
| |
Fixes a bug where jpeg decoder did not work on linux.
Review URL: https://codereview.chromium.org/14188002
git-svn-id: http://skia.googlecode.com/svn/trunk@8661 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@8336 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@8332 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/12834012
git-svn-id: http://skia.googlecode.com/svn/trunk@8287 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/12545052
git-svn-id: http://skia.googlecode.com/svn/trunk@8277 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/12438025
git-svn-id: http://skia.googlecode.com/svn/trunk@8267 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/12958002
git-svn-id: http://skia.googlecode.com/svn/trunk@8262 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@8210 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@8168 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@8160 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
| |
Author: djsollen@google.com
Reviewed By: bsalomon@google.com,borenet@google.com,reed@google.com
Review URL: https://chromiumcodereview.appspot.com/12668007
git-svn-id: http://skia.googlecode.com/svn/trunk@8158 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This change creates const and non-const versions of SkTDArray::begin(), end(), operator[]() and getAt(). This will keep us from inadvertently changing a const SkTDArray, which the previous signatures allowed.
Review URL: https://chromiumcodereview.appspot.com/12315131
git-svn-id: http://skia.googlecode.com/svn/trunk@7902 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
| |
My recent change changed the way SkBitmap::fRowBytes is stored,
and parameter/return values referring to rowBytes were changed
to type size_t. Change the storage back, and eliminate warnings
resulting from returning a size_t.
Review URL: https://codereview.appspot.com/7396059
git-svn-id: http://skia.googlecode.com/svn/trunk@7855 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@7846 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This CL also turns those features on by default on Android
Review URL: https://codereview.appspot.com/7313049
git-svn-id: http://skia.googlecode.com/svn/trunk@7645 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@7523 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
| |
Review URL: https://codereview.appspot.com/7228071
git-svn-id: http://skia.googlecode.com/svn/trunk@7514 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
| |
Review URL: https://codereview.appspot.com/6949043
git-svn-id: http://skia.googlecode.com/svn/trunk@6781 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
code-sharing
Review URL: https://codereview.appspot.com/6849065
git-svn-id: http://skia.googlecode.com/svn/trunk@6468 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead, force all builds to call InitializeFlattenables.
Remove the make_debugger script, which was created to force
rebuilding without global static initializers so that all flattenables
would be linked. It is no longer necessary since all flattenables
will be linked thanks to InitializeFlattenables, which now can (and
must) be called when global static initializers are turned on.
BUG=https://code.google.com/p/skia/issues/detail?id=903
BUG=https://code.google.com/p/skia/issues/detail?id=902
Review URL: https://codereview.appspot.com/6548044
git-svn-id: http://skia.googlecode.com/svn/trunk@5642 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
| |
https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054
git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is an effort to stage the conversion to named
parameters for all SkFlattenable commands. This particular
stage only does the following two things...
1. Move flattenable buffers from SkFlattenable.h into
their own header.
2. Update and Add new read write methods for better clarity
and convenience.
BUG=
Review URL: https://codereview.appspot.com/6448095
git-svn-id: http://skia.googlecode.com/svn/trunk@4980 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@4363 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
| |
http://codereview.appspot.com/6300114/
git-svn-id: http://skia.googlecode.com/svn/trunk@4291 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix these class of warnings:
- unused functions
- unused locals
- sign mismatch
- missing function prototypes
- missing newline at end of file
- 64 to 32 bit truncation
The changes prefer to link in dead code in the debug build
with 'if (false)' than to comment it out, but trivial cases
are commented out or sometimes deleted if it appears to be
a copy/paste error.
Review URL: https://codereview.appspot.com/6299048
git-svn-id: http://skia.googlecode.com/svn/trunk@4179 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pixelref subclasses want a mutex to guard their lock/unlock virtuals, and (b)
most subclasses use the same mutex for *all* of their instances, even when there
is no explicit need to guard modifying one instances with another.
When we try drawing bitmaps from multiple threads, we are seeing a lot of slow-
down from these mutexes. This CL has two changes to try to speed things up.
1. Add setPreLocked(), for pixelrefs who never need the onLockPixels
virtual to be called. This speeds up those subclasses in multithreaded environs
as it avoids the mutex lock all together (e.g. SkMallocPixelRef).
2. Add setMutex() to allow a subclass to change the mutex choice. ashmem wants
this, since its unflattening constructor cannot pass down the null, it needs
to cleanup afterwards.
Review URL: https://codereview.appspot.com/6199075
git-svn-id: http://skia.googlecode.com/svn/trunk@3985 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
| |
Review URL: https://codereview.appspot.com/5986047
git-svn-id: http://skia.googlecode.com/svn/trunk@3614 2bbb7eff-a529-9590-31e7-b0007b416f81
|