aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* remove imageinfo flatten altogetherGravatar Cary Clark2018-03-19
| | | | | | | | | | | | | If SkImageInfo flatten and unflatten aren't referenced outside of one test, perhaps they can be removed altogether. R=reed@google.com Bug: skia:6898 Change-Id: Ia6f82b66d4496a628ad95c386d1865793f3e31a9 Reviewed-on: https://skia-review.googlesource.com/115074 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Revert "New read pixels implementation that is simpler but does all ↵Gravatar Brian Salomon2018-03-19
| | | | | | | | | | | | conversions on CPU."" This reverts commit be5947c2f38a79b7c709accfb1047d8fd06a0227. Bug: skia: Change-Id: I06dc15b31042d7827511d0ac2a7f4262c3f09622 Reviewed-on: https://skia-review.googlesource.com/115079 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Allow SkTraceMemoryDump to exclude wrapped objectsGravatar Eric Karl2018-03-19
| | | | | | | | | | | | Allow SkTraceMemoryDump to exclude wrapped objects from dumps. This helps avoid duplicate dumping when Skia is wrapping an external object which is already dumped externally. Bug: 795358 Change-Id: Icbda96b564c81b958d40f74693280ac7d5ba7332 Reviewed-on: https://skia-review.googlesource.com/114681 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Eric Karl <ericrk@chromium.org>
* Revert "New read pixels implementation that is simpler but does all ↵Gravatar Brian Salomon2018-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | conversions on CPU." This reverts commit c9a642edf2d1c7f5380fe829adbb1a692f9969a6. Reason for revert: 1010102 gms broke Original change's description: > New read pixels implementation that is simpler but does all conversions on CPU. > > Change-Id: Ia548cd24a8544b35a233311706faf48de353b7cf > Reviewed-on: https://skia-review.googlesource.com/109902 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com Change-Id: I7724a6eef79885ba2a32c1ac871e5b2a9a3c0c12 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/115140 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* New read pixels implementation that is simpler but does all conversions on CPU.Gravatar Brian Salomon2018-03-19
| | | | | | | Change-Id: Ia548cd24a8544b35a233311706faf48de353b7cf Reviewed-on: https://skia-review.googlesource.com/109902 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fix GrTextureStripAtlasManager cleanup order bugGravatar Robert Phillips2018-03-19
| | | | | | | | Bug: 820703 Change-Id: I6f1a895ceb213d38361bc03a472cf2a48e4720a5 Reviewed-on: https://skia-review.googlesource.com/115001 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* fix op fuzzGravatar Cary Clark2018-03-19
| | | | | | | | | | | | | | | | | | | fixes the current four fuzzer fails by rewriting asserts as function exits. Passes all extended pathops testing. To run the extended tests: ./out/debug/pathops_unittest -V -x ./out/release/pathops_unittest -V -x R=kjlubick@google.com Docs-Preview: https://skia.org/?cl=114962 Bug: skia: Change-Id: I05bd368a87b38b1121403cf93b21caf76c2e7d7e Reviewed-on: https://skia-review.googlesource.com/114962 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* Alter GrSurface/GrSurfaceProxy flags to prepare for GrTexture/GrTextureProxy ↵Gravatar Robert Phillips2018-03-19
| | | | | | | | | | | | | | | | -specific flags This CL: moves GrRenderTarget::fFlags to GrSurface::fSurfaceFlags adds a GrInternalSurfaceFlags type and uses it for GrSurfaceProxy::fSurfaceFlags The goal of this is to provide a location where GrTexture/GrTextureProxy-specific flags (i.e., isExternal & isRectangle) can be stored. Change-Id: I8df7b79036a6853dd378ff6cf10d4b37c60dd511 Reviewed-on: https://skia-review.googlesource.com/114796 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "fix nextContour bug"Gravatar Stan Iliev2018-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 473f69276f1854db80e094cc4af091f7f8a5b00b. Reason for revert: a CTS test PathMeasureTest.android.graphics.cts.PathMeasureTest.testNextContour is failing Original change's description: > fix nextContour bug > > Calling nextContour() needs to ensure that we've already measured the "current" one. > > Bug: skia: > Change-Id: I501c26d0b068028d67103888f06ec89125a5407a > Reviewed-on: https://skia-review.googlesource.com/114692 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=caryclark@google.com,reed@google.com Change-Id: I7f1e08651dfe73c02158b209dc28af2b174e246f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/114823 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Correctly discard or load RT when doing copies as draws in VulkanGravatar Greg Daniel2018-03-16
| | | | | | | | | | | This fixes all the copy as draw issues we've had with certain devices and the cap is no longer needed. Bug: skia: Change-Id: Id0b750849c4c920beae2d8cb3eda5f402018f194 Reviewed-on: https://skia-review.googlesource.com/114860 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add DoneProc to Promise ImagesGravatar Greg Daniel2018-03-16
| | | | | | | | | | | | | This proc will notify the client when we will no longer call fulfill on their promise image so that can delete any meta data they needed to store to be able to complete the fulfill requests. Bug: skia: Change-Id: Ife1e6845f221c31ce1ae2c0d2ba5e4c8f0203b74 Reviewed-on: https://skia-review.googlesource.com/114092 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* we now complain if an SkSL program tries to override the default outputGravatar Ethan Nicholas2018-03-16
| | | | | | | | Bug: skia: Change-Id: I387ddc3aac0712eb6c0a6ea39e48e5f3d809bc48 Reviewed-on: https://skia-review.googlesource.com/114691 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* fix nextContour bugGravatar Mike Reed2018-03-16
| | | | | | | | | | Calling nextContour() needs to ensure that we've already measured the "current" one. Bug: skia: Change-Id: I501c26d0b068028d67103888f06ec89125a5407a Reviewed-on: https://skia-review.googlesource.com/114692 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Fix Vulkan Copy as draw shaderGravatar Greg Daniel2018-03-16
| | | | | | | | Bug: skia:7663 Change-Id: I745900ccc56c697e4abb982e921d99bc28502b33 Reviewed-on: https://skia-review.googlesource.com/114687 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Prevent crash when flushing while DDL recordingGravatar Robert Phillips2018-03-16
| | | | | | | Change-Id: I35e96d3c3020092b33d9b952394d40d4fd5a587b Reviewed-on: https://skia-review.googlesource.com/114685 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Handle GrContext creation failure in DDLGravatar Robert Phillips2018-03-15
| | | | | | | | | TBR=bsalomon@google.com Change-Id: Ib34448a60cb127ef89bcb0b1f85d07abc91af582 Reviewed-on: https://skia-review.googlesource.com/114569 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Delete unused VkClearTestGravatar Greg Daniel2018-03-15
| | | | | | | | Bug: skia: Change-Id: I4aa1886e7f4048fc13a741ddbc37b9ca3f48a41d Reviewed-on: https://skia-review.googlesource.com/114510 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* fix pathops fuzzers and debuggingGravatar Cary Clark2018-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | En route to fixing fuzzer bugs, I discovered that most debugging in pathops was broken. Pathops has extensive runtime functions that trace links and connections between data structures that are invaluable to debugging. The only practical way to use these functions is to call them from the debugger in immediate mode. Some time, some where, the MSVS Immediate Window ceased to be able to call functions that are members of structs or classes, and functions that take templated parameters. I can find no mention of this on the web, so I assume that something about our setup is triggering this, but I've had no luck finding the culprit. In the meantime, I've added global functions wrapped in a namespace to sneak calls to these functions without MSVS being any the wiser. While this works, it is likely to bitrot by tomorrow or next Tuesday so I will continue to try to find and fix the root cause. This also fixes the fuzzer bugs; generally one-line edits that change asserts to fails. All pathops tests succeed with this. To run all tests, do: ./out/debug/pathops_unittest -V -x ./out/release/pathops_unittest -V -x TBR=caryclark@google.com Bug: skia: Change-Id: I956ae3d8df6d25e155e62bd6dede64519c7fbdb1 Reviewed-on: https://skia-review.googlesource.com/114321 Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* Make CreateBackendFormatFromTexture shared codeGravatar Robert Phillips2018-03-15
| | | | | | | | | TBR=bsalomon@google.com Change-Id: I19e6e6c8dc32ba584738545d443de092e4987a5a Reviewed-on: https://skia-review.googlesource.com/114374 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Some iwyu for tests which will otherwise break.Gravatar Ben Wagner2018-03-14
| | | | | | | | | | | A change currently in progress would break these test files since they aren't including what they use. Make them include what they use so they don't break in the future. Change-Id: I25d8d57631706dec0d0197b3759c6c18a0fe3aa0 Reviewed-on: https://skia-review.googlesource.com/114465 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Only include png.h for png.Gravatar Ben Wagner2018-03-14
| | | | | | | | | | | The png.h include provides macros and declarations though several subincludes. We will need a mapping for include what you use to mark this. Change-Id: Ie5e1c9ac7325d2fa12cf61986da8a4bb18557d42 Reviewed-on: https://skia-review.googlesource.com/114474 Reviewed-by: Stephan Altmueller <stephana@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Improve handling of GrPixelConfig in GrBackendTex/RT ctors"Gravatar Greg Daniel2018-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7d2b16ad13fd3262c776ae75ae35da4ad69df690. Reason for revert: Maybe breaking chrome? Original change's description: > Improve handling of GrPixelConfig in GrBackendTex/RT ctors > > Make sure that no client facing code was relying on what we set as the > default value for fConfig by making in kUnkown. > > Bug: skia: > Change-Id: Ie52ff08ba8deeacc16fe06eb0dd0c7292b2edf91 > Reviewed-on: https://skia-review.googlesource.com/114261 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I91e190d72407f9c4bee93a031a557f740bb49b66 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/114423 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* hide SkBlurMaskFilter and SkBlurQualityGravatar Mike Reed2018-03-14
| | | | | | | | | | SK_SUPPORT_LEGACY_BLURMASKFILTER Bug: skia: Change-Id: Ic3e27e08e6e3cd2ffc1cd13b044e197bebc96236 Reviewed-on: https://skia-review.googlesource.com/113940 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Add a shader cap for incomplete short int precisionGravatar Chris Dalton2018-03-14
| | | | | | | | | Bug: skia: Change-Id: Iac36eb763e687f6ecc3acbd4afced66f95596be2 Reviewed-on: https://skia-review.googlesource.com/109003 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* add explicit API to know if the writebuffer is using its external storageGravatar Mike Reed2018-03-14
| | | | | | | | | | To help with https://skia-review.googlesource.com/c/skia/+/114262 Bug: skia: Change-Id: I83fcccdec0dbaef28d0e557ea6fb9bd0ed59ed44 Reviewed-on: https://skia-review.googlesource.com/114284 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Improve handling of GrPixelConfig in GrBackendTex/RT ctorsGravatar Greg Daniel2018-03-14
| | | | | | | | | | | | Make sure that no client facing code was relying on what we set as the default value for fConfig by making in kUnkown. Bug: skia: Change-Id: Ie52ff08ba8deeacc16fe06eb0dd0c7292b2edf91 Reviewed-on: https://skia-review.googlesource.com/114261 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* exact divide by 255 with NEONGravatar Mike Klein2018-03-14
| | | | | | | Change-Id: Ib121eb0d5af1f22f48f517fe909112a77d92032e Reviewed-on: https://skia-review.googlesource.com/113666 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Compile with GCC 7.2.0.Gravatar Ben Wagner2018-03-13
| | | | | | | | | | | | | | This suppresses the noexcept-type warning, since Skia doesn't have a stable ABI in any event. GCC now warns on more printf style formats, so we have to hide our bad test formats a little better. GCC now also warns on implicit enum to bool conversions, which did catch two issues. Change-Id: Ib81769c421757186506873f0fe298ecd0106ae87 Reviewed-on: https://skia-review.googlesource.com/114263 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* consolidate SaveLayerFlag internal referencesGravatar Cary Clark2018-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a third define in SkCanvasPriv to complement SkCanvas::kDontClipToLayer_PrivateSaveLayerFlag and SkCanvas::kDontClipToLayer_Legacy_SaveLayerFlag. SkCanvas::kDontClipToLayer_PrivateSaveLayerFlag exists only to define SkCanvas::kDontClipToLayer_Legacy_SaveLayerFlag and SkCanvasPriv::kDontClipToLayer_SaveLayerFlag. SkCanvas::kDontClipToLayer_Legacy_SaveLayerFlag is used only by Android framework. SkCanvasPriv::kDontClipToLayer_SaveLayerFlag is used internally. Note that changes to CanvasStateTest.cpp inside SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG aren't testable by existing skiabots; it requires building an Android framework aware version of dm. CanvasStateTest.cpp may have bit-rotted. R=reed@google.com,scroggo@google.com Bug: skia:6454,skia:7690 Change-Id: I74f2a54636fae89a5a88a7e13f1baba49d3e2115 Reviewed-on: https://skia-review.googlesource.com/112401 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Reed <reed@google.com>
* IWYU for some test files starting with 'C'.Gravatar Ben Wagner2018-03-13
| | | | | | | | | Change-Id: Iea274ae52da8b4b87ec55222c856f40a0d88c4e0 Reviewed-on: https://skia-review.googlesource.com/113746 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-on: https://skia-review.googlesource.com/113944 Reviewed-by: Ben Wagner <bungeman@google.com>
* Add testing-only backend render target support to GrVkGpu.Gravatar Brian Salomon2018-03-13
| | | | | | | | | | | | | Update unit tests to use backend render targets on non-GL contexts Add named DM configs for rendering to Vulkan backend render targets and textures. Make src data ptr param to createTestingOnlyBackendTexture be const. Change-Id: I17f5375ed9bb08422006698956469d3151c4954c Reviewed-on: https://skia-review.googlesource.com/113276 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "IWYU for some test files starting with 'C'."Gravatar Ben Wagner2018-03-12
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1a462bd0fe6fb3cd8d7aa7ad1d8290e764ac79e4. Reason for revert: Broke android. Need to run android bot for these. Original change's description: > IWYU for some test files starting with 'C'. > > Change-Id: I9a9596f7a941cdd8f01e055965c70a4b24438499 > Reviewed-on: https://skia-review.googlesource.com/113746 > Reviewed-by: Herb Derby <herb@google.com> > Commit-Queue: Ben Wagner <bungeman@google.com> TBR=bungeman@google.com,herb@google.com Change-Id: Ic63c2fcc7457e442e9b29a9ccd429927e24e3b77 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/113841 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* IWYU for some test files starting with 'C'.Gravatar Ben Wagner2018-03-12
| | | | | | | Change-Id: I9a9596f7a941cdd8f01e055965c70a4b24438499 Reviewed-on: https://skia-review.googlesource.com/113746 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* move blur impl into coreGravatar Mike Reed2018-03-12
| | | | | | | | | | | | | | | | Ever since we added drawShadow to the public api, blurs have necessarily part of the core. This CL just formalizes that. This should also allow us to have builds that exclude all of /effects (for code size) and still be valid. Will follow-up with a change to deprecate SkBlurMaskFilter and SkBlurQuality (both no longer needed). Bug: skia: Change-Id: Ifbbd8b47a30a0386d215726b67bcf1e8b84fb8f5 Reviewed-on: https://skia-review.googlesource.com/113713 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* make paint flatten unflatten privateGravatar Cary Clark2018-03-12
| | | | | | | | | | | | | SkPaint flatten and unflatten rely on interfaces that are not public, SkReadBuffer and SkWriteBuffer. R=reed@google.com Bug: skia:6172 Change-Id: I487af9f8931c78daf763c51d9e0d3ff8ff440b22 Reviewed-on: https://skia-review.googlesource.com/112561 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* Small cleanups suggested by ClangTidyGravatar Kevin Lubick2018-03-12
| | | | | | | | | Bug: skia: Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Change-Id: Idd95e359838fdaecbdccc3a2c5a1b36971f20b8b Reviewed-on: https://skia-review.googlesource.com/113703 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* IWYU for test files starting with 'B'.Gravatar Ben Wagner2018-03-09
| | | | | | | | | | Found reproduction of iwyu issue #486, fixed at https://github.com/include-what-you-use/include-what-you-use/pull/522 Change-Id: Ic77a1a0c3b02b7853517c7fc4d98d92b29c2b0eb Reviewed-on: https://skia-review.googlesource.com/113214 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove TLS glyph cache calls.Gravatar Herb Derby2018-03-09
| | | | | | | Change-Id: Iafeb02d395cac81e8fe6d74c989a37607503919c Reviewed-on: https://skia-review.googlesource.com/113208 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Fix breakage from merge conflict related to deleteTestingOnlyBackendTexture ↵Gravatar Brian Salomon2018-03-09
| | | | | | | | sig. change Change-Id: I28c50efb9c7723df19041640809994bff8ea5041 Reviewed-on: https://skia-review.googlesource.com/113421 Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrGpu::deleteTestingOnlyBackendTexture() take const GrBackendTexture&Gravatar Brian Salomon2018-03-09
| | | | | | | Change-Id: Ibd00d0dc6d8c73628f26851e102defdbafab149b Reviewed-on: https://skia-review.googlesource.com/113164 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add promise images for deferred instantiation of wrapped gpu texturesGravatar Greg Daniel2018-03-09
| | | | | | | | | | | | | This will allow a client to make an SkImage that "wraps" a gpu texture, however the client does need to supply the actual gpu texture at Image creation time. Instead it is retrieve at flush time via a callback. Bug: skia: Change-Id: I6267a55ab7102101a7bd80a6f547b6a870d2df08 Reviewed-on: https://skia-review.googlesource.com/109021 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Add GM configs that test rendering to a GL backend texture and render targetGravatar Brian Salomon2018-03-09
| | | | | | | | | This also adds GrGpu::create/deleteTestingOnlyBackendRenderTarget. Implemented in GL only for now. Change-Id: I9e5fdc953c4a249959af89e08332f520cefe9d90 Reviewed-on: https://skia-review.googlesource.com/113305 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Avoid serializing to 'typ1' on Mac.Gravatar Ben Wagner2018-03-09
| | | | | | | | | | | | | | | | | | | | | CoreGraphics does not provide a means to get the original font data for a CGFont, only the tables. As a result, Skia pieces the font data back together when requested. The most awkward part of this is choosing the first four bytes, and the CTFont suggestion seems to often be wrong. This change doublechecks the selection of 'typ1', prefering to use 'OTTO' if there are no 'TYP1' or 'CID ' tables. These sorts of fonts are extremely old and unlikely to be in current use. It appears that CTFont may report that it has this format if it is an 'OTTO' font with very few glyphs. If Skia serializes such a font with 'typ1' as the first four bytes, CoreGraphics will not create a CGFont from the resulting font data. BUG=chromium:809763,skia:7630 Change-Id: I9979b9f0ebdd27c4ad0903e8ee6237241e755541 Reviewed-on: https://skia-review.googlesource.com/113306 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* some fuzzer fixesGravatar Cary Clark2018-03-09
| | | | | | | | | | | | should fix three or four of the PathOp asserts triggered by the fuzzer tool. R=kjlubick@google.com Bug: skia: Change-Id: I470895addf1e922da6a7c41d44d54eca92e68fb6 Reviewed-on: https://skia-review.googlesource.com/113163 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* Change behavior of custom image serial/deserialGravatar Mike Reed2018-03-08
| | | | | | | | | | | | | | | | New behavior is to *always* call the client's deserial image proc for all data. This allows the client to make decisions even on "std" image data like PNG. The change also means that if there is no client deserial image proc, Skia will still attempt to create an image from the data, even if it was written by a custom serial proc. Bug: skia:7706 Change-Id: Ia58bdd10b86d497f02187082c6373c029e9c8293 Reviewed-on: https://skia-review.googlesource.com/113302 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add ability to uninstantiate lazy proxies after every flush.Gravatar Greg Daniel2018-03-08
| | | | | | | | | Bug: skia: Change-Id: Id32540cda54a9c5e3e6cb721776699be3cc8ac1a Reviewed-on: https://skia-review.googlesource.com/113263 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add testing only helper to flush and sync gpu.Gravatar Greg Daniel2018-03-08
| | | | | | | | | | | | The use case for this is mostly for Vulkan where we need to make sure the gpu is done with resources before we delete or use them in some way. Previously we used readPixels to do this which was just an ugly hack. Bug: skia: Change-Id: I7949ebc695032533675133aabca0e32840b417ba Reviewed-on: https://skia-review.googlesource.com/113122 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Delazify wrapped backend textures/render target proxiesGravatar Brian Salomon2018-03-08
| | | | | | | | | | | These methods will fail on DDL contexts. This is in preparation for removing the ability to specify origin for lazy proxies. Change-Id: Iadcedfd4fce8ea2590729c974128e5c58cec38a8 Reviewed-on: https://skia-review.googlesource.com/112802 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove GrRestrictedAtlasManagerGravatar Robert Phillips2018-03-08
| | | | | | | | | Philosophically this relies on: https://skia-review.googlesource.com/c/skia/+/111807 (Revise Text & Small Path Atlas so instantiation failure is handled at flush time) Change-Id: I4fdcf1af8c5e9ffefdfb973104045f4f5d223a4e Reviewed-on: https://skia-review.googlesource.com/112702 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rename wrap backend tex/rt methods on GrProxyProviderGravatar Brian Salomon2018-03-07
| | | | | | | | | This makes them more consistent with similar methods on GrResourceProvider. Change-Id: Ice7e5dbe8100481781015b386445e9b7101bd75e Reviewed-on: https://skia-review.googlesource.com/112821 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>