aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/composeshader.cpp
Commit message (Collapse)AuthorAge
* Revert "Revert "move GrColor.h to private, IWYU""Gravatar Mike Reed2018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 63cc29304a65039feaf27842d587ed16de010b0d. Reason for revert: pdfium updated Original change's description: > Revert "move GrColor.h to private, IWYU" > > This reverts commit e602f395813aab8242afad356008b8e79911adbb. > > Reason for revert: Breaks PDFIUM > > Original change's description: > > move GrColor.h to private, IWYU > > > > Bug: skia: > > Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e > > Reviewed-on: https://skia-review.googlesource.com/104160 > > Commit-Queue: Mike Reed <reed@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,reed@google.com > > Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/104440 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reed@google.com Change-Id: I22fa5c0e0628b5c1f3b5f13879c7d1a4528cc93a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/104561 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "move GrColor.h to private, IWYU"Gravatar Brian Salomon2018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e602f395813aab8242afad356008b8e79911adbb. Reason for revert: Breaks PDFIUM Original change's description: > move GrColor.h to private, IWYU > > Bug: skia: > Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e > Reviewed-on: https://skia-review.googlesource.com/104160 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reed@google.com Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/104440 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* move GrColor.h to private, IWYUGravatar Mike Reed2018-02-06
| | | | | | | | Bug: skia: Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e Reviewed-on: https://skia-review.googlesource.com/104160 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* center frame to make hairline more repo on gpusGravatar Mike Reed2018-02-02
| | | | | | | | Bug: skia: Change-Id: Ia634f738b76e3f60b17798719f1b72db5cf213ad Reviewed-on: https://skia-review.googlesource.com/102864 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* add new gm for cmoposeshaderGravatar Mike Reed2018-02-02
| | | | | | | | Bug: skia: Change-Id: I8f0925743ea3a7f5bb2af31d01da7d932827d256 Reviewed-on: https://skia-review.googlesource.com/103081 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* guard references to SkColorTableGravatar Mike Reed2017-07-18
| | | | | | | | Bug: skia:6828 Change-Id: I0c8c78e70b118f51cb59dc45675e4ddcd4776108 Reviewed-on: https://skia-review.googlesource.com/24260 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Revert "Revert "Reland: Remove SkLights include from SkCanvas.h""Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9d5f66d9c21eda7d3e2ed47654180c0c4b6e38b1. Reason for revert: Leon landed Android fixes. Original change's description: > Revert "Reland: Remove SkLights include from SkCanvas.h" > > This reverts commit fed00319c9bafa41c8df658708030c072b301a41. > > Reason for revert: breaking the Android roll. > > Original change's description: > > Reland: Remove SkLights include from SkCanvas.h > > > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > > works fine). > > > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > > TBR=reed@google.com > > Reviewed-on: https://skia-review.googlesource.com/15143 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Florin Malita <fmalita@chromium.org> > > > > TBR=fmalita@chromium.org,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e > Reviewed-on: https://skia-review.googlesource.com/15195 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=msarett@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0a1c2f9df61f16987ab72dfb4f3a205fbcc37667 Reviewed-on: https://skia-review.googlesource.com/15229 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Reland: Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fed00319c9bafa41c8df658708030c072b301a41. Reason for revert: breaking the Android roll. Original change's description: > Reland: Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > TBR=reed@google.com > Reviewed-on: https://skia-review.googlesource.com/15143 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Florin Malita <fmalita@chromium.org> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e Reviewed-on: https://skia-review.googlesource.com/15195 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Reland: Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-03
| | | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb TBR=reed@google.com Reviewed-on: https://skia-review.googlesource.com/15143 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9ff301bf918cd85d9f67047f10631b7a74345a90. Reason for revert: need to update G3, Flutter. Original change's description: > Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f > Reviewed-on: https://skia-review.googlesource.com/14904 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4799ad5b31aaeaf529c8b912bbe09aa8869a5e6c Reviewed-on: https://skia-review.googlesource.com/15107 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-02
| | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f Reviewed-on: https://skia-review.googlesource.com/14904 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* add helper makeShader for the common Clamp caseGravatar Mike Reed2017-04-28
| | | | | | | | Bug: skia: Change-Id: I22cac56f35fed16daede0cf1b3e34dfa6f5ae3ea Reviewed-on: https://skia-review.googlesource.com/14625 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* GM: some header cleanupGravatar Mike Klein2017-03-22
| | | | | | | | | | | | | | gm.h includes sk_tool_utils.h but does not use it. The bulk of this CL makes each gm that uses sk_tool_utils include it. sk_tool_utils.h also provided SkRandom and SkTDArray, so a couple GMs add those headers too. Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1 Reviewed-on: https://skia-review.googlesource.com/10014 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* hide trivial helpers on canvasGravatar Mike Reed2017-02-22
| | | | | | | | | BUG=skia: Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef Reviewed-on: https://skia-review.googlesource.com/8852 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "make it illegal to include SkXfermode.h""Gravatar Mike Reed2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e9d1b299ccbf8017ba57040986ded638f954684a. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "make it illegal to include SkXfermode.h" > > This reverts commit 07764cefbb18041a77897df3453903b0a2016583. > > Reason for revert: breaking google3 > > Original change's description: > > make it illegal to include SkXfermode.h > > > > BUG=skia: > > > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5133 > > > > Change-Id: I6e8596dcb17cd7e8efa67859bb682bf9bfcac4db > > Reviewed-on: https://skia-review.googlesource.com/5133 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > > > TBR=reed@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I136f9e533eb60633c49dffa19b5747d50b6d98a8 > Reviewed-on: https://skia-review.googlesource.com/5196 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,reviews@skia.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0b767ce778a4ade83c2f07d5ece486bb46d7712c Reviewed-on: https://skia-review.googlesource.com/5223 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "make it illegal to include SkXfermode.h"Gravatar Greg Daniel2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 07764cefbb18041a77897df3453903b0a2016583. Reason for revert: breaking google3 Original change's description: > make it illegal to include SkXfermode.h > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5133 > > Change-Id: I6e8596dcb17cd7e8efa67859bb682bf9bfcac4db > Reviewed-on: https://skia-review.googlesource.com/5133 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I136f9e533eb60633c49dffa19b5747d50b6d98a8 Reviewed-on: https://skia-review.googlesource.com/5196 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* make it illegal to include SkXfermode.hGravatar Mike Reed2016-11-23
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5133 Change-Id: I6e8596dcb17cd7e8efa67859bb682bf9bfcac4db Reviewed-on: https://skia-review.googlesource.com/5133 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* remove xfermode from public apiGravatar Mike Reed2016-10-28
| | | | | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4020 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac Reviewed-on: https://skia-review.googlesource.com/4020 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Replace a lot of 'static const' with 'constexpr' or 'const'.Gravatar mtklein2016-09-01
| | | | | | | | | | | | | | | | | | | | | | | 'static const' means, there must be at most one of these, and initialize it at compile time if possible or runtime if necessary. This leads to unexpected code execution, and TSAN* will complain about races on the guard variables. Generally 'constexpr' or 'const' are better choices. Neither can cause races: they're either intialized at compile time (constexpr) or intialized each time independently (const). This CL prefers constexpr where possible, and uses const where not. It even prefers constexpr over const where they don't make a difference... I want to have lots of examples of constexpr for people to see and mimic. The scoped-to-class static has nothing to do with any of this, and is not changed. * Not yet on the bots, which use an older TSAN. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005 Review-Url: https://codereview.chromium.org/2300623005
* add gm that exercises compose shader allocationsGravatar caryclark2016-08-15
| | | | | | | | | | | | This gm triggers the assert in SkSmallAllocator.h commented out by this CL. PDFium constructs shaders that resemble the GM. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249703002 Review-Url: https://codereview.chromium.org/2249703002
* switch xfermodes over to sk_spGravatar reed2016-03-29
| | | | | | | | | waiting on https://codereview.chromium.org/1835163002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1832223002 Review URL: https://codereview.chromium.org/1832223002
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* partial switch over to sp usage of shadersGravatar reed2016-03-09
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1776973003 Review URL: https://codereview.chromium.org/1776973003
* make SkComposeShader.h privateGravatar reed2016-02-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1697523003 Review URL: https://codereview.chromium.org/1697523003
* Remove work from constructors to facilitate debugging.Gravatar herb2016-01-08
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1562093002 Review URL: https://codereview.chromium.org/1562093002
* handle halfway case in scan converterGravatar caryclark2016-01-04
| | | | | | | | | | | | | | | | | Scan edges that start at exactly -0.5 aren't trimmed by clipping or by rounding, triggering a debug assert. One way to fix this is to round the top and left down instead of up. Also, move the path initialization of gm/composeshader.cpp to make debugging other path problems easier. R=reed@google.com BUG=skia:2715 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1544873002 Review URL: https://codereview.chromium.org/1544873002
* Will try composing a linear gradient with a color bitmap as well as an ↵Gravatar wangyix2015-09-03
| | | | | | | | alpha8 bitmap to make sure the paint's color is being used/ignored in the right places. BUG=skia:4182 Review URL: https://codereview.chromium.org/1311043008
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* 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
* 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
* Add always-threaded SkRecord quilt tests.Gravatar mtklein2014-07-07
| | | | | | | | | | | | | | | | | | | | | Now that we're drawing tiles threaded like implside painting, remove the checks that those lock counts are balanced. They're just not right for anyone anymore. SkBitmaps themselves are not threadsafe (even const ones), so shallow copy them on playback of an SkRecord. (The underlying SkPixelRefs are threadsafe.) Simplify quilt drawing by using SkBitmap::extractSubset. No need for locking. Bump up to 256x256 tiles. 16x16 tiles just murders performance (way too much contention). This has the nice side effect of letting us enable a bunch more GMs for quilt mode; they drew wrong with small tiles but exactly right with large. BUG=171776 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/371023005
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-05-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14584 2bbb7eff-a529-9590-31e7-b0007b416f81
* suppress new composeshader gm for quilt testingGravatar reed@google.com2014-05-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14579 2bbb7eff-a529-9590-31e7-b0007b416f81
* change composeshader_alpha to exercise srcover as wellGravatar commit-bot@chromium.org2014-05-05
| | | | | | | | | | | BUG=skia: R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/263083011 git-svn-id: http://skia.googlecode.com/svn/trunk@14572 2bbb7eff-a529-9590-31e7-b0007b416f81
* new gm for composeshader, exercising alphaGravatar commit-bot@chromium.org2014-05-05
| | | | | | | | | | | BUG=skia: R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/262193004 git-svn-id: http://skia.googlecode.com/svn/trunk@14567 2bbb7eff-a529-9590-31e7-b0007b416f81
* Turn on quilt mode in DM.Gravatar commit-bot@chromium.org2014-04-30
| | | | | | | | | | | | | | | | | | - Rename TileGrid -> Quilt to avoid the name overload. - Tag all failing GMs with kSkipTiled_Flag. You may be wondering, do any GMs pass? Yes, some do! And that trends towards all of them as we increase --quiltTile. Two GMs only fail in --quilt mode in 565. Otherwise all GMs which fail are skipped, and those which don't fail aren't. (The 8888 variants of those two GMs are skipped even though they pass.) BUG=skia:2477 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/256373002 git-svn-id: http://skia.googlecode.com/svn/trunk@14457 2bbb7eff-a529-9590-31e7-b0007b416f81
* resize canvas for GM + typoGravatar commit-bot@chromium.org2014-04-14
| | | | | | | | | | | | | This change resized the canvas for some GM cases. It is better to show the visual difference in viewer.html for these cases after the CL applied. BUG=skia:2375 R=reed@google.com, djsollen@google.com Author: yunchao.he@intel.com Review URL: https://codereview.chromium.org/221953002 git-svn-id: http://skia.googlecode.com/svn/trunk@14177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide static global initializers for SkColorTable and SkComposeShader.Gravatar scroggo2012-07-02
| | | | | | | | | | This makes some GMs which were broken on Android work. Reenable them on Android. Also fix a typo in gmmain. Review URL: https://codereview.appspot.com/6344069 git-svn-id: http://skia.googlecode.com/svn/trunk@4426 2bbb7eff-a529-9590-31e7-b0007b416f81
* Disable pipe playback on android for composeshader GM.Gravatar scroggo@google.com2012-06-29
| | | | | | Review URL: https://codereview.appspot.com/6349058 git-svn-id: http://skia.googlecode.com/svn/trunk@4409 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow composeshader GM to run PDF.Gravatar scroggo@google.com2012-06-29
| | | | | | Review URL: https://codereview.appspot.com/6373043 git-svn-id: http://skia.googlecode.com/svn/trunk@4408 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create a new GM to exercise ComposeShader.Gravatar scroggo@google.com2012-06-29
Code borrowed from samplecode/SampleShaders.cpp Review URL: https://codereview.appspot.com/6371043 git-svn-id: http://skia.googlecode.com/svn/trunk@4407 2bbb7eff-a529-9590-31e7-b0007b416f81