aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
Commit message (Collapse)AuthorAge
* Rename GrGLUniformManager to GrGLProgramDataManagerGravatar kkinnunen2014-07-30
| | | | | | | | | | | | | Rename GrGLUniformManager to GrGLProgramDataManager in anticipation that the class would be used to manage shader resources that are not uniforms. This is needed in order to implement NVPR on GLES. R=bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/365853002
* Adding repeat mode to texture domainGravatar joshualitt2014-07-29
| | | | | | | | | BUG=skia: R=bsalomon@chromium.org, senorblanco@chromium.org, bsalomon@google.com, junov@chromium.org Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/422123003
* Fix thread unsafe mutex initialization.Gravatar bungeman2014-07-25
| | | | | | | | | BUG=skia:2779 R=robertphillips@google.com, mtklein@google.com, reed@android.com, bsalomon@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/419113002
* Remove the single-sigma version of SkDropShadowImageFilter::Create().Gravatar senorblanco2014-07-22
| | | | | | | | | | | It's no longer used in Chrome. BUG=skia: R=bsalomon@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/407203002
* Initial change to move 2D kernel to its own file.Gravatar joshualitt2014-07-22
| | | | | | | | | BUG=skia: R=bsalomon@chromium.org, senorblanco@chromium.org, bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/379253003
* Allow GrGLEffects to produce variable length keys.Gravatar bsalomon2014-07-21
| | | | | | | | R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/385713005
* Remove use of SK_SUPPORT_LEGACY_LAYERRASTERIZER_API.Gravatar dominikg2014-07-21
| | | | | | | | | | | | Mozilla have removed any uses of the legacy API from their Moz2D code. Since they were the last users we know of, we can remove the legacy API. BUG=skia:2187 R=scroggo@google.com, reed@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/402613003
* Make SkPictureShader and SkPictureImageFilter use const SkPicturesGravatar robertphillips2014-07-14
| | | | | | | | | R=mtklein@google.com, reed@google.com TBR=reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/390023002
* This moves us towards variable length effect keys. The overall program key ↵Gravatar bsalomon2014-07-11
| | | | | | | | | | now allows for it. After the header it stores an array of offsets to effect keys. This allows us to grab the effect keys to pass to effects when they generate code. It also ensures that we can't get a collision by sets of keys that are different lengths but are the same when appended together. R=robertphillips@google.com, jvanverth@google.com, egdaniel@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/356513003
* Always initialize SkDashPathEffect fields.Gravatar mtklein2014-07-09
| | | | | | | | | | | | | | | | | | | SkDashPathEffect is flattened into a hash key as part of the old-and-busted SkPicture paint deduping code. If all its fields aren't intialized, this hash will be based on uninitialized data. This means the hash won't be deterministic, and worse, Valgrind and MSAN will make us feel bad. An alternative to this is to have SkDashPath::CalcDashParameters always guarantee it writes something to all its output parameters, even when the dash intervals make no sense. I like it being dumb and its users defensive, but could go either way. BUG=391001 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/379813004
* Goodbye GrEffectRef.Gravatar bsalomon2014-07-08
| | | | | | | | | | Also, reworked some var names and comments around SkShader::asNewEffect. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/374923002
* Clean up SkImageFilter constructors.Gravatar senorblanco2014-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that all creation of SkImageFilters goes through factory Create() methods, there's no real reason for the convenience constructors. Some SkImageFilter subclasses which actually have zero DAG-able inputs were passing NULL to the superclass constructor. This actually means 1 input, with a NULL value, not zero inputs. This becomes more relevant for the upcoming cache infrastructure, where this indicates that the filter will use its src input, where in fact some of these filters do not (they are image generators only). Limiting SkImageFilter to a single constructor resolves this ambiguity. Along the way, I removed all of the default parameters to the constructors, since the Create methods always call them with the full argument list. BUG=skia: R=reed@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/376953003
* Remove GrEffect::CreateEffectRef and GrEffect::AutoEffectRef.Gravatar bsalomon2014-07-08
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/371103003
* Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*.Gravatar bsalomon2014-07-08
| | | | | | | | | | | | | | Make Sk-effect virtuals produce GrEffect* rather than GrEffectRef* Make GrEffectRef a typedef for GrEffect. Committed: https://skia.googlesource.com/skia/+/2011fe9cdfa63b83489a146cea6a724cede352c8 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/377503004
* Revert of Make GrDrawState and GrPaint take GrEffect* instead of ↵Gravatar reed2014-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | GrEffectRef*. (https://codereview.chromium.org/377503004/) Reason for revert: broke linux builders Original issue's description: > Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. > > Make Sk-effect virtuals produce GrEffect* rather than GrEffectRef* > > Make GrEffectRef a typedef for GrEffect. > > Committed: https://skia.googlesource.com/skia/+/2011fe9cdfa63b83489a146cea6a724cede352c8 R=robertphillips@google.com, bsalomon@google.com TBR=bsalomon@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: reed@google.com Review URL: https://codereview.chromium.org/372053003
* Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*.Gravatar bsalomon2014-07-07
| | | | | | | | | | | | Make Sk-effect virtuals produce GrEffect* rather than GrEffectRef* Make GrEffectRef a typedef for GrEffect. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/377503004
* Fix SkColorFilterImageFilter matrix optimization.Gravatar senorblanco2014-07-03
| | | | | | | | | | | | | The order of matrices passed to multiplication was wrong (apparently, this optimization was only being tested with matrices which commute). See Chrome bug http://crbug.com/378362 R=sugoi@chromium.org Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/371523002
* Adding 64 bit checksGravatar sugoi2014-07-03
| | | | | | | | | | | | | Added a few more checks to avoid overflowing 32 bit sizes while computing convolutions. I also changed a dangerously misleading INHERITED typedef. BUG=389570 R=senorblanco@google.com, senorblanco@chromium.org Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/361403006
* move SkChecksum and SkEmptyShader to privateGravatar reed2014-07-03
| | | | | | | | TBR=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/366133002
* Make perlin noise do CTM-correct scaling.Gravatar senorblanco2014-06-27
| | | | | | | | | | | | | | | | When drawing perlin noise, generate noise at the resolution determined by CTM, not by the resolution at construction time. This required moving the generation of PaintingData to getContext() and asNewEffect() for the raster and GPU paths, respectively. It also required adjusting the matrices used during rendering to be translate-only. R=sugoi@chromium.org, bsalomon@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/358903002
* Remove SkBicubicImageFilter, and all related tests.Gravatar senorblanco2014-06-25
| | | | | | | | | | | | | Now that we have SkResizeImageFilter, and the bicubic resizing is part of skia proper, there's no need for a specialized image filter. BUG=skia: R=bsalomon@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/357793002
* Make GrGLShaderBuilder::fragmentPosition() return a vec4, with 1.0 as the zw ↵Gravatar bsalomon2014-06-24
| | | | | | | | | | | | | | components when in the y-flip case. This works around an Adreno driver bug. Revert "Stop referencing gl_FragCoord z and w components." This reverts commit 160a52ba217012ed73c240f6d67b3bbf2b4879d6. R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/354663002
* Stop referencing gl_FragCoord z and w components.Gravatar bsalomon2014-06-20
| | | | | | | | | | This fixes an Adreno driver bug where GL programs fail to link if the FS refers to these components of gl_FragCoord. R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/345083002
* Revert of remove guarded code - there are no more callers ↵Gravatar reed2014-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/343783002/) Reason for revert: webkit still uses getTotalClip -- need to find where they define the guard. ../../skia/ext/skia_utils_mac.mm:400:42: error: no member named 'getTotalClip' in 'SkCanvas' const SkRegion& clipRgn = canvas_->getTotalClip(); ~~~~~~~ ^ Original issue's description: > remove guarded code - there are no more callers > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/c5d5cf9489977aa6fba077d1dc242029fbb4859e R=scroggo@google.com, reed@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/342843002
* remove guarded code - there are no more callersGravatar reed2014-06-18
| | | | | | | | | BUG=skia: R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/343783002
* Fifth attempt to land faster rect blur. Remove unnecessary conditionals ↵Gravatar humper2014-06-17
| | | | | | | | | | | | | | | from the shader. approved over in https://codereview.chromium.org/331863006/; reuploading because it had the wrong base url BUG=skia:2095 R=bsalomon@google.com TBR=bsalomon Author: humper@google.com Review URL: https://codereview.chromium.org/341543005
* Perlin noise cleanup.Gravatar senorblanco2014-06-16
| | | | | | | | | | | Remove Simplex noise implementation and now-redundant base classes. BUG=skia: R=sugoi@chromium.org, sugoi@google.com, reed@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/336043002
* Randomize seed for SkDiscretePathEffect::filterPath()Gravatar rs.prinja2014-06-12
| | | | | | | | | | | | | | | | | | Fix for https://code.google.com/p/skia/issues/detail?id=2581. Randomizes the seed in SkDiscretePathEffect::filterPath(). Prior to this we were using the path length as a seed. Now, if we have two different paths with identical contents and we apply an SkDiscretePathEffect to each, we obtain two different random paths. Previously, we would obtain two overlapping paths (identical path contents leading to the same seed). BUG=skia: R=reed@google.com, scroggo@google.com Author: rs.prinja@samsung.com Review URL: https://codereview.chromium.org/311803002
* Revert of third try at landing improved blur rect; this time with more ↵Gravatar scroggo2014-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | correctness (https://codereview.chromium.org/331443003/) Reason for revert: Failing layout test: https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux/32762/layout-test-results/virtual/gpu/fast/canvas/canvas-draw-canvas-on-canvas-shadow-pretty-diff.html Original issue's description: > third try at landing improved blur rect; this time with more correctness > > BUG=skia:2095 > R=bsalomon@google.com > TBR=bsalomon > > Committed: https://skia.googlesource.com/skia/+/72abfc2b4e7caead660f6b6a05e60d05eaf1a66f R=bsalomon@google.com, reed@google.com, humper@google.com TBR=bsalomon@google.com, humper@google.com, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2095 Author: scroggo@google.com Review URL: https://codereview.chromium.org/333763002
* Fix tiled perlin noise.Gravatar senorblanco2014-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | It turns out that the perlin implementation we inherited from WebKit does not actually generate tileable noise (see Chromium bug http://crbug.com/383495). The main problem is that when generating coordinates for gradient interpolation, it was attempting to wrap both x and (x + 1) simultaneously at the tile boundary (that is, either both or neither are wrapped). This obviously won't work, since along the tile seams, (x + 1) should be wrapped, but x should not. The same is true in y. This patch fixes both the CPU and GPU paths, renames some variables to more closely match the spec, and modifies the perlin noise GM to actually test tiling. (Note that the clipping the GM was doing was removed, since it's superfluous: it used to be necessary for image filters, but isn't anymore, and this isn't an image filter GM anyway.) R=sugoi@google.com, sugoi TBR=senorblanco Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/332523006
* third try at landing improved blur rect; this time with more correctnessGravatar humper2014-06-11
| | | | | | | | | | BUG=skia:2095 R=bsalomon@google.com TBR=bsalomon Author: humper@google.com Review URL: https://codereview.chromium.org/331443003
* Revert of second try at landing improved blur rect ↵Gravatar reed2014-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/325703002/) Reason for revert: broke some fast/canvas layout tests Original issue's description: > second try at landing improved blur rect > > BUG=skia:2095 > TBR=bsalomon > > Committed: https://skia.googlesource.com/skia/+/e9ea0d6b7d59ac3b7e257281e545b24bcc0d2a76 R=bsalomon@google.com, reed@chromium.org, humper@google.com TBR=bsalomon@google.com, humper@google.com, reed@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:2095 Author: reed@google.com Review URL: https://codereview.chromium.org/322423002
* Move Dashing filterPath to a dashing utils fileGravatar egdaniel2014-06-11
| | | | | | | | | | | | | | | | From inside GrContext, we have a need to create an SkPath an original path and some dashing info. We do not have access to the original path effect so we need a way to make the FilterPath function accessible outside of the effect. So I moved the core filterPath code (and all need helper functions) out of SkDashPathEffect and created a SkDashPath in utils to store these helper functions. BUG=skia: Committed: https://skia.googlesource.com/skia/+/576dcdc793a762ec63fbecdbfd5768066b548fe5 Author: egdaniel@google.com Review URL: https://codereview.chromium.org/314623004
* SkShader::asNewEffect RefactoringGravatar dandov2014-06-10
| | | | | | | | | | | | | | | The new signature is: bool asNewEffect(GrContext* context, const SkPaint& paint, GrColor* grColor, GrEffectRef** grEffect, const SkMatrix* localMatrixOrNull) const; It will fix the hack for skcolorshader by modifying the GrColor parameter in SkGr::SkPaint2GrPaintShader. BUG=skia:2646 R=jvanverth@google.com, bsalomon@google.com Author: dandov@google.com Review URL: https://codereview.chromium.org/318923005
* hide SkBitmap::setConfigGravatar reed2014-06-09
| | | | | | | | | | patch from issue 325733002 TBR=scroggo Author: reed@chromium.org Review URL: https://codereview.chromium.org/322963002
* second try at landing improved blur rectGravatar humper2014-06-09
| | | | | | | | | | BUG=skia:2095 R=bsalomon@google.com TBR=bsalomon Author: humper@google.com Review URL: https://codereview.chromium.org/325703002
* Fix Assert for gpu ConicalTwoPointGradient edgecase to be correct bounds.Gravatar egdaniel2014-06-09
| | | | | | | | | BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/311373003
* Rollback of fe689c46 and all subsequent changesGravatar jvanverth2014-06-06
| | | | | | | | | | | | BUG=skia: R=humper@google.com TBR=humper@google.com NOTRY=True NOTREECHECKS=True Author: jvanverth@google.com Review URL: https://codereview.chromium.org/324463005
* remove extra debug printsGravatar humper2014-06-06
| | | | | | | | | | | BUG=skia: TBR=jvanverth NOTRY=True NOTREECHECKS=True Author: humper@google.com Review URL: https://codereview.chromium.org/314423002
* fix 10.6 shader testsGravatar humper2014-06-06
| | | | | | | | | | | BUG=skia: TBR=jvanverth NOTRY=True NOTREECHECKS=True Author: humper@google.com Review URL: https://codereview.chromium.org/324543002
* repair math error introduced by windows build fixGravatar humper2014-06-06
| | | | | | | | | | | BUG=skia: TBR=jvanverth NOTRY=True NOTREECHECKS=True Author: humper@google.com Review URL: https://codereview.chromium.org/320593003
* one channel texture fix for blur shaderGravatar humper2014-06-06
| | | | | | | | | | | | BUG=skia: R=bsalomon@google.com TBR=bsalomon NOTRY=True NOTREECHECKS=True Author: humper@google.com Review URL: https://codereview.chromium.org/319543007
* fix blur testGravatar humper2014-06-06
| | | | | | | | | | | BUG=skia: TBR=jvanverth NOTRY=True NOTREECHECKS=True Author: humper@google.com Review URL: https://codereview.chromium.org/323583002
* Faster GPU rect blur that doesn't require computing vertical and horizontalGravatar humper2014-06-06
| | | | | | | | | | | | scanlines on the CPU first. Should make extremely large drop shadows fast again. BUG=skia: R=bsalomon@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/316273004
* Revert of Fix Assert for gpu ConicalTwoPointGradient edgecase to be correct ↵Gravatar egdaniel2014-06-06
| | | | | | | | | | | | | | | | | | | | | | | | bounds. (https://codereview.chromium.org/311373003/) Reason for revert: changed assert is failing Original issue's description: > Fix Assert for gpu ConicalTwoPointGradient edgecase to be correct bounds. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/be4fd4f7349b97a7c34a4177ec26d8aea9616628 R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: egdaniel@google.com Review URL: https://codereview.chromium.org/320573002
* Fix Assert for gpu ConicalTwoPointGradient edgecase to be correct bounds.Gravatar egdaniel2014-06-06
| | | | | | | | | BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/311373003
* Adding kernel offset validationGravatar sugoi2014-06-06
| | | | | | | | | | | Fixing bug found by clusterfuzz in SkMatrixConvolutionImageFilter. BUG=381244 R=senorblanco@google.com, senorblanco@chromium.org, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/319003002
* Revert of Move Dashing filterPath to a dashing utils file ↵Gravatar egdaniel2014-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/314623004/) Reason for revert: Need to create utils.gypi file and update chrome Original issue's description: > Move Dashing filterPath to a dashing utils file > > From inside GrContext, we have a need to create an SkPath an original path and > some dashing info. We do not have access to the original path effect so we need > a way to make the FilterPath function accessible outside of the effect. So I moved > the core filterPath code (and all need helper functions) out of SkDashPathEffect > and created a SkDashPath in utils to store these helper functions. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/576dcdc793a762ec63fbecdbfd5768066b548fe5 R=bsalomon@google.com, reed@google.com, rmistry@google.com TBR=bsalomon@google.com, reed@google.com, rmistry@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: egdaniel@google.com Review URL: https://codereview.chromium.org/317663003
* Move Dashing filterPath to a dashing utils fileGravatar egdaniel2014-06-04
| | | | | | | | | | | | | | | From inside GrContext, we have a need to create an SkPath an original path and some dashing info. We do not have access to the original path effect so we need a way to make the FilterPath function accessible outside of the effect. So I moved the core filterPath code (and all need helper functions) out of SkDashPathEffect and created a SkDashPath in utils to store these helper functions. BUG=skia: R=bsalomon@google.com, reed@google.com, rmistry@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/314623004
* Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer)Gravatar robertphillips2014-06-04
| | | | | | | | R=reed@google.com, bsalomon@google.com, mtklein@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/313613004