aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/showmiplevels.cpp
Commit message (Collapse)AuthorAge
* Fix clang warning about unused lambda capture.Gravatar Brian Salomon2017-01-26
| | | | | | | | | This was found by a tip of tree build of clang. Change-Id: I9aa3fecd47ae69350e8d58e796f960a991b7759e Reviewed-on: https://skia-review.googlesource.com/7586 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Implement sk_tool_utils::copy_to_g8(), used by gmsGravatar Matt Sarett2017-01-19
| | | | | | | | | BUG=skia: Change-Id: Ic5b2b07fb3f408edf1f2b982235424c22795fe50 Reviewed-on: https://skia-review.googlesource.com/7187 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Reland "Add SkImageInfoValidConversion() and SkImageInfoIsValid"Gravatar Matt Sarett2017-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original is at: https://skia-review.googlesource.com/c/6887/ The only change to the original is to temporarily comment out a check in SkImageInfoPriv.h until a Chrome unit test can be fixed. The idea is share these standards for the following: SkImage::readPixels() SkCanvas::readPixels() SkCanvas::writePixels() SkBitmap::readPixels() SkPixmap::readPixels() On the raster side, SkPixmap::readPixels() is the right place to check, because all raster calls go through there eventually. Then at lower levels (ex: SkPixelInfo), we can assert. There's not really a unifying location for gpu calls, so I've added this in multiple places. I haven't really dug into the gpu code to SkASSERT() on invalid cases that we will have already caught. Follow-up work: Similar refactor for SkReadPixelRec::trim(). Code cleanup in SkPixelInfo::CopyPixels() BUG=skia:6021 Change-Id: I6a16f9479bc09e3c87e10c72b0378579f1a70866 Reviewed-on: https://skia-review.googlesource.com/7104 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add SkImageInfoValidConversion() and SkImageInfoIsValid"Gravatar Brian Osman2017-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cf5d6caff7a58f1c7ecc36d9a91ccdada5fc7b78. Reason for revert: Chrome DEPS roll failing, based on the unit tests, I suspect this is the cause. Original change's description: > Add SkImageInfoValidConversion() and SkImageInfoIsValid > > The idea is share these standards for the following: > SkImage::readPixels() > SkCanvas::readPixels() > SkCanvas::writePixels() > SkBitmap::readPixels() > SkPixmap::readPixels() > > On the raster side, SkPixmap::readPixels() is the right > place to check, because all raster calls go through > there eventually. Then at lower levels (ex: SkPixelInfo), > we can assert. > > There's not really a unifying location for gpu calls, > so I've added this in multiple places. I haven't really > dug into the gpu code to SkASSERT() on invalid cases > that we will have already caught. > > Follow-up work: > Similar refactor for SkReadPixelRec::trim(). > Code cleanup in SkPixelInfo::CopyPixels() > > BUG=skia:6021 > > Change-Id: I91ecce10e46c1a6530f0af24a9eb8226dbecaaa2 > Reviewed-on: https://skia-review.googlesource.com/6887 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia:6021 Change-Id: I63b88e90bdbb3051a14de00ac73a8351ab776d25 Reviewed-on: https://skia-review.googlesource.com/7095 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add SkImageInfoValidConversion() and SkImageInfoIsValidGravatar Matt Sarett2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is share these standards for the following: SkImage::readPixels() SkCanvas::readPixels() SkCanvas::writePixels() SkBitmap::readPixels() SkPixmap::readPixels() On the raster side, SkPixmap::readPixels() is the right place to check, because all raster calls go through there eventually. Then at lower levels (ex: SkPixelInfo), we can assert. There's not really a unifying location for gpu calls, so I've added this in multiple places. I haven't really dug into the gpu code to SkASSERT() on invalid cases that we will have already caught. Follow-up work: Similar refactor for SkReadPixelRec::trim(). Code cleanup in SkPixelInfo::CopyPixels() BUG=skia:6021 Change-Id: I91ecce10e46c1a6530f0af24a9eb8226dbecaaa2 Reviewed-on: https://skia-review.googlesource.com/6887 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Rename SkSourceGammaTreatment to SkDestinationSurfaceColorModeGravatar Brian Osman2016-11-09
| | | | | | | | | | | | | | | This is much more explicit about what that type represents (are we in legacy mode or not), which also makes it suitable for other (upcoming) usage. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4529 Change-Id: Iacb397c34e7765f1ca86c0195bc622b2be4d9acf Reviewed-on: https://skia-review.googlesource.com/4529 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* gm: s/SkAutoTUnref/sk_sp/Gravatar Hal Canary2016-11-07
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4434 Change-Id: Ib2bea321617a17012190b33f2c7c439a5b6b3025 Reviewed-on: https://skia-review.googlesource.com/4434 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Move work from ctor to onOnceBeforeDraw in ShowMipLevel GMsGravatar robertphillips2016-08-26
| | | | | | | | These were making debugging stroking more difficult than necessary GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2285813002 Review-Url: https://codereview.chromium.org/2285813002
* respect srgb gamma when building mipsGravatar reed2016-06-10
| | | | | | | | | | | Proposed policy: - If the target is *legacy* (e.g. L32/PMColor) ignore gamma - If the target is S32/F16 respect gamma BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2029373004 Review-Url: https://codereview.chromium.org/2029373004
* 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
* Remove uses of SkImageDecoder from gmsGravatar msarett2016-03-18
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1791583002 Committed: https://skia.googlesource.com/skia/+/d427266a58af7e6ea6c12c9cd56ade3e179a0c04 Review URL: https://codereview.chromium.org/1791583002
* Revert of Remove uses of SkImageDecoder from gms (patchset #2 id:20001 of ↵Gravatar bungeman2016-03-17
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1791583002/ ) Reason for revert: Suspected of causing assertion failures in unrelated tests on Windows. Original issue's description: > Remove uses of SkImageDecoder from gms > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1791583002 > > Committed: https://skia.googlesource.com/skia/+/d427266a58af7e6ea6c12c9cd56ade3e179a0c04 TBR=scroggo@google.com,reed@google.com,msarett@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/1806383002
* Remove uses of SkImageDecoder from gmsGravatar msarett2016-03-17
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1791583002 Review URL: https://codereview.chromium.org/1791583002
* SkNx: kth<...>() -> [...]Gravatar mtklein2016-02-21
| | | | | | | | | | Just some syntax cleanup. No real change: kth<...>() was calling [...] already. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1714363002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1714363002
* Relocate anisotropic mipmap logic to SkMipMap::extractLevel()Gravatar fmalita2016-02-09
| | | | | | | | | Pass a full x/y scale and defer the anisotropic heuristic to SkMipMap. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686563002 Review URL: https://codereview.chromium.org/1686563002
* use pixmaps in mipmap apiGravatar reed2016-01-16
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1598803002 Review URL: https://codereview.chromium.org/1598803002
* use triangle filter for odd dimensions in mip-levelsGravatar reed2016-01-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1592473002 Review URL: https://codereview.chromium.org/1592473002
* add GM to show miplevels for all colortypesGravatar reed2016-01-15
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1594613002 TBR= Review URL: https://codereview.chromium.org/1594613002
* expand gm to exercise miplevels and various scalersGravatar reed2016-01-14
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574233003 TBR= Review URL: https://codereview.chromium.org/1574233003