aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
Commit message (Collapse)AuthorAge
* This change makes SkImageFilter and SkBlurImageFilter flattenable/unflattenable.Gravatar senorblanco@chromium.org2011-11-16
| | | | | | | | | The imageblur test also needed to stop calling getDeviceSize(), since it was returning 99999x99999 for the SkPicture case. git-svn-id: http://skia.googlecode.com/svn/trunk@2699 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement Gaussian blurs for images. The caller creates an anGravatar senorblanco@chromium.org2011-11-09
| | | | | | | | | | | | | | | | | | SkBlurImageFilter, sets it on an SkPaint, passes that paint to saveLayer(), draws the primitives which are to be blurred, then calls restore(), which applies the blur. The blurs have separate sizes in the horizontal and vertical direction. This feature is GPU-only for now. NB: Due to the clipping change, there are slight pixel differences on the blurs_gpu and shadows_gpu tests, so those will require rebaselining on all platforms, as will some of the WebKit layout tests (TBD). Review URL: http://codereview.appspot.com/5322068/ git-svn-id: http://skia.googlecode.com/svn/trunk@2643 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update files to use SK_BUILD_FOR_ANDROID.Gravatar djsollen@google.com2011-11-08
| | | | | | | | This CL also removes any unecessary references to the ANDROID definition. Review URL: http://codereview.appspot.com/5354049 git-svn-id: http://skia.googlecode.com/svn/trunk@2629 2bbb7eff-a529-9590-31e7-b0007b416f81
* enable soft clipping (yikes)Gravatar reed@google.com2011-10-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2515 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make asBlur method const.Gravatar bungeman@google.com2011-10-04
| | | | | | | | | http://codereview.appspot.com/5190041/ This change makes asBlur const consistent with SkShader::asAGradient and asABitmap. git-svn-id: http://skia.googlecode.com/svn/trunk@2404 2bbb7eff-a529-9590-31e7-b0007b416f81
* Now that layout tests are fixed, remove flag to ignore margin fix.Gravatar bungeman@google.com2011-10-04
| | | | | | | http://codereview.appspot.com/5186044/ git-svn-id: http://skia.googlecode.com/svn/trunk@2403 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SK_RESTRICT inside radial gradient shader - we can't currently see a ↵Gravatar tomhudson@google.com2011-09-30
| | | | | | benefit, but it shouldn't hurt, and some compiler somewhere ought to benefit from it. git-svn-id: http://skia.googlecode.com/svn/trunk@2383 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkMath.h less visible in public header files.Gravatar tomhudson@google.com2011-09-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2340 2bbb7eff-a529-9590-31e7-b0007b416f81
* Optimize software radial gradients (remove branches from the inner loop whereGravatar tomhudson@google.com2011-09-26
| | | | | | | | | | we can, because an entire row is conservatively either outside or inside the gradient.) Change the gradient benchmark to capture both cases, and add new gm to detect errors in these optimized paths. git-svn-id: http://skia.googlecode.com/svn/trunk@2327 2bbb7eff-a529-9590-31e7-b0007b416f81
* speed up radial-mirror 16x, sweep by ~2xGravatar reed@google.com2011-09-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2294 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_RESTRICT in shadeSpan methodsGravatar reed@google.com2011-09-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2288 2bbb7eff-a529-9590-31e7-b0007b416f81
* Ignore blur margin fix flag for backward bug compatibility.Gravatar bungeman@google.com2011-09-06
| | | | | | | http://codereview.appspot.com/4981046/ git-svn-id: http://skia.googlecode.com/svn/trunk@2219 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reduce size of filter mask.Gravatar bungeman@google.com2011-09-02
| | | | | | | | | http://codereview.appspot.com/4965057/ Reduce the size of filter masks, fix HQ blur when clipped, and add tests. git-svn-id: http://skia.googlecode.com/svn/trunk@2211 2bbb7eff-a529-9590-31e7-b0007b416f81
* style cleanupGravatar reed@google.com2011-08-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2104 2bbb7eff-a529-9590-31e7-b0007b416f81
* style cleanupGravatar reed@google.com2011-08-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2101 2bbb7eff-a529-9590-31e7-b0007b416f81
* style cleanupGravatar reed@google.com2011-08-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2100 2bbb7eff-a529-9590-31e7-b0007b416f81
* add serialization to SkLayerRasterizerGravatar reed@google.com2011-08-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2088 2bbb7eff-a529-9590-31e7-b0007b416f81
* use common subclass SkPath2DPathEffect, which can be serializedGravatar reed@google.com2011-08-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2087 2bbb7eff-a529-9590-31e7-b0007b416f81
* register 1D and 2D patheffects, so they work when serialized (and piperized)Gravatar reed@google.com2011-08-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2085 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* check for non-finite values that can make us overshootGravatar reed@google.com2011-07-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1870 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove dead codeGravatar reed@google.com2011-07-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1824 2bbb7eff-a529-9590-31e7-b0007b416f81
* add asABlur() to maskfilters, so devices like gpu and pdf can query them.Gravatar reed@google.com2011-07-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1816 2bbb7eff-a529-9590-31e7-b0007b416f81
* ensure that our bitmap is built with opaque cachedalphaGravatar reed@google.com2011-07-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1789 2bbb7eff-a529-9590-31e7-b0007b416f81
* make inline version of premultiply, to speed up gradient creation.Gravatar reed@google.com2011-06-30
| | | | | | | | | | | We could speed-up again if we... - respected kDither and only built 1/2 of the table for non-dither requests - output simple params to the gpu rather than always a texture - detected that we have no alpha, and then can skip premul per-entry git-svn-id: http://skia.googlecode.com/svn/trunk@1772 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix div-by-zero (triggers debugging assert when scalar=fixed) and add masterGravatar reed@google.com2011-06-27
| | | | | | | | (raster only) images for degenerate gradient test git-svn-id: http://skia.googlecode.com/svn/trunk@1729 2bbb7eff-a529-9590-31e7-b0007b416f81
* detect when our quadratic is really linear for 2-point radial, and don'tGravatar reed@google.com2011-06-23
| | | | | | | | divide by zero, but rather just return -c/b git-svn-id: http://skia.googlecode.com/svn/trunk@1684 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix more coverity defects - Uninitialized class fields.Gravatar vandebo@chromium.org2011-06-22
| | | | | | | | | | In SkCanvas, SkBitmapCache::Entry, SkDrawLooper CID=13440,1366,16236,14393 Review URL: http://codereview.appspot.com/4628055 git-svn-id: http://skia.googlecode.com/svn/trunk@1671 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add option in flattening to write factory names inline, as we are recording.Gravatar reed@google.com2011-06-21
| | | | | | | | | | | | | | | | | | | SkGPipe needs this, since it cannot (unlike SkPicture) see all of the factories before it hands its data to the reader. In this mode, the writer embedds the factory name the first time it sees it, and then after that writes an index (referencing the fFactorySet). The reader installs an empty array, and as it encounters names, appends them to that array so that subsequent indices can be used to retrieve the previously named factory. Some of the existing patheffects did not register their factory names, so those changes are also part of this CL. Annoyingly, to register your factory using the current scheme, it has to be in the public section of the class definition. git-svn-id: http://skia.googlecode.com/svn/trunk@1663 2bbb7eff-a529-9590-31e7-b0007b416f81
* Increase compatibility with clang, mostly around SK_RESTRICT.Gravatar tomhudson@google.com2011-06-15
| | | | | | | | Attempting to fix up our use of __restrict__ so Chrome can enable it. git-svn-id: http://skia.googlecode.com/svn/trunk@1597 2bbb7eff-a529-9590-31e7-b0007b416f81
* delete all old (non-Gyp) buildfilesGravatar epoger@google.com2011-06-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1583 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix unnitialized memory in Sk2DPathEffect. The SkDescriptor checksumGravatar senorblanco@chromium.org2011-05-20
| | | | | | | | | | | | | | calculation for Sk2DPathEffect currently evaluates all the bytes in the embedded SkMatrix. This includes the type mask, which contains some uninitialized padding. Changing it to use SkMatrix::flatten() and SkMatrix::unflatten() (as SkGroupShape was doing) avoids the uninitialized data errors. Review URL: http://codereview.appspot.com/4529074/ git-svn-id: http://skia.googlecode.com/svn/trunk@1395 2bbb7eff-a529-9590-31e7-b0007b416f81
* Clean up some valgrind errors in SkTransparentShader. Valgrind complainsGravatar senorblanco@chromium.org2011-05-20
| | | | | | | | | | | about overlapping memcpy(). In fact, it seems that src and dest are the same, so we should be able to skip the copy in this case. Review URL: http://codereview.appspot.com/4535085/ git-svn-id: http://skia.googlecode.com/svn/trunk@1393 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix bug where we wrote uninitialized data to the flatten stream for shaders.Gravatar reed@google.com2011-05-10
| | | | | | | | | | | | | | | | | | | Both shader and gradient_shader write matrices to the flatten stream. However, they were just calling write(&matrix, sizeof(SkMatrix)) and the matrix can contain lazily-computed function ptrs as part of its internal cache. Thus two matrices that are logically the same may write different bytes. This is a problem because picture relies on flattening objects and then using the flatten stream as a key into its cache. This matrix-write bug effectively kills the effectiveness of the cache for shaders. The fix is to write proper read/write functions for matrix (and region btw). These call through to the existing low-level flatten routines (which just write into a memory ptr). git-svn-id: http://skia.googlecode.com/svn/trunk@1290 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add missing flattenable registrations and CreateProc() functions;Gravatar tomhudson@google.com2011-04-27
| | | | | | | | fixes gm --serialize xfermode test case. git-svn-id: http://skia.googlecode.com/svn/trunk@1199 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add flattenable registrar for Two_Point_Radial_Gradient.Gravatar tomhudson@google.com2011-04-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1198 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix to (two-point radial) gradient playback error in SkPictures that swappedGravatar tomhudson@google.com2011-04-25
| | | | | | | | the X and Y coordinates of their centers. git-svn-id: http://skia.googlecode.com/svn/trunk@1179 2bbb7eff-a529-9590-31e7-b0007b416f81
* code styleGravatar mike@reedtribe.org2011-04-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1160 2bbb7eff-a529-9590-31e7-b0007b416f81
* handle overflowGravatar reed@google.com2011-04-18
| | | | | | | | | | note: gradient caller doesn't so we can still draw wrong when the caller converts its initial fx from float->fixed. Perhaps SkClampRange should offer a float interface as well. git-svn-id: http://skia.googlecode.com/svn/trunk@1149 2bbb7eff-a529-9590-31e7-b0007b416f81
* disable fast linear for now (really this time)Gravatar reed@google.com2011-04-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1144 2bbb7eff-a529-9590-31e7-b0007b416f81
* disable fast linear until we handle the overflow casesGravatar reed@google.com2011-04-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1143 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_USE_SLOW_2POINT_RADIAL_GRADIENT option for clients that like slownessGravatar reed@google.com2011-04-15
| | | | | | | | (or the previous images) git-svn-id: http://skia.googlecode.com/svn/trunk@1140 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SkClampRange to speedup clamp iteratorsGravatar reed@google.com2011-04-15
| | | | | | | | speeds up linear gradients 4x git-svn-id: http://skia.googlecode.com/svn/trunk@1139 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstream android changes.Gravatar djsollen@google.com2011-04-15
| | | | | | | reviewed by: reed git-svn-id: http://skia.googlecode.com/svn/trunk@1134 2bbb7eff-a529-9590-31e7-b0007b416f81
* code styleGravatar reed@google.com2011-04-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1133 2bbb7eff-a529-9590-31e7-b0007b416f81
* add reflection asColorMode to SkColorFilter (for gpu)Gravatar reed@google.com2011-04-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1126 2bbb7eff-a529-9590-31e7-b0007b416f81
* add mask for paint-bits to layerdrawlooperGravatar mike@reedtribe.org2011-04-14
| | | | | | | | change addLayer variants that don't respect paint changes to return void git-svn-id: http://skia.googlecode.com/svn/trunk@1123 2bbb7eff-a529-9590-31e7-b0007b416f81
* speed up 2-point-radial gradients by 9x, using float instead of fixedGravatar reed@google.com2011-04-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1118 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix SkFixed overflows in SkFixedSquare, SkGradientShader.Gravatar wjmaclean@chromium.org2011-04-13
| | | | | | Return SK_FixedMax when overflow occurs. git-svn-id: http://skia.googlecode.com/svn/trunk@1117 2bbb7eff-a529-9590-31e7-b0007b416f81
* expand SkLayerDrawLooper to allow for an xfermode when transfering the ↵Gravatar reed@google.com2011-04-12
| | | | | | | | | | paint's color, and allow that the offset be applied pre or post git-svn-id: http://skia.googlecode.com/svn/trunk@1115 2bbb7eff-a529-9590-31e7-b0007b416f81