aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
...
* Add mulHi to SkNxGravatar Herb Derby2017-10-11
| | | | | | | | | | | | | Add mulHi to base SkNx, and specialize implementations for Sk4u for neon and sse. Add casts for converting from uint8_t by 4 to uint32_t by 4. Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I29a32e2ad9812a47fff841ceca334e562362836f Reviewed-on: https://skia-review.googlesource.com/57960 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* clone saturating cast code for doublesGravatar Mike Reed2017-10-10
| | | | | | | | Bug: skia: Change-Id: I4f35413995cf73c6f130476d6b36e530120aa7ed Reviewed-on: https://skia-review.googlesource.com/57901 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* SkPDF: consolidate two functions in SkPDFObjNumMapGravatar Hal Canary2017-10-10
| | | | | | | Change-Id: Id815920e664ba986258867b7c35a7618a6927b0f Reviewed-on: https://skia-review.googlesource.com/54360 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Small pathops cleanup.Gravatar Ben Wagner2017-10-09
| | | | | | | | | | | | | | | | | | Newer clang compiler produces the diagnostic ../../tests/PathOpsDebug.cpp:1349:44: error: comparison of unsigned enum expression >= 0 is always true [-Werror,-Wtautological-unsigned-enum-zero-compare] if (!firstOp && c->operand() && op >= 0) { The check seems to be defending against bad values of SkPathOp, but this now seems unnecessary. This also adds 'rdiff' to kPathOpStr for future debugging. Change-Id: I08e5ba77c56e519ce4d9ae89491f7ccd5eb7f944 Reviewed-on: https://skia-review.googlesource.com/57104 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove trailing whitespace.Gravatar Ben Wagner2017-10-09
| | | | | | | | | | | Also adds a presubmit to prevent adding trailing whitespace to source code in the future. Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6 Reviewed-on: https://skia-review.googlesource.com/57380 Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Revert "Disable GL buffer mapping on TSAN/Mac.""Gravatar Brian Salomon2017-10-09
| | | | | | | | | | This reverts commit 4e7cdd5a0052aa76bed6f80ec325be19e09e6ab1. Bug: skia:7058 Change-Id: I3b92c35835cf7a8c04e9218194bf293b790413e0 Reviewed-on: https://skia-review.googlesource.com/57222 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* use new computeByteSize apiGravatar Mike Reed2017-10-09
| | | | | | | Bug: skia: Change-Id: I92ddb7768ace21afa45b3c2b07db556bf42f4f50 Reviewed-on: https://skia-review.googlesource.com/57261 Reviewed-by: Derek Sollenberger <djsollen@google.com>
* initClassID no longer auto-allocates idsGravatar Ethan Nicholas2017-10-09
| | | | | | | | | | | | | Auto-allocated IDs mean that the IDs depend upon the order in which classes happen to get initialized and are therefore not consistent from run to run. This change paves the way for a persistent shader cache by fixing the IDs in an enum. Bug: skia: Change-Id: I3e923c6c54f41b3b3eb616458abee83e0909c09f Reviewed-on: https://skia-review.googlesource.com/56401 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Disable GL buffer mapping on TSAN/Mac."Gravatar Brian Salomon2017-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c203e65265ccf0dcf426eafa4fae97b2b99cba7d. Reason for revert: <INSERT REASONING HERE> Original change's description: > Disable GL buffer mapping on TSAN/Mac. > > Also reverts 65e706379657d64371012c2e95ccf1354d741145 which disabled buffer mapping in GrResourceProvider::createPatternedIndexBuffer. > > Bug: skia:7058 > Change-Id: I6816abe53251e1cd8e92eae41b8cdbe45218a341 > Reviewed-on: https://skia-review.googlesource.com/50100 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=mtklein@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Icf0cf40ba4d6e7081971eee2eea0a41033790df7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7058 Reviewed-on: https://skia-review.googlesource.com/57220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Disable GL buffer mapping on TSAN/Mac.Gravatar Brian Salomon2017-10-09
| | | | | | | | | | Also reverts 65e706379657d64371012c2e95ccf1354d741145 which disabled buffer mapping in GrResourceProvider::createPatternedIndexBuffer. Bug: skia:7058 Change-Id: I6816abe53251e1cd8e92eae41b8cdbe45218a341 Reviewed-on: https://skia-review.googlesource.com/50100 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove SkTypeface::Style use in API.Gravatar Ben Wagner2017-10-09
| | | | | | | | | | | | | All known callers of SkTypeface::MakeDefault call it with kNormal and the only users specifying kNormal explicitly are in Skia, so remove the parameter. There appear to be no users of SkTypeface::MakeFromTypeface, so remove it. The current alternative is SkFontMgr::matchFaceStyle which can do a better job anyway. Change-Id: I89d94c77f9593407b0a319786848a8b823fcbae4 Reviewed-on: https://skia-review.googlesource.com/56762 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* CCPR: Add workaround for PowerVR crashGravatar Chris Dalton2017-10-06
| | | | | | | | Bug: skia: Change-Id: Icd00f81fda5366813f9c959fdc91b0415894cbfc Reviewed-on: https://skia-review.googlesource.com/55360 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add option to create a deferred render target context with mipsGravatar Greg Daniel2017-10-06
| | | | | | | | | | | | | | We need this since we have texture generators that draw the base level but nothing more. Thus we want them to be able to directly draw into a pre allocated mipped target instead of doing a copy later. TBR: bsalomon@google.com Bug: skia: Change-Id: I1dfae0da7153b21b30fdfa51a7061fc255739a1e Reviewed-on: https://skia-review.googlesource.com/54100 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add a cap for geometry shader invocationsGravatar Chris Dalton2017-10-06
| | | | | | | | | Bug: skia:7116 Change-Id: I3cc2ce7b2e5123c9adfd9781b2a5a8553747dfa5 Reviewed-on: https://skia-review.googlesource.com/56000 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Don't execute onFlush op lists until after GPU data is uploadedGravatar Chris Dalton2017-10-06
| | | | | | | | Bug: skia: Change-Id: Ide85e802fd6e6a19412457dbaded3545b962c240 Reviewed-on: https://skia-review.googlesource.com/55562 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* add constexpr to SkRect, SkIRect Make functionsGravatar Cary Clark2017-10-05
| | | | | | | | | | | | | Also, doing so exposed a couple of unused variables in tests. R: bsalomon@google.com Bug: skia: 6898 Change-Id: I7b065e26a838fe55a1d772bcefaef5325e1baa61 Reviewed-on: https://skia-review.googlesource.com/55680 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* Sever fOriginalPath connection whenever a GrShape becomes a simple typeGravatar Brian Osman2017-10-04
| | | | | | | | | | | | | | When drawing a round-rect, for example, we may end up in drawPath with a temporary path that was created with the rrect added. We ended up putting a genID listener on that (stack allocated) path, so we would evict cache entries immediately. This restores the old behavior, where cache entries for paths derived from simple types are never invalidated. Bug: skia:7087 Change-Id: I3eed9c3a289241bfe1e42036be3362f592256693 Reviewed-on: https://skia-review.googlesource.com/54460 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix path renderer cache test logic to account for other resourcesGravatar Brian Osman2017-10-04
| | | | | | | | Bug: skia: Change-Id: Iadf88cc07fac23544317166699138644218b38d1 Reviewed-on: https://skia-review.googlesource.com/55141 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Use SK_DISABLE_DEFERRED_PROXIES to only disable deferred proxies for ChromeGravatar Robert Phillips2017-10-04
| | | | | | | | | | | This relies on https://chromium-review.googlesource.com/c/chromium/src/+/700475 (Readd SK_DISABLE_DEFERRED_PROXIES flag) landing in Chrome first. It refines the changes made in: https://skia-review.googlesource.com/c/skia/+/54004 (Temporarily disable deferred texture proxies) Change-Id: I12af50349516d32f74cd7f7dfd25a668284f64fa Reviewed-on: https://skia-review.googlesource.com/55100 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "When flushing, reset flush state before op lists""Gravatar Greg Daniel2017-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f8bc0018bef9b3dc6362ac195111d01be66ed5fb. Reason for revert: disabling failing test Original change's description: > Revert "When flushing, reset flush state before op lists" > > This reverts commit 78bdee200c26520eb065728ae7c094b76ecaae66. > > Reason for revert: breaking PathRendererCacheTests.cpp unit test > > Original change's description: > > When flushing, reset flush state before op lists > > > > When we reset the flush state after executing the ops in a flush, we reset > > the stored pipelines which may be holding refs to resources in their processors. > > > > We want the resources that we wrote to in the op list to be freed last for caching > > LRU purposes. Thus we make sure to free all the pipeline resources first before > > resetting and freeing the op lists > > > > Bug: skia: > > Change-Id: I5b02e9b7532007b5854e906bf4d64e901e7e7e53 > > Reviewed-on: https://skia-review.googlesource.com/54760 > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,robertphillips@google.com > > Change-Id: If74a158e90316553a401386c8c7a6b3c2b29a7df > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/55080 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,robertphillips@google.com Bug: skia: Change-Id: Ibdfe37c1f9e54956bf1725d1d7474a69efcd7673 Reviewed-on: https://skia-review.googlesource.com/55102 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Mike Reed2017-10-03
| | | | | | | | | | This reverts commit 5a2e50edc51006ce91366e177a9d21a16775d7fd. Bug: skia: Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954 Reviewed-on: https://skia-review.googlesource.com/53900 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Make SkString reference counting thread/TSAN safe.Gravatar Ben Wagner2017-10-03
| | | | | | | | | BUG=skia:7107 Change-Id: I8ead98f7694faaed8e6f6f29b1fcd88501d36b66 Reviewed-on: https://skia-review.googlesource.com/54400 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove test suppresion for ANGLE GLPrograms testGravatar Brian Osman2017-10-03
| | | | | | | | | | | The NaN shader literal bug has been worked around, so lets get this test coverage back. Bug: skia:6842 Change-Id: I7b6b00972d9e00e49e5f2eccac9f2eda7fffbb6c Reviewed-on: https://skia-review.googlesource.com/54362 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Temporarily disable deferred texture proxiesGravatar Robert Phillips2017-10-02
| | | | | | | | Bug: 769760 Change-Id: Id4197a73737f3a8df9159d9eb081be094df1f731 Reviewed-on: https://skia-review.googlesource.com/54004 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bitmap/imageinfo/pixmap""" This reverts commit cd284c532376d16fcc4ed75baf3da65c3e4a2e95. Reason for revert: assert fired in SkMallocPixelRef.cpp:61: fatal error: "assert(info.computeByteSize(rowBytes) == info.getSafeSize(rowBytes))" google3 thinks it was from surface_rowbytes Original change's description: > Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"" > > This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. > > Bug: skia: > Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d > Reviewed-on: https://skia-review.googlesource.com/52665 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> TBR=fmalita@chromium.org,reed@google.com Change-Id: I41e3f7a3f791cc8183291847e783ed8a53bc91d2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/53802 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | bitmap/imageinfo/pixmap"" This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. Bug: skia: Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d Reviewed-on: https://skia-review.googlesource.com/52665 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Add unit test for pinned SkImagesGravatar Robert Phillips2017-09-29
| | | | | | | Change-Id: I2e14353bc865b5994cc90ad643a6a58604955957 Reviewed-on: https://skia-review.googlesource.com/53500 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Avoid uninitialized memory in readByteArrayAsDataGravatar Leon Scroggins III2017-09-28
| | | | | | | | | | | | | | | | | Bug: 769134 readByteArray can fail (due to not having enough available or due to the wrong alignment). If it does, do not return an uninitialized block of memory. Further, drop the initial size check, which is covered by readByteArray. Add a test. Change-Id: Ia101697c5bb1ca3ae3df1795f37a74b2f602797d Reviewed-on: https://skia-review.googlesource.com/52742 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Remove tolerance form SkClassifyCubicGravatar Chris Dalton2017-09-28
| | | | | | | | | | | | It's too inexact as-is. If the caller wants tolerance they can do their own with knowledge of the pixel grid. The homogeneous math is stable with infinities so it's really unnecessary here. Bug: skia:7073 Change-Id: I4dc34ad96b859a138714b6d4f8804fec4f89f17a Reviewed-on: https://skia-review.googlesource.com/51182 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Jim Van Verth2017-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88757dacd4f532a0f647c02ae0ee596d31ab5c68. Reason for revert: Still seems to be failing Chromium "telemetry_perf_unittests (with patch) on Android" on android_n5x_swarming_rel. Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Now with legacy behavior for allocpixels > > This was reverted, so the current CL is a "fix" on top of ... > https://skia-review.googlesource.com/c/skia/+/50980 > > Related update to Chrome (in preparation for this change) > https://chromium-review.googlesource.com/c/chromium/src/+/685719 > > Bug: skia: > Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 > Reviewed-on: https://skia-review.googlesource.com/51341 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> TBR=fmalita@chromium.org,reed@google.com Change-Id: I827a0ca1d1e3909e648fde3342cdb8601d34da8d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/52381 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Treat invalid indices as transparent in gifsGravatar Chris Blume2017-09-27
| | | | | | | | | | | | | | | Other browsers (including old Chrome) treat invalid palette indices as transparent for gifs. And there are gifs in the wild which rely on this. As an example, if the palette only has 64 entries (0-63) then index 64 is treated as transparent. BUG=skia:7069 Change-Id: I15e8919a953387506c9ac5945c3ae6a2b90189ab Reviewed-on: https://skia-review.googlesource.com/51100 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Chris Blume <cblume@google.com>
* Fix truncated webp imagesGravatar Leon Scroggins III2017-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: b/65290323 If a webp file is truncated such that no rows can be decoded, WebPIDecGetRGB does not initialize its "last_y" parameter. We use rowsDecoded (passed as last_y) to determine which remaining rows to fill. Check the return value of WebPIDecGetRGB. If it fails (returns null), or rowsDecoded is <= 0 (matching Chromium's check), return kInvalidInput, since there is nothing to draw. Note that this is a change in behavior for Android. Previously we would decode an empty webp to just a transparent/black rectangle, whereas now we simply fail. I think this is a change for the better. Add a test which truncates a file to have 0 rows available and attempts to decode it. msan verifies that we no longer depend on the uninitialized value. Stop attempting to test decoding subsets from an incomplete webp (in CodecTest.cpp). Unless we have decoded the portion covered by the subset, this will fail. Remove test images inc0.webp (from both dm/ and colorspace/) and inc1.webp. These just decode to transparent rectangles. Replace them with inc2.webp and inc3.webp, which decode part of the image and then have to fill with transparent. Change-Id: I64d40be91c574b45963f9a43d8dd8f4929dd2939 Reviewed-on: https://skia-review.googlesource.com/50303 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: James Zern <jzern@google.com>
* Handle instantiation of proxies with pending invalidation messagesGravatar Brian Osman2017-09-27
| | | | | | | | Bug: skia: Change-Id: Id6808734df2335c521d4a563122ceeca906b7601 Reviewed-on: https://skia-review.googlesource.com/52002 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-27
| | | | | | | | | | | | | | | | Now with legacy behavior for allocpixels This was reverted, so the current CL is a "fix" on top of ... https://skia-review.googlesource.com/c/skia/+/50980 Related update to Chrome (in preparation for this change) https://chromium-review.googlesource.com/c/chromium/src/+/685719 Bug: skia: Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 Reviewed-on: https://skia-review.googlesource.com/51341 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* changed vertex attribute precisions to be actual typesGravatar Ethan Nicholas2017-09-27
| | | | | | | | Bug: skia: Change-Id: Ic5555d9f1be7f24655bdea9f2a3677bfb128ef70 Reviewed-on: https://skia-review.googlesource.com/50221 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Greg Daniel2017-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98a6216b18b57c2f7a0d58f542c60503686aed69. Reason for revert: breaking the chrome roll. Looks like they may be writing data to create an image across all the row bytes and thus writing to unalloced data on the last row. Link to example failing bot: https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/539960 Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Previously we had size_t and uint64_t variations. > > The new (simpler) API always.. > - returns size_t, or 0 if the calculation overflowed > - returns the trimmed size (does not include rowBytes padding for the last row) > > Bug: skia: > Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e > Reviewed-on: https://skia-review.googlesource.com/50980 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Leon Scroggins <scroggo@google.com> TBR=mtklein@google.com,herb@google.com,scroggo@google.com,fmalita@chromium.org,reed@google.com Change-Id: I726f6ab1b36b14979ba6f37105e0a469b3f0dbc0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/51262 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* switched gl_Position and gl_PointSize to sk_*Gravatar Ethan Nicholas2017-09-26
| | | | | | | | Bug: skia: Change-Id: Ie7508991aa975c1400bac23ae49d81041a313968 Reviewed-on: https://skia-review.googlesource.com/51320 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Invalidate textures cached by SW path renderer when paths go awayGravatar Brian Osman2017-09-26
| | | | | | | | Bug: skia: Change-Id: Icfc2f1bd57c0cf7be54469b6d86cbd436b59155d Reviewed-on: https://skia-review.googlesource.com/51201 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove fIsMipMapped from GrSurfaceDescGravatar Greg Daniel2017-09-26
| | | | | | | | | | | Part 3 of 3 for relanding of https://skia-review.googlesource.com/c/skia/+/42083 Bug: skia: Change-Id: I98c5406015213df5d11a0101df8722da6845157e Reviewed-on: https://skia-review.googlesource.com/44464 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add ability to remove unique key from proxy and underlying surface.Gravatar Greg Daniel2017-09-26
| | | | | | | | Bug: skia: Change-Id: I66b891ce9ca35906fdbddb36f565b35b25825112 Reviewed-on: https://skia-review.googlesource.com/51240 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-26
| | | | | | | | | | | | | | | Previously we had size_t and uint64_t variations. The new (simpler) API always.. - returns size_t, or 0 if the calculation overflowed - returns the trimmed size (does not include rowBytes padding for the last row) Bug: skia: Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e Reviewed-on: https://skia-review.googlesource.com/50980 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add some asserts and explict setting of fIsMipMappedGravatar Greg Daniel2017-09-26
| | | | | | | | | | Part 2 of 3 for relanding of https://skia-review.googlesource.com/c/skia/+/42083 Bug: skia: Change-Id: Iddc2571d88486531c76ab47432c2a51f2ac79043 Reviewed-on: https://skia-review.googlesource.com/44463 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "migrate to sk_sp for SkFontMgr API""Gravatar Mike Reed2017-09-26
| | | | | | | | | | This reverts commit f40ae1a4b5365620463bd63b5140bd3fc78894a1. Bug: skia: Change-Id: I752606de92ea405d6e50219c98030409b00a2841 Reviewed-on: https://skia-review.googlesource.com/51160 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Invalidate path VBs when paths are destroyedGravatar Brian Osman2017-09-26
| | | | | | | | | | | | | | | | | | | For this to work, we need access to the "original" path, before any style was applied. To that end, add an original path to GrShape (and unit tests of that functionality). Then add a version of addGenIDChangeListener to GrShape, that propagates to the original path, and use that in tessellating path renderer. Includes unit tests of caching behavior in the PR, all of which failed without this change. Bug: skia: Change-Id: I98bb505f521e8ff07184f5c3fbd3c5fd1a22d3d5 Reviewed-on: https://skia-review.googlesource.com/50300 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "migrate to sk_sp for SkFontMgr API"Gravatar Mike Reed2017-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4bf296be2821d2bdd0afabae9fdfe18e7e9b59cb. Reason for revert: need guard for flutter Original change's description: > migrate to sk_sp for SkFontMgr API > > Bug: skia: > Change-Id: I1bf2a13537f67938cdc9956080065d10ea0bd1d8 > Reviewed-on: https://skia-review.googlesource.com/48740 > Commit-Queue: Ben Wagner <bungeman@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> TBR=bungeman@google.com,reed@google.com Change-Id: Ib0b2d00fcbcdb6131444f94d1046df6dae24f551 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/50940 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* migrate to sk_sp for SkFontMgr APIGravatar Mike Reed2017-09-25
| | | | | | | | Bug: skia: Change-Id: I1bf2a13537f67938cdc9956080065d10ea0bd1d8 Reviewed-on: https://skia-review.googlesource.com/48740 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Reland "Fix SkImageSource::filterBounds()" againGravatar Xianzhu Wang2017-09-25
| | | | | | | | | | | | | | | | | | | | | | | This relands commit cb4d58766668b003fea67798027fc25d84acd059 which was reverted by commit b6d2be1330f16fe05f1eed5abda927c0fbb50055 because the original CL broke some blink layout tests, and the first reland was reverted by commit because it broke filterfastbounds gm. This reland let SkImageSource::onFilterNodeBounds() return the dst rect with ctm applied when mapping forward or otherwise the default value. Original description: > Previously SkImageSource::filterBounds() uses the default > SkImageFilter::onFilterNodeBounds() which returns the input rect. > > Now override onFilterNodeBounds() in SkImageSource to return src > or dst rect (with transform applied). Change-Id: I4548981142b9a96beda8339d394cf9943c9f4c0f Reviewed-on: https://skia-review.googlesource.com/50420 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Fold clamp_{x,y} into the gathers.Gravatar Mike Klein2017-09-22
| | | | | | | | | | | | | | | | | | | All three image tile modes go through exclusive_clamp() and then a gather today, so we can move the work of exclusive_clamp() into eac gather_ stage, eliminating the need for clamp_{x,y} stages. Luckily, we've got a convenient place to bottleneck this, ptr_and_ix(), which works out the pointer and vector of indices to load for gathers. This deletes SkRasterPipeline_repeat_tiling unit test, which now no longer exactly makes sense. It tests that repeat_x does that clamp, but that's now done automatically outside that stage. Change-Id: I24637ef60921bec7aa00082984c0c6a49dd86ca9 Reviewed-on: https://skia-review.googlesource.com/50260 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* switched SkSL's temporary 'highfloat' type back to 'float'Gravatar Ethan Nicholas2017-09-22
| | | | | | | | Bug: skia: Change-Id: If0debae7318b6b5b4a7cb85d458996a09931127e Reviewed-on: https://skia-review.googlesource.com/48760 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove pre-attachment of stencil buffersGravatar Robert Phillips2017-09-21
| | | | | | | Change-Id: I4ef555a2b36cf3a0ec74e0ecf7e8ab4f8779df3e Reviewed-on: https://skia-review.googlesource.com/49740 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>