aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/bitmaprect.cpp
Commit message (Collapse)AuthorAge
* 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>
* Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar reed2016-10-05
| | | | | | | | | | | This reverts commit c245574ba3d0e2ade6c94b2812de3baa383bf4c4. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002 TBR= Review-Url: https://codereview.chromium.org/2396953002
* Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8. Reason for revert: new assert from 100K bot Original change's description: > Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints" > > - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter > This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 > > Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 > Reviewed-on: https://skia-review.googlesource.com/2992 > 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: I848e5a69c5cd67f2c14889f4f0a346652578c4ff Reviewed-on: https://skia-review.googlesource.com/3023 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 Reviewed-on: https://skia-review.googlesource.com/2992 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a. Reason for revert: failing to deserialize some of the 100K Original change's description: > Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints" > > This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 > > Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a > Reviewed-on: https://skia-review.googlesource.com/2924 > 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: I1805a57eef5ebcac203da5989c8539345ecf806f Reviewed-on: https://skia-review.googlesource.com/2962 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a Reviewed-on: https://skia-review.googlesource.com/2924 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in ↵Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paints""" This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10. legacy (100K) skp failure Original change's description: > Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"" > > This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 > > Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 > Reviewed-on: https://skia-review.googlesource.com/2878 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=msarett@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5 Reviewed-on: https://skia-review.googlesource.com/2881 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 Reviewed-on: https://skia-review.googlesource.com/2878 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135. Reason for revert: <INSERT REASONING HERE> Original change's description: > replace SkXfermode obj with SkBlendMode enum in paints > > BUG=skia:5814 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 > > Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 > Reviewed-on: https://skia-review.googlesource.com/2714 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7 Reviewed-on: https://skia-review.googlesource.com/2871 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* replace SkXfermode obj with SkBlendMode enum in paintsGravatar Mike Reed2016-10-03
| | | | | | | | | | | | BUG=skia:5814 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 Reviewed-on: https://skia-review.googlesource.com/2714 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> 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
* 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
* Use DEF_GM everywhereGravatar scroggo2015-12-10
| | | | | | BUG=skia:1902 Review URL: https://codereview.chromium.org/1518893002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* flag to use const& instead of const* for src-rectGravatar reed2015-08-06
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1272713005
* make tests portable by using 565 compatible colorsGravatar caryclark2015-07-29
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1262703002
* Revert[2] of guard to remove DrawBitmapRectFlagsGravatar reed2015-07-17
| | | | | | | | | This reverts commit 91110195a2eee170c11885da9d16f94b00a39f87. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1240753003
* Revert of guard to remove DrawBitmapRectFlags (patchset #1 id:1 of ↵Gravatar scroggo2015-07-17
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1235393003/) Reason for revert: breaking android framework build Original issue's description: > guard to remove DrawBitmapRectFlags > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/6fb0b6779e40ce05c20cf279f0ecff31fa3cd60d TBR=fmalita@chromium.org,djsollen@google.com,reed@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1230823007
* guard to remove DrawBitmapRectFlagsGravatar reed2015-07-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1235393003
* add src-rect-constraint to drawImageRectGravatar reed2015-07-14
| | | | | | | | | | | Follow-on work - unify around SrcRectConstraint (i.e. drawBitmapRect) - remove silly drawBitmapRectToRect alias - clean-up (possibly remove) alias problems around drawBitmapRect + IRect parameter BUG=skia: Review URL: https://codereview.chromium.org/1228083004
* pass legal premul values to bitmap -- do we still need this GM?Gravatar reed2015-04-02
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1052083004
* 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 gm to not rely on SkColor's swizzle == SkPMColor'sGravatar reed2015-01-27
| | | | | | BUG=skia:3361 Review URL: https://codereview.chromium.org/873983009
* remove unused GM flagsGravatar mtklein2015-01-23
| | | | | | | | | | Depends on https://codereview.chromium.org/873753002/ Thumbs up to CLion for refactoring this for me. BUG=skia: Review URL: https://codereview.chromium.org/867963004
* 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
* pass dst-rect through from drawBitmapRect for better precisionGravatar reed2014-12-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/797963002
* add gm to test rounding between clips and drawBitmapRectGravatar reed2014-12-01
| | | | | | BUG=skia:3179 Review URL: https://codereview.chromium.org/766333002
* Revert to enabling all of -O2 as it exposes a bug in the toolchain.Gravatar djsollen2014-09-03
| | | | | | | | | | | | Instead as a workaround we will temporarily disable tiling the few GMs that produce errors with the existing 64-bit ARM toolchain. BUG=skia:2908 R=mtklein@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/537713002
* using real tiles when simulating tilingGravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | BUG=skia: R=mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/303403003 git-svn-id: http://skia.googlecode.com/svn/trunk@14993 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* Fixed remaining clang compiler warningsGravatar robertphillips@google.com2012-12-03
| | | | | | | | https://codereview.appspot.com/6865053/ git-svn-id: http://skia.googlecode.com/svn/trunk@6646 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed memory leak in bitmaprect GMGravatar robertphillips@google.com2012-10-02
| | | | | | | | https://codereview.appspot.com/6593058/ git-svn-id: http://skia.googlecode.com/svn/trunk@5763 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed bug in drawing of large bitmapsGravatar robertphillips@google.com2012-10-01
| | | | | | | | https://codereview.appspot.com/6595047/ git-svn-id: http://skia.googlecode.com/svn/trunk@5745 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-09-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5705 2bbb7eff-a529-9590-31e7-b0007b416f81
* Disable memory intensive drawBitmapRectToRect tests on AndroidGravatar robertphillips@google.com2012-09-26
| | | | | | | | http://codereview.appspot.com/6567052/ git-svn-id: http://skia.googlecode.com/svn/trunk@5691 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added more drawBitmapRectToRect testsGravatar robertphillips@google.com2012-09-26
| | | | | | | | http://codereview.appspot.com/6564053/ git-svn-id: http://skia.googlecode.com/svn/trunk@5688 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkCanvas::setDevice() must die, and so we begin by removing our ownGravatar mike@reedtribe.org2012-09-26
| | | | | | | | references to setBitmapDevice() (gotta walk before we can run) git-svn-id: http://skia.googlecode.com/svn/trunk@5680 2bbb7eff-a529-9590-31e7-b0007b416f81
* re-re-land 5578Gravatar reed@google.com2012-09-18
| | | | | | | | will follow w/ new .skp files to keep the waterfall green (I hope) git-svn-id: http://skia.googlecode.com/svn/trunk@5584 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 5580Gravatar reed@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5581 2bbb7eff-a529-9590-31e7-b0007b416f81
* re-land 5578 w/ pipe fixGravatar reed@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5580 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 5578 -- broke pipeGravatar reed@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5579 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change drawBitmapRect to take a float-src-rect instead of integer-src-rect. ThisGravatar reed@google.com2012-09-18
allows the client more control over the scaling. Because of virtual overrides and wanting to keep the old call-sites up and running, this CL renames the virtual entry-point to drawBitmapRectToRect, and downgrades drawBitmapRect to a non-virtual helper function. The implementation is to use the float-rect for computing the matrix, but still cons-up an integer rect for the purposes of subsetting the original bitmap. We do this by calling float_src->roundOut(&int_src) so that we include all (partially) covered src pixels. No change needed on SkDevice, since that signature is explicitly passed the computed matrix. Review URL: https://codereview.appspot.com/6501140 git-svn-id: http://skia.googlecode.com/svn/trunk@5578 2bbb7eff-a529-9590-31e7-b0007b416f81