aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/DrawPathTest.cpp
Commit message (Collapse)AuthorAge
* Revert "Revert "IWYU for tests starting with 'D'.""Gravatar Ben Wagner2018-05-22
| | | | | | | | | This reverts commit edf8449d2c3663350b6b6e30d2fa4c70da02deef. Change-Id: Ibeedd9965855b3ccfe44486d15307bf3da15fd9c Reviewed-on: https://skia-review.googlesource.com/129516 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "IWYU for tests starting with 'D'."Gravatar Mike Klein2018-05-22
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b5f2897ab5be37e86ccce4ed474a2e02001a9040. Reason for revert: looks like this broke the build for DM in Google3. Need more include dirs there? Original change's description: > IWYU for tests starting with 'D'. > > Change-Id: I9189e4b56ce1635b627119733447c2ed4220753d > Reviewed-on: https://skia-review.googlesource.com/129319 > Reviewed-by: Herb Derby <herb@google.com> > Commit-Queue: Ben Wagner <bungeman@google.com> TBR=bsalomon@google.com,bungeman@google.com,herb@google.com Change-Id: I01aac7dae6114685a0652cbde3defccc8a42caea No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/129443 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* IWYU for tests starting with 'D'.Gravatar Ben Wagner2018-05-21
| | | | | | | Change-Id: I9189e4b56ce1635b627119733447c2ed4220753d Reviewed-on: https://skia-review.googlesource.com/129319 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Allow printf style var args for messages in REPORTER_ASSERT.Gravatar Brian Salomon2018-01-29
| | | | | | | | | Remove REPORTER_ASSERT_MESSAGE. Change-Id: I6d00715901159c93e22d182fe24aac92b5fdbcf4 Reviewed-on: https://skia-review.googlesource.com/100361 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* don't rely on canvas->readPixelsGravatar Mike Reed2017-07-21
| | | | | | | | Bug: skia:3216 Change-Id: I01a8d0083c79c0fe71fbc4d8cfdde4fa6e48b636 Reviewed-on: https://skia-review.googlesource.com/25741 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* deprecate odd variants of SkCanvas::readPixelsGravatar Mike Reed2017-04-17
| | | | | | | | | Bug: skia:6513 Change-Id: I51179a85f0912d3f899c368c30a943d346dd1d05 Reviewed-on: https://skia-review.googlesource.com/13589 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* abstract name of clipping ops, to transtion to a more restricted setGravatar reed2016-09-20
| | | | | | | | | | | SkRegion::Op --> SkCanvas::ClipOp (alias) --> SkClipOp pre-CL needed in chrome : https://codereview.chromium.org/2355583002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355483002 Review-Url: https://codereview.chromium.org/2355483002
* switch surface to sk_spGravatar reed2016-03-23
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1817383002
* Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of ↵Gravatar reed2016-03-18
| | | | | | | | | | | | | https://codereview.chromium.org/1813553005/ )" This reverts commit f28ad894272018fd2855e3f77ea1236ea0cce1c0. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813123003 TBR= Review URL: https://codereview.chromium.org/1813123003
* Revert of switch patheffects over to sk_sp (patchset #5 id:80001 of ↵Gravatar reed2016-03-18
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1813553005/ ) Reason for revert: some build breaks, possibly related to paint having to know what a patheffect is Original issue's description: > switch patheffects over to sk_sp > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813553005 > > Committed: https://skia.googlesource.com/skia/+/9fbee18f691a0afed1e38a851048ce06063505ed TBR=caryclark@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1817543002
* switch patheffects over to sk_spGravatar reed2016-03-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813553005 Review URL: https://codereview.chromium.org/1813553005
* Fix radii calculation code to handle large radii.Gravatar herb2016-01-11
| | | | | | | BUG=472147 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1569403002 Review URL: https://codereview.chromium.org/1569403002
* Revert of Fix handling of radii scaling to force the result to always be ↵Gravatar robertphillips2016-01-07
| | | | | | | | | | | | | | | | | | | | | | | | less (patchset #14 id:250001 of https://codereview.chromium.org/1567723004/ ) Reason for revert: Fear and doubt of NexusPlayer Original issue's description: > Fix handling of radii scaling to force the result to always be less > than a given side. > BUG=472147 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567723004 > > Committed: https://skia.googlesource.com/skia/+/f96bf1a2d091a917bb93f9e9a3a8d53bb39d068e TBR=reed@google.com,herb@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=472147 Review URL: https://codereview.chromium.org/1568063002
* Fix handling of radii scaling to force the result to always be lessGravatar herb2016-01-07
| | | | | | | | than a given side. BUG=472147 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567723004 Review URL: https://codereview.chromium.org/1567723004
* 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
* Reland of change all factories to return their base-class (patchset #1 id:1 ↵Gravatar reed2015-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1540203002/ ) Reason for revert: chrome changes have landed Original issue's description: > Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ ) > > Reason for revert: > need to update some chrome/blink call-sites > > Original issue's description: > > change all factories to return their base-class > > > > will watch DEPS roll to see if there are chrome sites needing updates > > > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002 > > > > TBR= > > > > Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34 > > TBR= > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/2d6ba6690f8951e152d8e793191b14afd52f5506 TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1533373002
* Revert of change all factories to return their base-class (patchset #1 id:1 ↵Gravatar reed2015-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1535353002/ ) Reason for revert: need to update some chrome/blink call-sites Original issue's description: > change all factories to return their base-class > > will watch DEPS roll to see if there are chrome sites needing updates > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002 > > TBR= > > Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34 TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1540203002
* change all factories to return their base-classGravatar reed2015-12-20
| | | | | | | | | | | will watch DEPS roll to see if there are chrome sites needing updates BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002 TBR= Review URL: https://codereview.chromium.org/1535353002
* Forward declare SkStrokeRec in SkPathEffectGravatar halcanary2015-09-15
| | | | Review URL: https://codereview.chromium.org/1312163008
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Remove canvas::NewRaster, and rename surface::NewRasterPMColor to N32PremulGravatar reed2014-12-10
| | | | | | | | | | patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001) BUG=skia: TBR= re-landing after chrome fixes have landed Review URL: https://codereview.chromium.org/784223007
* Revert of remove (dumb) canvas::NewRaster, and rename ↵Gravatar reed2014-12-09
| | | | | | | | | | | | | | | | | | | | | | | surface::NewRasterPMColor to N32Premul (patchset #3 id:40001 of https://codereview.chromium.org/790733003/) Reason for revert: need to update chrome first Original issue's description: > remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul > > patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001) > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/2c1605a1fbaa2e35a27399a34254fb1200ec2ae6 TBR=fmalita@google.com,fmalita@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/791763002
* remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to ↵Gravatar reed2014-12-09
| | | | | | | | | | N32Premul patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001) BUG=skia: Review URL: https://codereview.chromium.org/790733003
* Revert "Revert of add colortable support to imagegenerator ↵Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | | | | | | (https://codereview.chromium.org/304443003/)" Fix is to add colortable param to installPixels() This reverts commit 924205aaf2e0c3c65dda13e0eaccde3e7b2a5c40. BUG=skia: R=scroggo@google.com, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/300263005 git-svn-id: http://skia.googlecode.com/svn/trunk@14958 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove scaleToFit from DashPathEffectGravatar commit-bot@chromium.org2014-03-31
| | | | | | | | | | | BUG=skia: R=reed@google.com, bsalomon@google.com, scroggo@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/216493005 git-svn-id: http://skia.googlecode.com/svn/trunk@13999 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkCanvas::NewRaster factory -- a very common use-case in chromeGravatar commit-bot@chromium.org2014-02-27
| | | | | | | | | | | BUG=skia: R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/183533004 git-svn-id: http://skia.googlecode.com/svn/trunk@13617 2bbb7eff-a529-9590-31e7-b0007b416f81
* Factory methods for heap-allocated SkPathEffect and SkXfermode objects.Gravatar commit-bot@chromium.org2014-02-20
| | | | | | | | | | | | | | | | | | | | | | | This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkPathEffect, SkXfermode and their subclasses non-public and instead provides factory methods for creating these objects on the heap. We temporarily keep the constructors of the following classes public to not break Chrome/Blink: SkXfermode SkCornerPathEffect SkDashPathEffect BUG=skia:2187 R=scroggo@google.com, reed@google.com, mtklein@google.com, bungeman@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/166583002 git-svn-id: http://skia.googlecode.com/svn/trunk@13519 2bbb7eff-a529-9590-31e7-b0007b416f81
* replace setConfig+allocPixels with alloc-or-install-pixelsGravatar commit-bot@chromium.org2014-02-13
| | | | | | | | | | | BUG=skia: R=scroggo@google.com, halcanary@google.com, reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/164203003 git-svn-id: http://skia.googlecode.com/svn/trunk@13442 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup: Sanitize the order of includes under tests/Gravatar tfarina@chromium.org2014-01-24
| | | | | | | | | | | | | | | | Initially this was to make sure Test.h appeared after the Sk*.h includes. Patch generated by the following command line: $ ~/chromium/src/tools/sort-headers.py tests/*.cpp BUG=None TEST=tests R=robertphillips@google.com Review URL: https://codereview.chromium.org/145313004 git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floatsGravatar reed@google.com2013-12-17
| | | | | | | | | | | | | To keep the CL (slightly) managable, this does not make any changes to existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this time around. BUG= R=bsalomon@google.com, caryclark@google.com Review URL: https://codereview.chromium.org/117053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use DEFINE_TESTCLASS_SHORT macro in tests.Gravatar tfarina@chromium.org2013-12-12
| | | | | | | | | | | | | The three version of DEFINE_TESTCLASS macro is deprecated and thus just use the simple, short one. BUG=None TEST=out/Debug/tests R=mtklein@google.com, bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/100113004 git-svn-id: http://skia.googlecode.com/svn/trunk@12653 2bbb7eff-a529-9590-31e7-b0007b416f81
* promote SkImage::AlphaType to SkAlphaTypeGravatar reed@google.com2013-09-20
| | | | | | | | | BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/24130009 git-svn-id: http://skia.googlecode.com/svn/trunk@11421 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix state machine so we know simple only loops once, but we can call maprect ↵Gravatar reed@google.com2013-08-28
| | | | | | | | | | | | | | | in debug mode Revert "Revert of r10943." This reverts commit 9e83074cce521d3cc3b8b3a9b819a612a07d800a. BUG= R=tomhudson@google.com Review URL: https://codereview.chromium.org/23618005 git-svn-id: http://skia.googlecode.com/svn/trunk@10981 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of r10943.Gravatar rmistry@google.com2013-08-27
| | | | | | Review URL: https://codereview.chromium.org/23626002 git-svn-id: http://skia.googlecode.com/svn/trunk@10944 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkDeviceLooper to handle larger-than-fixedpointGravatar reed@google.com2013-08-27
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/23392006 git-svn-id: http://skia.googlecode.com/svn/trunk@10943 2bbb7eff-a529-9590-31e7-b0007b416f81
* New warning -> new pattern for fingers to learn for asserting failure.Gravatar mtklein@google.com2013-08-27
| | | | | | | | | | | | The Ubuntu Clang compile bot has a warning enabled now that yells about !"foo" before it breaks Chrome's build where the same warning is -Werror. BUG= R=reed@google.com Review URL: https://codereview.chromium.org/23586002 git-svn-id: http://skia.googlecode.com/svn/trunk@10937 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-08-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10929 2bbb7eff-a529-9590-31e7-b0007b416f81
* test drawing large-coord aa rectsGravatar reed@google.com2013-08-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10926 2bbb7eff-a529-9590-31e7-b0007b416f81
* Tests : Unused parameters cleanupGravatar sugoi@google.com2013-02-27
| | | | | | | I removed unused parameters in the tests wherever it was trivial to do so. I'm trying to get the easy ones out of the way before we get into more involved discussions around this. Review URL: https://codereview.appspot.com/7394055 git-svn-id: http://skia.googlecode.com/svn/trunk@7891 2bbb7eff-a529-9590-31e7-b0007b416f81
* add optional cull-rect to patheffects, so they can do less work if their resultsGravatar reed@google.com2013-01-24
| | | | | | | lie outside of the current clip-bounds (the cull rect). Review URL: https://codereview.appspot.com/7206044 git-svn-id: http://skia.googlecode.com/svn/trunk@7378 2bbb7eff-a529-9590-31e7-b0007b416f81
* eliminate all warnings in non-thirdparty code on macGravatar humper@google.com2013-01-07
| | | | | | | | | | | | | | | | Most of these issues were due to functions whose definitions appear in header files; I changed those functions to be 'static inline' instead of just 'static' or 'inline', which kills the warning for such functions. Other functions that were static or anonymous-namespaced but were unused in cpp files were probably called at some point but are no longer; someone who knows more than I do should probably scrub all the functions I either deleted or #if 0'ed out and make sure that the right thing is happening here. Lots of unused variables removed, and one nasty const issue handled. There remains a single warning in thirdparty/externals/cityhash/src/city.cc on line 146 related to a signed/unsigned mismatch. I don't know if we have control over this library so I didn't fix this one, but perhaps someone could do something about that one. BUG= Review URL: https://codereview.appspot.com/7067044 git-svn-id: http://skia.googlecode.com/svn/trunk@7051 2bbb7eff-a529-9590-31e7-b0007b416f81
* Limit the maximum number of dash segments per pathGravatar fmalita@google.com2012-12-17
| | | | | | | | | | | | | | https://crbug.com/165432 In order to avoid trivial out-of-memory exploits, cap path dashing at 1000000 segments per path. R=reed@google.com BUG= Review URL: https://codereview.appspot.com/6948063 git-svn-id: http://skia.googlecode.com/svn/trunk@6845 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use double precision when iterating in SkDashPathEffect::filterPath()Gravatar fmalita@google.com2012-12-12
| | | | | | | | | | | | | Extremely large path_length/dash_length ratios may cause us to loop indefinitely otherwise. R=reed@google.com BUG= Review URL: https://codereview.appspot.com/6926051 git-svn-id: http://skia.googlecode.com/svn/trunk@6773 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 II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
* Even when the pts are restricted to 32K values, we can still overflow computingGravatar reed@google.com2012-08-06
| | | | | | | | | | | a fixed-point coefficient for quadratics. To avoid this, we bias these coefficients, storing 1/2 of their actual value, and then apply the 2x unbias in updateQuadratic(). Fixes http://code.google.com/p/chromium/issues/detail?id=140803 Review URL: https://codereview.appspot.com/6450099 git-svn-id: http://skia.googlecode.com/svn/trunk@4960 2bbb7eff-a529-9590-31e7-b0007b416f81
* If we lose precision computing sum of the dash intervals, then we can have theGravatar reed@google.com2012-08-06
| | | | | | | | | | | | | | | same error when we subtract-in-a-loop with the phase. The result is that we can read past the end of the array. To fix this, we just pin the loop counter, and if we exhaust our intervals, we just treat the phase as 0. Not precisely the exact answer, but we aren't going to draw this dash correctly anyway, since it contains massive interval values that will be imprecise given our current float implementation. Fixes http://code.google.com/p/chromium/issues/detail?id=140642 Review URL: https://codereview.appspot.com/6458088 git-svn-id: http://skia.googlecode.com/svn/trunk@4959 2bbb7eff-a529-9590-31e7-b0007b416f81
* add test for http://code.google.com/p/chromium/issues/detail?id=131181Gravatar reed@google.com2012-06-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4266 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix bug (and add test) for drawing an inverse-path whose bounds do intersectGravatar reed@google.com2012-05-01
| | | | | | | | | the clip, but whose edges do not (e.g. a curve). We used to overdraw a section (and assert). git-svn-id: http://skia.googlecode.com/svn/trunk@3809 2bbb7eff-a529-9590-31e7-b0007b416f81