Commit Graph

23 Commits

Author SHA1 Message Date
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
epoger@google.com
4ce738b98e Extract transform_scanline_XXXX functions into transform_scanline.h for code-sharing
Review URL: https://codereview.appspot.com/6849065

git-svn-id: http://skia.googlecode.com/svn/trunk@6468 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-16 18:44:18 +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
rmistry@google.com
fbfcd56021 Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 18:09:54 +00:00
robertphillips@google.com
15e9d3e66e Expanded distribution of instance counting
http://codereview.appspot.com/6300114/



git-svn-id: http://skia.googlecode.com/svn/trunk@4291 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 20:25:03 +00:00
djsollen@google.com
54924243c1 Cleanup code related to SkFlattenable::flatten()
The following changes were made by this CL:

1. Make flatten() a protected method as callers should use
   SkFlattenableWriteBuffer to flatten an object
2. Make flatten a const method (including subclasses)
3. Mark subclass implementation of flatten with SK_OVERRIDE
4. Ensure overridden flatten impls call their parent
5. Remove no-op implementations of flatten from subclasses

Additionally, if necessary the unflattening constructor was
also moved to the protected section of the subclasses
header if it was not already there.

git-svn-id: http://skia.googlecode.com/svn/trunk@3540 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-29 15:18:04 +00:00
djsollen@google.com
5370cd969d Consolidate PixelRef flattables with the standard impl
The flatten method on these functions can no longer be
const as SkFlattenables declaration is not const and 
would result in the const methods only being called when
the reference to the object was const.
Review URL: https://codereview.appspot.com/5941043

git-svn-id: http://skia.googlecode.com/svn/trunk@3533 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-28 20:47:01 +00:00
robertphillips@google.com
ec51cb8634 Improved codec link-forcing system by adding Encoder/Decoder creation entry points
http://codereview.appspot.com/5881055/




git-svn-id: http://skia.googlecode.com/svn/trunk@3481 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-23 18:13:47 +00:00
caryclark@google.com
d26147adbb add optional manual global initialization
M    include/effects/SkAvoidXfermode.h
M    include/effects/SkDiscretePathEffect.h
M    include/effects/Sk1DPathEffect.h
M    include/effects/Sk2DPathEffect.h
M    include/effects/SkBlurDrawLooper.h
M    include/effects/SkPixelXorXfermode.h
M    include/effects/SkDashPathEffect.h
M    include/effects/SkColorMatrixFilter.h
M    include/effects/SkEmbossMaskFilter.h
M    include/effects/SkLayerDrawLooper.h
M    include/effects/SkGroupShape.h
M    include/effects/SkBlurImageFilter.h
M    include/effects/SkRectShape.h
A    include/effects/SkEffects.h
M    include/effects/SkCornerPathEffect.h
M    include/effects/SkGradientShader.h
M    include/effects/SkBlurMaskFilter.h
M    include/effects/SkLayerRasterizer.h
M    include/core/SkMallocPixelRef.h
M    include/core/SkFlattenable.h
M    include/core/SkShape.h
M    include/core/SkPixelRef.h
M    include/core/SkGraphics.h
M    include/core/SkPathEffect.h
M    include/core/SkPostConfig.h
M    include/core/SkXfermode.h
M    include/core/SkColorFilter.h
M    include/images/SkFlipPixelRef.h
M    include/images/SkImageRef_GlobalPool.h
M    src/effects/SkDashPathEffect.cpp
M    src/effects/SkColorMatrixFilter.cpp
M    src/effects/SkBlurImageFilter.cpp
M    src/effects/SkGroupShape.cpp
M    src/effects/SkCornerPathEffect.cpp
M    src/effects/SkGradientShader.cpp
M    src/effects/SkBlurMaskFilter.cpp
M    src/effects/SkAvoidXfermode.cpp
M    src/effects/Sk2DPathEffect.cpp
M    src/effects/SkBlurDrawLooper.cpp
M    src/effects/SkPixelXorXfermode.cpp
M    src/effects/SkColorFilters.cpp
M    src/effects/SkLayerDrawLooper.cpp
M    src/effects/SkRectShape.cpp
A    src/effects/SkEffects.cpp
M    src/effects/SkLayerRasterizer.cpp
M    src/effects/SkDiscretePathEffect.cpp
M    src/effects/Sk1DPathEffect.cpp
A    src/effects/SkEffects_none.cpp
M    src/core/SkPixelRef.cpp
M    src/core/SkGraphics.cpp
M    src/core/SkFlattenable.cpp
M    src/core/SkBitmapProcShader.h
M    src/core/SkPathEffect.cpp
M    src/core/SkShape.cpp
M    src/core/SkXfermode.cpp
M    src/core/SkMallocPixelRef.cpp
M    src/core/SkBitmapProcShader.cpp
M    src/images/SkFlipPixelRef.cpp
M    src/images/SkImageRef_GlobalPool.cpp
A    src/ports/SkGlobalInitialization_chromium.cpp
M    src/ports/SkImageRef_ashmem.h
M    src/ports/SkImageRef_ashmem.cpp
A    src/ports/SkGlobalInitialization_default.cpp
M    gyp/effects.gyp
M    gyp/tools.gyp
M    gyp/ports.gyp



git-svn-id: http://skia.googlecode.com/svn/trunk@2876 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-15 14:16:43 +00:00
epoger@google.com
ec3ed6a5eb Automatic update of all copyright notices to reflect new license terms.
I have manually examined all of these diffs and restored a few files that
seem to require manual adjustment.

The following files still need to be modified manually, in a separate CL:

android_sample/SampleApp/AndroidManifest.xml
android_sample/SampleApp/res/layout/layout.xml
android_sample/SampleApp/res/menu/sample.xml
android_sample/SampleApp/res/values/strings.xml
android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java
android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java
experimental/CiCarbonSampleMain.c
experimental/CocoaDebugger/main.m
experimental/FileReaderApp/main.m
experimental/SimpleCocoaApp/main.m
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig
gpu/src/android/GrGLDefaultInterface_android.cpp
gyp/common.gypi
gyp_skia
include/ports/SkHarfBuzzFont.h
include/views/SkOSWindow_wxwidgets.h
make.bat
make.py
src/opts/memset.arm.S
src/opts/memset16_neon.S
src/opts/memset32_neon.S
src/opts/opts_check_arm.cpp
src/ports/SkDebug_brew.cpp
src/ports/SkMemory_brew.cpp
src/ports/SkOSFile_brew.cpp
src/ports/SkXMLParser_empty.cpp
src/utils/ios/SkImageDecoder_iOS.mm
src/utils/ios/SkOSFile_iOS.mm
src/utils/ios/SkStream_NSData.mm
tests/FillPathTest.cpp
Review URL: http://codereview.appspot.com/4816058

git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-28 14:26:00 +00:00
djsollen@google.com
57f4969724 merge from android tree:
- optional parameters added to descriptorProc and allocPixels
- clip options to image decoders
- check for xfermode in blitter_a8
- UNROLL loops in blitrow

reviewed by reed@google.com



git-svn-id: http://skia.googlecode.com/svn/trunk@841 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-23 20:46:31 +00:00
reed@android.com
3f1f06a26b add optional pref-config table to codecs
git-svn-id: http://skia.googlecode.com/svn/trunk@519 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-03-03 21:04:12 +00:00
reed@android.com
6f59815b3d refactor helper functions out of libjpeg wrapper
git-svn-id: http://skia.googlecode.com/svn/trunk@476 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-01-21 15:34:19 +00:00
reed@android.com
bb9aea999c record dither setting so we can replay it when we (re)decode
git-svn-id: http://skia.googlecode.com/svn/trunk@368 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-09-24 17:21:05 +00:00
reed@android.com
31d1c64bd5 ws fixes
git-svn-id: http://skia.googlecode.com/svn/trunk@217 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-15 18:45:19 +00:00
reed@android.com
b3ade9d1b0 add optional Format* parameter to decoder helper functions.
git-svn-id: http://skia.googlecode.com/svn/trunk@215 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-15 13:04:45 +00:00
weita@google.com
25e9834c03 Honor pref config in image decoding whenever possible.
git-svn-id: http://skia.googlecode.com/svn/trunk@173 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-11 16:06:22 +00:00
reed@android.com
a14ea0e930 Simplify font-chaining (fallbacks) to have fonthost just return the next
logical fontID.
Extend ImageRef to accept an imagedecoder factory, to replace calling the std
one.



git-svn-id: http://skia.googlecode.com/svn/trunk@125 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-17 17:59:53 +00:00
reed@android.com
1337a7b14c see prev. checkin (missed these files). Change ownership rule for streams to the
skia std. of receiver calls ref() if it needs to, but regardless, the caller
always manages/balances its own ownership.



git-svn-id: http://skia.googlecode.com/svn/trunk@121 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-16 13:56:10 +00:00
reed@android.com
00bf85a986 pull from android: use registry to build up list of image codecs
git-svn-id: http://skia.googlecode.com/svn/trunk@76 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-22 13:04:56 +00:00
reed@android.com
b08eb2b3bc separate image encode and decode
remove obsolete build-flag for encode



git-svn-id: http://skia.googlecode.com/svn/trunk@56 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-06 20:16:26 +00:00
reed@android.com
8a1c16ff38 grab from latest android
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-17 15:59:43 +00:00