aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/arithmode.cpp
Commit message (Collapse)AuthorAge
* remove unused variants in imagefilter factoriesGravatar Mike Reed2017-06-19
| | | | | | | | Bug: skia: Change-Id: Ife12bfa1c16f9dd87b24f73d3b260b0d2f46c7df Reviewed-on: https://skia-review.googlesource.com/20207 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* add drawString helper to canvasGravatar Cary Clark2017-04-28
| | | | | | | | | | | | | | | | | | Many tests and examples use drawText with a guess of how long the text is in bytes, or a call to strlen(). Add a helper to SkCanvas to simplify these examples. Add another helper for SkString. R=reed@google.com Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2 Reviewed-on: https://skia-review.googlesource.com/13642 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* 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>
* Separate SkArithmeticImageFilter from SkXfermodeImageFilter.Gravatar Brian Salomon2017-01-09
| | | | | | | Change-Id: I145eed7276456b546ca5c66bc1a0f0f74a84f138 Reviewed-on: https://skia-review.googlesource.com/6728 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reenable GM:arithmodeGravatar fmalita2016-09-29
| | | | | | | | | Convert to SkXfermodeImageFilter and reenable. R=reed@google.com,robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2379873003 Review-Url: https://codereview.chromium.org/2379873003
* Revert "Revert "replace Arithmetic xfermode with imagefilter""Gravatar Mike Reed2016-09-27
| | | | | | | | | | | | | This reverts commit 10ff5bfa789b6b602464e8511fdf676c6f5b1bd4. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2680 TBR= Change-Id: Iac2f4d48d227ff426ccf02b7eae280f382ad3580 Reviewed-on: https://skia-review.googlesource.com/2680 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "replace Arithmetic xfermode with imagefilter"Gravatar Mike Reed2016-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4. Reason for revert: need to guard the no-gpu codepath Original issue's description: > replace Arithmetic xfermode with imagefilter > > chrome pre-cl: https://codereview.chromium.org/2369023002/ > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2595 > > Change-Id: Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4 > Reviewed-on: https://skia-review.googlesource.com/2595 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I761799b594a0379c6bf356e6abc73552c3d19480 Reviewed-on: https://skia-review.googlesource.com/2661 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* replace Arithmetic xfermode with imagefilterGravatar Mike Reed2016-09-26
| | | | | | | | | | | | | | chrome pre-cl: https://codereview.chromium.org/2369023002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2595 Change-Id: Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4 Reviewed-on: https://skia-review.googlesource.com/2595 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@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
* 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
* use Make instead of Create to return a shared shaderGravatar reed2016-03-08
| | | | | | | | | Partially updated call sites. Undefine the flag in SkSHader.h to convert the remaining sites. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1772463002 Review URL: https://codereview.chromium.org/1772463002
* Use DEF_GM everywhereGravatar scroggo2015-12-10
| | | | | | BUG=skia:1902 Review URL: https://codereview.chromium.org/1518893002
* The SkArithmeticMode_gpu GL filters support clamping to validGravatar ericrk2015-10-19
| | | | | | | | | | | | | | premultiplied colors, however the flag for whether or not to do this, which is present in their parent filters, is dropped when creating the GL implementations. This change adds logic to forward the value from the parent filter to the GL implementation. This makes GPU behavior match software and fixes a WebKit LayoutTest. See referenced bug. BUG=473186 Review URL: https://codereview.chromium.org/1410553002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* rename portable_typeface_always to portable_typefaceGravatar caryclark2015-07-24
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1257773002
* make arithmode bigtext colortype* degeneratesegments gm portableGravatar caryclark2015-07-17
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1235343004
* use platform-independent font for gmGravatar caryclark2014-06-23
| | | | | | | | | | | | | | Create a custom typeface and scaler to render simple paths the same on all platforms. GM tests are modified to explicitly select the custom typeface. R=reed@google.com, mtklein@google.com, bungeman@google.com TBR=reed Author: caryclark@google.com Review URL: https://codereview.chromium.org/348323003
* add legacy/helper allocN32Pixels, and convert gm to use itGravatar reed@google.com2014-01-25
| | | | | | | | | | | | This is an intermediate api, but might help us quickly get to a point where no one is creating bitmaps in a 2-step process (setConfig + alloc). BUG=skia: R=halcanary@google.com Review URL: https://codereview.chromium.org/140593005 git-svn-id: http://skia.googlecode.com/svn/trunk@13182 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect ↵Gravatar senorblanco@chromium.org2013-05-29
| | | | | | | | | | | | | | | | | exposed via asNewEffectOrCoeff(). Doing it this way required modifying the arithmode GM to use saveLayer()/restore() rather than creating an offscreen SkBitmap, since otherwise the compositing is always done in raster mode. Fixing that in turn exposed that SkArithmeticMode did not work in Picture mode, since it wasn't flattenable. Made it so. Note: this will require rebaselining the arithmode GM (again). R=bsalomon@google.com, reed@google.com Originally committed: https://code.google.com/p/skia/source/detail?r=9324 Reverted: https://code.google.com/p/skia/source/detail?r=9325 Review URL: https://codereview.chromium.org/16064002 git-svn-id: http://skia.googlecode.com/svn/trunk@9330 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Provide a GPU implementation of SkArithmeticMode, using a custom ↵Gravatar senorblanco@chromium.org2013-05-29
| | | | | | | | | | | | GrEffect exposed via asNewEffectOrCoeff()." This reverts commit b8ffe17b5c684f9cfff02285f27e6aa1f75c9b53. TBR=robertphillips Review URL: https://codereview.chromium.org/16115007 git-svn-id: http://skia.googlecode.com/svn/trunk@9325 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect ↵Gravatar senorblanco@chromium.org2013-05-29
| | | | | | | | | | | | | | exposed via asNewEffectOrCoeff(). Doing it this way required modifying the arithmode GM to use saveLayer()/restore() rather than creating an offscreen SkBitmap, since otherwise the compositing is always done in raster mode. Fixing that in turn exposed that SkArithmeticMode did not work in Picture mode, since it wasn't flattenable. Made it so. Note: this will require rebaselining the arithmode GM (again). R=bsalomon@google.com, reed@google.com Review URL: https://codereview.chromium.org/16064002 git-svn-id: http://skia.googlecode.com/svn/trunk@9324 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix alpha computation in SkArithmeticMode.Gravatar senorblanco@chromium.org2013-05-28
| | | | | | | | | | Note: this will require new baselines for the arithmode GM. R=reed@google.com Review URL: https://codereview.chromium.org/15917010 git-svn-id: http://skia.googlecode.com/svn/trunk@9302 2bbb7eff-a529-9590-31e7-b0007b416f81
* Defining new color constat for transparent colorGravatar junov@google.com2012-12-06
| | | | | | Review URL: https://codereview.appspot.com/6901044 git-svn-id: http://skia.googlecode.com/svn/trunk@6696 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part III of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6475053 git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warnings on Mac in gmGravatar caryclark@google.com2012-06-06
| | | | | | | | | | | | | | | | | | Fix these class of warnings: - unused functions - unused locals - sign mismatch - missing function prototypes - missing newline at end of file - 64 to 32 bit truncation The changes prefer to link in dead code in the debug build with 'if (false)' than to comment it out, but trivial cases are commented out or sometimes deleted if it appears to be a copy/paste error. Review URL: https://codereview.appspot.com/6305046 git-svn-id: http://skia.googlecode.com/svn/trunk@4185 2bbb7eff-a529-9590-31e7-b0007b416f81
* Towards enabling -Werror in skia on LinuxGravatar bsalomon@google.com2012-01-06
| | | | | | | | Review URL: http://codereview.appspot.com/5516044/ git-svn-id: http://skia.googlecode.com/svn/trunk@2983 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix positioning for scalar=fixed, still need to fix actual modeGravatar reed@google.com2011-12-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2862 2bbb7eff-a529-9590-31e7-b0007b416f81
* try to make it draw correctly in fixed pointGravatar reed@google.com2011-12-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2860 2bbb7eff-a529-9590-31e7-b0007b416f81
* add first cut at arithmetic modeGravatar mike@reedtribe.org2011-12-10
git-svn-id: http://skia.googlecode.com/svn/trunk@2849 2bbb7eff-a529-9590-31e7-b0007b416f81