aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects
Commit message (Collapse)AuthorAge
* Add new SkPoint3 classGravatar robertphillips2015-07-13
| | | | | | The existing Light filter and the upcoming Lighting Shader both need a Point3 class Review URL: https://codereview.chromium.org/1229693009
* rename GrShaderDataManager -> GrProcessorDataManagerGravatar joshualitt2015-07-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1228683002
* Thread GrShaderDataManager through Image filtersGravatar joshualitt2015-07-08
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1229613002
* More threading of GrShaderDataManagerGravatar joshualitt2015-07-08
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1213613016
* Initial CL to create dummy GrShaderDataManager and thread it throughGravatar joshualitt2015-07-08
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1225673007
* style nit cleanups. e.g. remove 'virtual' on override declarationsGravatar robertphillips2015-07-07
| | | | Review URL: https://codereview.chromium.org/1216433005
* remove SkInstCntGravatar mtklein2015-06-26
| | | | | | | | | | | | | | It's been outclassed by Valgrind and leak sanitizer, and it seems to be causing problems for external folks building Skia. I'm not sure why our own builds seem unaffected. Latest thread: https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0 BUG=skia: Review URL: https://codereview.chromium.org/1217573002
* remove SK_SUPPORT_LEGACY_FILTERLEVEL_ENUMGravatar reed2015-06-23
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1205803002
* Clean up usage of SkSurfacePropsGravatar robertphillips2015-06-22
| | | | | | | | | | | | This CL continues cleaning up Skia's usage of SkSurfaceProps. It: Removes the duplicate SkSurfaceProps object from SkImageFilter::Proxy. Removes a dispreferred ctor from SkCanvas Removes the initForRootLayer entry point from SkDevice (since the root device and the canvas should always have the same pixel geometry now). Review URL: https://codereview.chromium.org/1201983006
* Fix dst bound reported by SkTileImageFilterGravatar robertphillips2015-06-16
| | | | | | | | | | | | | | | | | | | | | | | | In the example from the bug we had the filter DAG: color filter (table) 0: xfermode filter (arith) 0: tile filter [0,80,34,114] -> [0,80,800,480] 0: color filter (table) 0: bitmap src 34x34 -> [0,80,34,114] 1: color filter (table) 0: picture filter [0, 80, 800, 480] computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn. This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit. BUG=493783 Committed: https://skia.googlesource.com/skia/+/05be93bbdf09576f7903130e3b106b0a8c7c4b4e Committed: https://skia.googlesource.com/skia/+/0be685755f942baea26c66a87226b569fc17e960 Review URL: https://codereview.chromium.org/1152553006
* retro add copyrightGravatar reed2015-06-11
| | | | | | | | BUG=skia: NOTRY=True TBR= Review URL: https://codereview.chromium.org/1183463002
* Add bigtileimagefilter GM & improvements to toStringGravatar robertphillips2015-06-08
| | | | | | | | This is all the ancillary code from https://codereview.chromium.org/1152553006/ (Fix dst bound reported by SkTileImageFilter). TBR=reed@google.com, senorblanco@google.com Review URL: https://codereview.chromium.org/1169713003
* delete (unused) TransparentShaderGravatar reed2015-06-05
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1153193014
* Revert of Fix dst bound reported by SkTileImageFilter (patchset #3 id:40001 ↵Gravatar robertphillips2015-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1152553006/) Reason for revert: Blink Original issue's description: > Fix dst bound reported by SkTileImageFilter > > In the example from the bug we had the filter DAG: > > color filter (table) > 0: xfermode filter (arith) > 0: tile filter [0,80,34,114] -> [0,80,800,480] > 0: color filter (table) > 0: bitmap src 34x34 -> [0,80,34,114] > 1: color filter (table) > 0: picture filter [0, 80, 800, 480] > > computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn. > > This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit. > > BUG=493783 > > Committed: https://skia.googlesource.com/skia/+/05be93bbdf09576f7903130e3b106b0a8c7c4b4e > > Committed: https://skia.googlesource.com/skia/+/0be685755f942baea26c66a87226b569fc17e960 TBR=reed@google.com,senorblanco@google.com,senorblanco@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=493783 Review URL: https://codereview.chromium.org/1156583004
* Fix dst bound reported by SkTileImageFilterGravatar robertphillips2015-06-04
| | | | | | | | | | | | | | | | | | | | | | In the example from the bug we had the filter DAG: color filter (table) 0: xfermode filter (arith) 0: tile filter [0,80,34,114] -> [0,80,800,480] 0: color filter (table) 0: bitmap src 34x34 -> [0,80,34,114] 1: color filter (table) 0: picture filter [0, 80, 800, 480] computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn. This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit. BUG=493783 Committed: https://skia.googlesource.com/skia/+/05be93bbdf09576f7903130e3b106b0a8c7c4b4e Review URL: https://codereview.chromium.org/1152553006
* Revert of Fix dst bound reported by SkTileImageFilter (patchset #3 id:40001 ↵Gravatar robertphillips2015-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1152553006/) Reason for revert: breaking tests Original issue's description: > Fix dst bound reported by SkTileImageFilter > > In the example from the bug we had the filter DAG: > > color filter (table) > 0: xfermode filter (arith) > 0: tile filter [0,80,34,114] -> [0,80,800,480] > 0: color filter (table) > 0: bitmap src 34x34 -> [0,80,34,114] > 1: color filter (table) > 0: picture filter [0, 80, 800, 480] > > computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn. > > This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit. > > BUG=493783 > > Committed: https://skia.googlesource.com/skia/+/05be93bbdf09576f7903130e3b106b0a8c7c4b4e TBR=reed@google.com,senorblanco@google.com,senorblanco@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=493783 Review URL: https://codereview.chromium.org/1143083006
* Fix dst bound reported by SkTileImageFilterGravatar robertphillips2015-06-02
| | | | | | | | | | | | | | | | | | | | In the example from the bug we had the filter DAG: color filter (table) 0: xfermode filter (arith) 0: tile filter [0,80,34,114] -> [0,80,800,480] 0: color filter (table) 0: bitmap src 34x34 -> [0,80,34,114] 1: color filter (table) 0: picture filter [0, 80, 800, 480] computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn. This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit. BUG=493783 Review URL: https://codereview.chromium.org/1152553006
* remove redundant/deprecated TwoPointRadial gradiet -- use TwoPointConicalGravatar reed2015-05-04
| | | | | | | | This CL derived from https://codereview.chromium.org/1114243005/ BUG=skia: Review URL: https://codereview.chromium.org/1117423003
* Use GLSLCaps for creating processor keys and GLSL-specific programsGravatar jvanverth2015-04-28
| | | | | | | | | Effectively all this does is future-proof any GLSL-specific code, as GLSLCaps is just a typedef of GLCaps. BUG=skia: Review URL: https://codereview.chromium.org/1109863004
* Add GM to repro crbug.com/472795Gravatar robertphillips2015-04-09
| | | | | | | | This CL also adds a new parameter to SkBitmapSource which gives the user control of the filter quality. BUG=472795 Review URL: https://codereview.chromium.org/1072603002
* Refactor Sk2x<T> + Sk4x<T> into SkNf<N,T> and SkNi<N,T>Gravatar mtklein2015-03-30
| | | | | | | | | | | | | | | | | | | | | The primary feature this delivers is SkNf and SkNd for arbitrary power-of-two N. Non-specialized types or types larger than 128 bits should now Just Work (and we can drop in a specialization to make them faster). Sk4s is now just a typedef for SkNf<4, SkScalar>; Sk4d is SkNf<4, double>, Sk2f SkNf<2, float>, etc. This also makes implementing new specializations easier and more encapsulated. We're now using template specialization, which means the specialized versions don't have to leak out so much from SkNx_sse.h and SkNx_neon.h. This design leaves us room to grow up, e.g to SkNf<8, SkScalar> == Sk8s, and to grown down too, to things like SkNi<8, uint16_t> == Sk8h. To simplify things, I've stripped away most APIs (swizzles, casts, reinterpret_casts) that no one's using yet. I will happily add them back if they seem useful. You shouldn't feel bad about using any of the typedef Sk4s, Sk4f, Sk4d, Sk2s, Sk2f, Sk2d, Sk4i, etc. Here's how you should feel: - Sk4f, Sk4s, Sk2d: feel awesome - Sk2f, Sk2s, Sk4d: feel pretty good No public API changes. TBR=reed@google.com BUG=skia:3592 Review URL: https://codereview.chromium.org/1048593002
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Revert of Revert of remove colorfilter native-565 support. complicating w/ ↵Gravatar reed2015-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | no real value. (patchset #1 id:1 of https://codereview.chromium.org/1022673007/) Reason for revert: fix for chrome has landed... Original issue's description: > Revert of remove colorfilter native-565 support. complicating w/ no real value. (patchset #2 id:20001 of https://codereview.chromium.org/1015533011/) > > Reason for revert: > skia/ext/benchmarking_canvas.cc references HasFilter16 :( > > Original issue's description: > > remove colorfilter native-565 support. complicating w/ no real value. > > > > BUG=skia: > > TBR= > > > > Committed: https://skia.googlesource.com/skia/+/2151353d161fe389cdc0db62cfe1932c7680f710 > > TBR=reed@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/92b47c49016749249ff8521e424c4373b4a74241 TBR=reed@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1016103004
* Revert of remove colorfilter native-565 support. complicating w/ no real ↵Gravatar reed2015-03-24
| | | | | | | | | | | | | | | | | | | | | | | value. (patchset #2 id:20001 of https://codereview.chromium.org/1015533011/) Reason for revert: skia/ext/benchmarking_canvas.cc references HasFilter16 :( Original issue's description: > remove colorfilter native-565 support. complicating w/ no real value. > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/2151353d161fe389cdc0db62cfe1932c7680f710 TBR=reed@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1022673007
* Revert "Revert of impl colormatrix w/ floats (patchset #7 id:120001 of ↵Gravatar reed2015-03-24
| | | | | | | | | | | | | https://codereview.chromium.org/967943002/)" disabled for the momment -- need to understand arm64 glitches This reverts commit 374a4c3b744e8c77455efa73b139950136f7b374. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1028403002
* remove colorfilter native-565 support. complicating w/ no real value.Gravatar reed2015-03-24
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1015533011
* Revert of impl colormatrix w/ floats (patchset #7 id:120001 of ↵Gravatar reed2015-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/967943002/) Reason for revert: Arm64 seems to be having glitches :( See gm:colormatrix on Arm64/TegraK1/Nexus9 last square should be all white, but it has stripes Original issue's description: > impl colormatrix w/ floats > > this needs to land first https://codereview.chromium.org/1031713003 > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/7971def11be91ed08eae7107b372322d24e67544 TBR=mtklein@google.com,caryclark@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1030743003
* impl colormatrix w/ floatsGravatar reed2015-03-23
| | | | | | | | this needs to land first https://codereview.chromium.org/1031713003 BUG=skia: Review URL: https://codereview.chromium.org/967943002
* Move SkMatrixImageFilter into core, and add a factory fn for it.Gravatar senorblanco2015-03-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1011273003
* Remove deprecated flavour of SkDropShadowImageFilter::Create().Gravatar senorblanco2015-03-20
| | | | Review URL: https://codereview.chromium.org/1026603002
* Remove now-unused uniqueID param from SkDropShadowImageFilter::Create().Gravatar senorblanco2015-03-19
| | | | | | | | Also make both input & crop rect default NULL, as in other filter Create functions. BUG=skia: Review URL: https://codereview.chromium.org/1016343002
* Remove uniqueID from all filter serialization.Gravatar senorblanco2015-03-18
| | | | | | | | | | | | (This is essentially a revert of https://codereview.chromium.org/503833002/.) This was necessary back when SkPaint was flattened even for in-process use. Now that we only flatten SkPaint for cross-process use, there's no need to serialize UniqueIDs. Note: SkDropShadowImageFilter is being constructed with a croprect and UniqueID (of 0) in Blink. I've made the uniqueID param default to 0 temporarily, until this rolls in and Blink can be changed. (Blink can't be changed first, since unlike the other filters, there's no constructor that takes a cropRect but not a uniqueID.) BUG=skia: Review URL: https://codereview.chromium.org/1019493002
* remove dead codeGravatar reed2015-03-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1016523002
* SkPaint::FilterLevel -> SkFilterQualityGravatar reed2015-03-16
| | | | | | | | | clone (+rebase) of https://codereview.chromium.org/1009183002/ BUG=skia: TBR=scroggo@google.com Review URL: https://codereview.chromium.org/1014533004
* Use ComposColorFilter to collaps hierarchy (when possible).Gravatar reed2015-03-08
| | | | | | | | | | | | | Clarify asColorFilter ... 1. Rename to isColorFilterNode for DAG reduction 2. Add asAColorFilter for removing the imagefilter entirely (future use-case) Need layouttest rebaseline suppression before this can land in chrome... https://codereview.chromium.org/984023004/ BUG=skia: Review URL: https://codereview.chromium.org/982933002
* Remove SkPorterDuff now that Android has been updated.Gravatar djsollen2015-03-05
| | | | | | BUG=skia:3178 Review URL: https://codereview.chromium.org/983743003
* ViaAndroidSDK for DMGravatar tomhudson2015-03-05
| | | | | | | | | | | | | | Make a Via for DM which transforms a set of draws to be more like what we'd see through the Android Framework's HWUI API. Only built inside Android's framework because we depend on HWUI classes for half of those transformations. Tested with --config androidsdk-8888 and --config androidsdk-hwui. R=djsollen@google.com,mtklein@google.com,reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/974913002
* change colorfilter to return an array of frag processorsGravatar reed2015-03-03
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/973593002
* add virtuals to optimize composing colorfiltersGravatar reed2015-03-02
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/968993004
* add compose-colorfilterGravatar reed2015-03-01
| | | | | | | | | | | now with serialization registration This reverts commit 5bd055c0386499f2dc8c66173a7534b75af602bf. BUG=skia: TBR= Review URL: https://codereview.chromium.org/970753002
* Fix SkComposeImageFilter's bounds computation and offset handlingGravatar ajuma2015-02-13
| | | | | | | | | | | | | | This makes SkComposeImageFilter::computeFastBounds compose its filters' bounds (rather than falling back to SkImageFilter::computeFastBounds, which takes the union of the bounds). This also makes SkComposeImageFilter::onFilterImage correctly handle an offset produced when applying the inner filter; such offsets were previously ignored. BUG=chromium:453924 Review URL: https://codereview.chromium.org/908273002
* Port SkRefCnt.h to new SkAtomics.hGravatar mtklein2015-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds sk_memory_barrier(), implemented using sk_atomic_fetch_add() on an uninitialized variable. If that becomes a problem we can drop this to the porting layer, using std::atomic_thread_fence() / __atomic_thread_fence() / __sync_synchronize(). The big win is that ref() doesn't generate a memory barrier any more on ARM. This is an instance of SkSafeRef() in SkPaint(const SkPaint&) after this CL: 4d0: 684a ldr r2, [r1, #4] 4d2: 6018 str r0, [r3, #0] 4d4: b13a cbz r2, 4e6 <_ZN7SkPaintC1ERKS_+0x2e> 4d6: 1d10 adds r0, r2, #4 4d8: e850 4f00 ldrex r4, [r0] 4dc: 3401 adds r4, #1 4de: e840 4500 strex r5, r4, [r0] 4e2: 2d00 cmp r5, #0 4e4: d1f8 bne.n 4d8 <_ZN7SkPaintC1ERKS_+0x20> Here's the before, pretty much the same with two memory barriers surrounding the ref(): 4d8: 684a ldr r2, [r1, #4] 4da: 6018 str r0, [r3, #0] 4dc: b15a cbz r2, 4f6 <_ZN7SkPaintC1ERKS_+0x3e> 4de: 1d10 adds r0, r2, #4 4e0: f3bf 8f5f dmb sy 4e4: e850 4f00 ldrex r4, [r0] 4e8: 3401 adds r4, #1 4ea: e840 4500 strex r5, r4, [r0] 4ee: 2d00 cmp r5, #0 4f0: d1f8 bne.n 4e4 <_ZN7SkPaintC1ERKS_+0x2c> 4f2: f3bf 8f5f dmb sy The miscellaneous files in here are just fixups to explicitly include SkMutex.h, instead of leeching it off SkRefCnt.h. No public API changes. TBR=reed@google.com Build trybots seem hosed. NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/896803002
* Reland "remove unused SkAvoidXfermode"Gravatar scroggo2015-01-30
| | | | | | | | (patchset #2 id:20001 of https://codereview.chromium.org/860583002/) SkAvoidXfermode has been moved into Android, so it is safe to remove. Review URL: https://codereview.chromium.org/890893003
* Add patheffects to debugger printoutGravatar robertphillips2015-01-26
| | | | | | TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/872043002
* Revert of remove unused SkAvoidXfermode (patchset #2 id:20001 of ↵Gravatar scroggo2015-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/860583002/) Reason for revert: Breaking Android framework build, which still uses AvoidXfermode. (failure shown here: https://android-build.storage.googleapis.com/builds/git_master-skia-linux-razor-userdebug/1689202/565b76b4bd8cc2ffd5aeb37e524f6a35e9b8791995d6e8c719a3a6d83aece936/logs/build_error.log?Signature=lHYyiconR%2BoTzY9ILAKlaUm6nFnpJQPTI4XUei1ZccBRyz6PxspCNvYCDO5za92yZSoy9refHT7uh2Hxlxew1ZBePxKCp2nnwJB7a%2B403kiHMHHawjecsbPnTE9QNNO8XMoqAjujcAplorhwsIBZYOCxb%2Bo5010BCfzTd%2F8GFa8%3D&Expires=1421764644&GoogleAccessId=701025073339-mqn0q2nvir9iurm6q5d00tdv7blbgvjr%40developer.gserviceaccount.com) Here is the Java class that uses it: https://cs.corp.google.com/#android/frameworks/base/graphics/java/android/graphics/AvoidXfermode.java&sq=package:android It has been deprecated. The glue code (which actually references the Skia file) is here: https://cs.corp.google.com/#android/frameworks/base/core/jni/android/graphics/Xfermode.cpp&q=Xfermode.cpp&sq=package:android Mike suggested we move the implementation into Android, which is fine with me. Original issue's description: > remove unused SkAvoidXfermode > > BUG=skia: > TBR= > NOTRY=True > > Committed: https://skia.googlesource.com/skia/+/2d02df7a9a50217dac8c1d11681832a927ed79ce TBR=bsalomon@google.com,reed@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/822953003
* remove unused SkAvoidXfermodeGravatar reed2015-01-18
| | | | | | | | BUG=skia: TBR= NOTRY=True Review URL: https://codereview.chromium.org/860583002
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Remove macros that make it look like it's a good idea to not be able to flatten.Gravatar mtklein2015-01-07
| | | | | | | | | | | | | | | | | There are only a handful of SkFlattenables that are not flattenable. That there are any seems highly illogical. To make this look less like a normal thing, this removes both macros that marked SkFlattenables as non-flattenable (in slightly different ways). The handful of SkFlattenables in our codebase that can't be flattened now assert violently that they can't be flattened. They're internal or part of animator... places where we'll never actually flatten them. TestLooper and DummyRasterizer were so trivial that I just made them flattenable. BUG=skia: Review URL: https://codereview.chromium.org/841753002
* undef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES to fix callersGravatar reed2014-12-21
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/824533002
* Add toString methods to SkImageFilter-derived classesGravatar robertphillips2014-12-19
| | | | | | This isn't definitive but at least makes something show up in the debugger. Review URL: https://codereview.chromium.org/789163006