aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* SkPngCodec: Do not return kInvalidConversion on corrupt pngGravatar Matt Sarett2017-04-26
| | | | | | | | | | | In this case, the fuzzer thinks there is a bug because we are returning kInvalidConversion for a corrupt png file. Bug: skia:6550 Change-Id: I33f588442f5eaa8a4d642e9328750779f9a9ef5d Reviewed-on: https://skia-review.googlesource.com/14324 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* broke up SkSLConstantFolding testGravatar Ethan Nicholas2017-04-26
| | | | | | | | Bug: skia: Change-Id: I496a6d1c82b4d3b6fdb34671de373c34abe90018 Reviewed-on: https://skia-review.googlesource.com/14321 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* remove to_2dot2 and from_2dot2Gravatar Mike Klein2017-04-26
| | | | | | | | | | The parametric_{r,g,b} stages are just as good now; under the hood it's all going through approx_powf. Change-Id: If7f3ae1e24fcee2ddb201c1d66ce1dd64820c89a Reviewed-on: https://skia-review.googlesource.com/14320 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Prevent creation of zero-sized proxiesGravatar Robert Phillips2017-04-26
| | | | | | | | | | | | | This wasn't seen locally b.c. it is an assert and I only ran release locally and the CQ also only runs release. I have added linux_trusty_blink_dbg as a try job. TBR=bsalomon@google.com Bug: 715392 Change-Id: I010626cb97e886d2fbfd767f948bc640f0534338 Reviewed-on: https://skia-review.googlesource.com/14361 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* sksl can now fold constant vector or matrix equality expressionsGravatar Ethan Nicholas2017-04-25
| | | | | | | | Bug: skia: Change-Id: Icaddae68e53ed3629bcdc04b5f0b541d9e4398e2 Reviewed-on: https://skia-review.googlesource.com/14260 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* Fix writePixels of sRGB data to legacy GPU surfaceGravatar Brian Osman2017-04-25
| | | | | | | | | | Adjusted unit test to verify this behavior. Bug: skia:6547 chromium:713632 chromium:713702 Change-Id: I6240937b2faf6ccb6adfc9477dc85ae961cdbbb7 Reviewed-on: https://skia-review.googlesource.com/14279 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* SkDiscardableMemoryPool: modernizeGravatar Hal Canary2017-04-25
| | | | | | | | | | * Use unique_ptr, sk_sp, SkAutoFree, using. * Rely on thread-safe static global initializion. Change-Id: I7c14e0e57622163b1b81b97a218b816fe6d02926 Reviewed-on: https://skia-review.googlesource.com/13818 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Improve the Codec_end test and add fixesGravatar Leon Scroggins III2017-04-25
| | | | | | | | | | | | | | | | | | | Better imitate the original Android bug. Create a stream with multiple images in it, and verify that it successfully decodes after decoding once. This exposes a bug in SkPngCodec, which did not work for interlaced images. Test more formats that also happen to succeed: ICO, BMP, and WBMP This explicitly does *not* attempt to fix sampled or subset decodes, which already stopped early when decoding as an optimization. Change-Id: Ib0b8918f14ba3fb0fa31e9c71c8100dcbeeb465f Reviewed-on: https://skia-review.googlesource.com/14104 Reviewed-by: Matt Sarett <msarett@google.com>
* Rm makeRenderTargetContext in favor of deferred version (take 3)Gravatar Robert Phillips2017-04-25
| | | | | | | | | | | This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) TBR=bsalomon@google.com Change-Id: If81f4d9fb889c091cd37ffde133d906fb3e37773 Reviewed-on: https://skia-review.googlesource.com/14027 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Split up opLists (take 2)"Gravatar Robert Phillips2017-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit df2bf213649e0b2bcb9402548af9976bbdf7a218. Reason for revert: Maybe AndroidOne timing out Original change's description: > Split up opLists (take 2) > > Reland of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) > > https://skia-review.googlesource.com/c/13860/ (Make InstancedRendering more opList-splitting friendly) has landed so this should be good for another attempt. > > Change-Id: Icc9998196587510328e0a9ca1b2ce42013a86c6c > Reviewed-on: https://skia-review.googlesource.com/13802 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I744f2a3145b294e5911862bb39d57ca33a1b9a5a Reviewed-on: https://skia-review.googlesource.com/14184 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove a print statement I meant to not check inGravatar Leon Scroggins III2017-04-24
| | | | | | | | | | TBR=msarett@google.com Change-Id: I8861e7b0c7e7135c872cbcd5a9b53531acdb30dd Reviewed-on: https://skia-review.googlesource.com/14181 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Fix decoding incomplete PNG imagesGravatar Leon Scroggins III2017-04-24
| | | | | | | | | | | | | | | If process_data is unable to read (and therefore process) as many bytes as it expects, process the bytes read before returning false. Fixes differences in Gold. Add a test that verifies that it is okay to call png_process_data with 0 bytes. (We could special case 0, but libpng already checks for 0.) Change-Id: Id500b9305ee3bb6a1a7e8fc70d4e723cb4742b55 Reviewed-on: https://skia-review.googlesource.com/14144 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Split up opLists (take 2)Gravatar Robert Phillips2017-04-24
| | | | | | | | | | | Reland of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) https://skia-review.googlesource.com/c/13860/ (Make InstancedRendering more opList-splitting friendly) has landed so this should be good for another attempt. Change-Id: Icc9998196587510328e0a9ca1b2ce42013a86c6c Reviewed-on: https://skia-review.googlesource.com/13802 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Reland "Make SkPngCodec only read as much of the stream as necessary"Gravatar Leon Scroggins III2017-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Originally uploaded as 13900.) Previously, SkPngCodec assumed that the stream only contained one image, which ended at the end of the stream. It read the stream in arbitrarily-sized chunks, and then passed that data to libpng for processing. If a stream contains more than one image, this may result in reading beyond the end of the image, making future reads read the wrong data. Now, SkPngCodec starts by reading 8 bytes at a time. After the signature, 8 bytes is enough to know which chunk is next and how many bytes are in the chunk. When decoding the size, we stop when we reach IDAT, and when decoding the image, we stop when we reach IEND. This manual parsing is necessary to support APNG, which is planned in the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which was a workaround for reading more than necessary at the beginning of the image. Add a test that simulates the issue, by decoding a special stream that reports an error if the codec attempts to read beyond the end. Temporarily disable the partial decoding tests for png. A larger change will be necessary to get those working again, and no clients are currently relying on incrementally decoding PNGs (i.e. decode part of an image, then decode further with more data). Include a workaround for older versions of libpng (e.g. 1.2 in Google3). In older versions, if the row callback is null when the IDAT header is processed, reading the image will fail. When we see the IDAT, we save the length and process a recreated IDAT header later, after the row callback has been set. Bug: skia:5368 Bug:b/34073812 Test: Existing tests, plus a new test in dm. Change-Id: I293a4ddc013b82669a8b735062228b26d0bce933 Reviewed-on: https://skia-review.googlesource.com/13984 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* jumper, implement 2.2 stages with approx_powfGravatar Mike Klein2017-04-21
| | | | | | | | | | My main interest is getting rid of weird code, but it's also faster. The new bench drops from 667 to 412. Change-Id: Ibf889601284cf925780320c828394f79937dc705 Reviewed-on: https://skia-review.googlesource.com/14035 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Rm makeRenderTargetContext in favor of deferred version (take 2)"Gravatar Robert Phillips2017-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 02242e82e4bf94a8f6862dadb5bf347ea5e31eb5. Reason for revert: Maybe breaking Chrome DEPS roll Original change's description: > Rm makeRenderTargetContext in favor of deferred version (take 2) > > This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) > > Change-Id: Ife77b012d09c46895884a168fc5045bd92a4b919 > Reviewed-on: https://skia-review.googlesource.com/13196 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I2607116ed743f5d313da4a7b7f056776ed907702 Reviewed-on: https://skia-review.googlesource.com/14024 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm makeRenderTargetContext in favor of deferred version (take 2)Gravatar Robert Phillips2017-04-21
| | | | | | | | | This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) Change-Id: Ife77b012d09c46895884a168fc5045bd92a4b919 Reviewed-on: https://skia-review.googlesource.com/13196 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Improved skslc optimizer, particularly around vectors.Gravatar Ethan Nicholas2017-04-20
| | | | | | | | | BUG=skia: Change-Id: Idb364d9198f2ff84aad1eb68e236fb45ec1c86b7 Reviewed-on: https://skia-review.googlesource.com/8000 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* Revert "Revert "Plumb GrBackendTexture throughout skia.""Gravatar Greg Daniel2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7fa5c31c2c9af834bee66d5fcf476e250076c8d6. Reason for revert: Relanding this change now that other fixes have landed. Original change's description: > Revert "Plumb GrBackendTexture throughout skia." > > This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12. > > Reason for revert: fix android roll > > Original change's description: > > Plumb GrBackendTexture throughout skia. > > > > Bug: skia: > > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 > > Reviewed-on: https://skia-review.googlesource.com/13645 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89 > Reviewed-on: https://skia-review.googlesource.com/13773 > Reviewed-by: Stan Iliev <stani@google.com> > Commit-Queue: Stan Iliev <stani@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,stani@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I92bc074e4fe37fa5c83186afadc472c03802e8f2 Reviewed-on: https://skia-review.googlesource.com/13975 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Make SkPngCodec only read as much of the stream as necessary"Gravatar Leon Scroggins2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2c65d5161260f3d45a63dcd92229bd09c8a12d53. Reason for revert: Causing failures in Google3 (https://test.corp.google.com/ui#cl=153703311&flags=CAMQAg==&id=OCL:153703311:BASE:153703364:1492695824938:4db2240d&t=//chrome/skia/dm_wrapper:dm_wrapper) and differences in Gold. This change was not intended to change the output. Original change's description: > Make SkPngCodec only read as much of the stream as necessary > > Previously, SkPngCodec assumed that the stream only contained one > image, which ended at the end of the stream. It read the stream in > arbitrarily-sized chunks, and then passed that data to libpng for > processing. > > If a stream contains more than one image, this may result in reading > beyond the end of the image, making future reads read the wrong data. > > Now, SkPngCodec starts by reading 8 bytes at a time. After the > signature, 8 bytes is enough to know which chunk is next and how many > bytes are in the chunk. > > When decoding the size, we stop when we reach IDAT, and when decoding > the image, we stop when we reach IEND. > > This manual parsing is necessary to support APNG, which is planned in > the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which > was a workaround for reading more than necessary at the beginning of > the image. > > Add a test that simulates the issue, by decoding a special stream that > reports an error if the codec attempts to read beyond the end. > > Temporarily disable the partial decoding tests for png. A larger change > will be necessary to get those working again, and no clients are > currently relying on incrementally decoding PNGs (i.e. decode part of > an image, then decode further with more data). > > Bug: skia:5368 > BUG:34073812 > > Change-Id: If832f7b20565411226fb5be3c305a4d16bf9269d > Reviewed-on: https://skia-review.googlesource.com/13900 > Commit-Queue: Leon Scroggins <scroggo@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I2f82e9960dda7bf5c646774df84320dadb7b930e Reviewed-on: https://skia-review.googlesource.com/13971 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* calculate cull rects for SkMiniPicturesGravatar Mike Klein2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | This is the other half of https://skia-review.googlesource.com/c/7874/, adding the cull-shrinking feature of SkBigPictures to SkMiniPictures. Like SkBigPictures, shrink only when we're asked to build an R-tree. (We don't actually build a tree for one rect, of course.) We could do unconditionally, but SkPictureImageFilter uses the cull rect as its crop. It's unclear to me what this image filter unit test I've changed here was intending... had it had two draws we would have shrunk its cull, but because it was hitting the 1-draw SkMiniPicture path it kept the larger user-supplied cull. As the test doesn't appear to have been written with cull shrinking in mind, I've removed its SkRTreeFactory to keep that feature explicitly disabled there. BUG=skia:5974 Change-Id: I4118d2e85f2a69adef2e7a7fa9b9b8c17607a94f Reviewed-on: https://skia-review.googlesource.com/12624 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* rectangle texture scaling is now handled in skslcGravatar Ethan Nicholas2017-04-20
| | | | | | | | Bug: skia: Change-Id: I658a95576143d69656cd63aec44ff65d430d332f Reviewed-on: https://skia-review.googlesource.com/13813 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Make SkPngCodec only read as much of the stream as necessaryGravatar Leon Scroggins III2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, SkPngCodec assumed that the stream only contained one image, which ended at the end of the stream. It read the stream in arbitrarily-sized chunks, and then passed that data to libpng for processing. If a stream contains more than one image, this may result in reading beyond the end of the image, making future reads read the wrong data. Now, SkPngCodec starts by reading 8 bytes at a time. After the signature, 8 bytes is enough to know which chunk is next and how many bytes are in the chunk. When decoding the size, we stop when we reach IDAT, and when decoding the image, we stop when we reach IEND. This manual parsing is necessary to support APNG, which is planned in the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which was a workaround for reading more than necessary at the beginning of the image. Add a test that simulates the issue, by decoding a special stream that reports an error if the codec attempts to read beyond the end. Temporarily disable the partial decoding tests for png. A larger change will be necessary to get those working again, and no clients are currently relying on incrementally decoding PNGs (i.e. decode part of an image, then decode further with more data). Bug: skia:5368 BUG:34073812 Change-Id: If832f7b20565411226fb5be3c305a4d16bf9269d Reviewed-on: https://skia-review.googlesource.com/13900 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* test and fix f16<->f32 conversion stagesGravatar Mike Klein2017-04-20
| | | | | | | | | | | | This refactors from_half() and to_half() a bit, totally reimplementing the non-hardware cases to be more clearly correct. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android,Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android,Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug Change-Id: I439463cf90935c5e8fe2369cbcf45e07f3af62c7 Reviewed-on: https://skia-review.googlesource.com/13921 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* remove dead code around SK_SUPPORT_LEGACY_CANVAS_READPIXELSGravatar Mike Reed2017-04-20
| | | | | | | | Bug: skia:6513 Change-Id: I8e4e0ffb371ae5b1af972110339e57d491ad9ff1 Reviewed-on: https://skia-review.googlesource.com/13779 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove SkOpTAllocatorGravatar Herb Derby2017-04-19
| | | | | | | | | | Have the callsites of SkOpTAllocator call SkArenaAlloc directly. Bug: skia: Change-Id: Ic54e92c3e9a0abed038aa3ae40e8a195895af99d Reviewed-on: https://skia-review.googlesource.com/13870 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Update ProxyTest to skip configs that don't support the requested sample countsGravatar Greg Daniel2017-04-19
| | | | | | | | Bug: skia: Change-Id: I806dc153b8b6cf6dd6b74549905990cadb55daab Reviewed-on: https://skia-review.googlesource.com/13871 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* jumper, parametric_{r,g,b,a}Gravatar Mike Klein2017-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've tried a couple of ideas for approx_powf(): 1) accumulate integer powers of x, then 4th roots, then 16th roots 2) continue 1) all the way to 256th roots 3) decompose into pow2 and log2, exploiting IEEE float layout 4) slightly tune constants used in 3) 5) accumulate integer powers of x, then 3+4) with different tuning 6) follow a source online, basically 5 with finesse 7) a new source quoting and improving on the method in 6). 7) seems perfect, enough that maybe we can explore improving its speed at cost of precision. Might be nice to get rid of those divides. If we allow a small tolerance (2-5) in our tests, we could use the very simple fast forms from 3) (e.g. PS 5). I wish I had some images to look at! Anything involving roots seems to be subverted by poor rsqrt precision. This change of course affects the pipelines created by the tests for exponential and full parametric gamma curves. What's less obvious is that it also means SkJumper can now for the first time run the pipeline created by the mixed gamma curves test. This means we now need to relax our tolerance for the table-based channel, just like we did when implementing table_{r,g,b,a}. This took me an embarassingly long time to figure out. *face palm* Change-Id: I451ee3c970a0a4a4e285f8aa8f6ef709a654d247 Reviewed-on: https://skia-review.googlesource.com/13656 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Herb Derby <herb@google.com>
* add unit tests for parametric_* stagesGravatar Mike Klein2017-04-19
| | | | | | | Change-Id: I7fab6d1c7240c17f2cc8436e8c6e7c8d2df940bb Reviewed-on: https://skia-review.googlesource.com/13814 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix SkATan2_255 fuzzer crashGravatar Florin Malita2017-04-19
| | | | | | | | | | | | Test for degenerate values after computing the ratio, instead of attempting to catch all tricky cases upfront. BUG=skia:6511 Change-Id: I8e3421675994dd68a1eff1af3f1456917dd1f9e1 Reviewed-on: https://skia-review.googlesource.com/13726 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Plumb GrBackendTexture throughout skia."Gravatar Stan Iliev2017-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12. Reason for revert: fix android roll Original change's description: > Plumb GrBackendTexture throughout skia. > > Bug: skia: > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 > Reviewed-on: https://skia-review.googlesource.com/13645 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89 Reviewed-on: https://skia-review.googlesource.com/13773 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Plumb GrBackendTexture throughout skia.Gravatar Greg Daniel2017-04-18
| | | | | | | | Bug: skia: Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 Reviewed-on: https://skia-review.googlesource.com/13645 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove SkVarAllocGravatar Herb Derby2017-04-18
| | | | | | | Change-Id: Id41d3e03390185f72b682225aeb140df45c84a34 Reviewed-on: https://skia-review.googlesource.com/13763 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix some bugs with read/writePixelsGravatar Brian Osman2017-04-18
| | | | | | | | | | | | | | | | | | | | - On both GL and Vulkan, we must draw if writing to an MSAA surface. Otherwise we just write to the resolve target texture, which gets overwritten on the next resolve. - On Vulkan, we must draw if the target isn't a texture. (This check was already present in onWritePixels). - On Vulkan, when reading from an MSAA surface as a different config, we don't need the readConfig to be renderable with MSAA - the temp surface is always created non-MSAA. - Added tests for these fixes, verified that they failed previously. Bug: skia: Change-Id: Ia2d5025d7a8f8de8630413453f83b58028dd41aa Reviewed-on: https://skia-review.googlesource.com/13691 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Split up opLists"Gravatar Robert Phillips2017-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bc8ee52d4649afdc972599e5ef2a2a543867985d. Reason for revert: Instanced rendering is broken Original change's description: > Split up opLists > > Split into: > https://skia-review.googlesource.com/c/11793/ (Remove lastProxy capability from GrSurface) > > Change-Id: I903ba30e17de4aab8cb0d2cc3281ae5c262142f9 > Reviewed-on: https://skia-review.googlesource.com/11581 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic3ae650630a09730d40da4a9587d9e25a9dd5e6c Reviewed-on: https://skia-review.googlesource.com/13725 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* keep integral rectangle intersections integralGravatar Cary Clark2017-04-18
| | | | | | | | | | | | | | | | | | | | | | A pair of coincident lines can generate multiple intersection points. Path ops is more stable when the intersection T value is used to recompute the intersection point, but this has the side-effect of making integral edges intersect at non-integral values. While it's worthwhile to fix this, for the moment it is less disruptive to only worry about keeping intersection values integral if the original intersection point is integral in both axes. Also, fix some debugging code that bit-rotted. R=msarett@google.com Change-Id: Iefd27b25d1d21c22b224c174bd59bc6c105033c4 Reviewed-on: https://skia-review.googlesource.com/13721 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Split up opListsGravatar Robert Phillips2017-04-18
| | | | | | | | | | Split into: https://skia-review.googlesource.com/c/11793/ (Remove lastProxy capability from GrSurface) Change-Id: I903ba30e17de4aab8cb0d2cc3281ae5c262142f9 Reviewed-on: https://skia-review.googlesource.com/11581 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Re-enable deferred proxies in ChromeGravatar Robert Phillips2017-04-18
| | | | | | | | | | | Chrome has branched. TBR=bsalomon@google.com Change-Id: I578deafd63af9e86ff8f7cf8f8ccad6a901c1b21 Reviewed-on: https://skia-review.googlesource.com/13687 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Pass GrSurfaceContext into read/writeSurfacePixelsGravatar Robert Phillips2017-04-18
| | | | | | | | | This is mainly so writeSurfacePixels can have continuity of surfaceContext when it draws. Change-Id: I34f1dc5c4c3dcfa7bf91aa3ad72b7a48ed9de1a9 Reviewed-on: https://skia-review.googlesource.com/13595 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Split cleanup changes out of bigger CL (take 2)Gravatar Robert Phillips2017-04-18
| | | | | | | | | | | | | This are split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) This is a reland of: https://skia-review.googlesource.com/c/13585/ (Split cleanup changes out of bigger CL) TBR=bsalomon@google.com Change-Id: Id0d5c764953230412e78ae6aa654f8dfae998c60 Reviewed-on: https://skia-review.googlesource.com/13643 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* jumper, table_{r,g,b,a}Gravatar Mike Klein2017-04-17
| | | | | | | | | | | In testing, it didn't really seem like we're getting anything out of doing an interpolated lookup, so this just does a single rounded lookup. Change-Id: If85ba68675945b442076519dd7f1bf7540d1628d Reviewed-on: https://skia-review.googlesource.com/13646 Commit-Queue: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Split cleanup changes out of bigger CL"Gravatar Mike Klein2017-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cd11c809f206af0da3ce1779dee3c91193baa7b0. Reason for revert: assert(rtp->getLastOpList()) Original change's description: > Split cleanup changes out of bigger CL > > This are split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) > > TBR=bsalomon@google.com > > Change-Id: I1239e806a30a93d3c17ad933f118b98a5077dd3a > Reviewed-on: https://skia-review.googlesource.com/13585 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia3ef7322fe830a6a4dc29226ce931d35d181c6e0 Reviewed-on: https://skia-review.googlesource.com/13641 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Switch SkCodec to int for counts and indicesGravatar Leon Scroggins III2017-04-17
| | | | | | | | | | | | This matches other Skia APIs. size_t was adopted from blink/ GIFImageReader. Change-Id: Ic83e59f0942f597c4fb834e623acd9886ad483fe Reviewed-on: https://skia-review.googlesource.com/13274 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Chris Blume <cblume@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Split cleanup changes out of bigger CLGravatar Robert Phillips2017-04-17
| | | | | | | | | | | This are split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) TBR=bsalomon@google.com Change-Id: I1239e806a30a93d3c17ad933f118b98a5077dd3a Reviewed-on: https://skia-review.googlesource.com/13585 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Finish overriding onMakeColorSpace() for SkImageFiltersGravatar Matt Sarett2017-04-17
| | | | | | | | | | Fixes 3 gms in gbr-8888. Breaks 0 gms in gbr-8888. Bug: skia: Change-Id: I3365390b16353821ef6057a7bb68020887e36f72 Reviewed-on: https://skia-review.googlesource.com/13323 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add a test for getFrameInfo on truncated dataGravatar Leon Scroggins III2017-04-17
| | | | | | | | | | | | | | Prior to e132e7be5f9108692254c37db592ea7611abbc15, calling getFrameInfo on an SkGifCodec which was truncated before fully parsing the local color map of the first frame would hit an assert. Add a test to verify that the problem has been fixed. Modify box.gif to use a local color map for the first (and only) frame. Change-Id: I905afe60c0c6ecc82e251e00ef82b2e5b22975a3 Reviewed-on: https://skia-review.googlesource.com/13320 Reviewed-by: Chris Blume <cblume@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* hide lockpixels api behind flagGravatar Mike Reed2017-04-17
| | | | | | | | | | | | | | guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS needs https://codereview.chromium.org/2820873002/# to land first Bug: skia:6481 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Reviewed-on: https://skia-review.googlesource.com/13580 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@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>
* Reduce read/write-SurfacePixels call sites (take 2)Gravatar Robert Phillips2017-04-17
| | | | | | | | | | | Reland of: https://skia-review.googlesource.com/c/13068/ (Reduce read/write-SurfacePixels call sites) TBR=brianosman@google.com Change-Id: I035b9fc2feab5fa443570ca54fbb0df8c9382cb3 Reviewed-on: https://skia-review.googlesource.com/13582 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove dangerous constructor from SkArenaAllocGravatar Herb Derby2017-04-14
| | | | | | | | | | | Make the constructors for SkArenaAlloc unambiguous. TBR=mtklein@google.com Change-Id: Iaa6419574e78e17bf746f5f9bcdf99c9d6c9d727 Reviewed-on: https://skia-review.googlesource.com/13540 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>