aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
Commit message (Collapse)AuthorAge
* Add SK_SUPPORT_LEGACY_BACKEND_OBJECTSGravatar Robert Phillips2018-04-12
| | | | | | | | | This relies on the Chrome CL: https://chromium-review.googlesource.com/c/chromium/src/+/999796 (Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS to SkUserConfig.h) landing first. Change-Id: Ie0a2b7b84cc02e46957765a0a7d6444a5320769d Reviewed-on: https://skia-review.googlesource.com/119140 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Fix handling of MaskFilter matrices"Gravatar Florin Malita2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c64ee20e135a336ed775ccb6dec8a87efd19ec02. Reason for revert: initial failures should be fixed in https://skia.googlesource.com/skia.git/+/8eaf64ae12696d4189d3cea9f023658494cf82b8 Original change's description: > Revert "Fix handling of MaskFilter matrices" > > This reverts commit 2097fd03ffea48bd904c48c93348b2350600870e. > > Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix) > > Original change's description: > > Fix handling of MaskFilter matrices > > > > 1) extend GrFPArgs to track pre/post local matrices, add helpers for > > creating pre/post wrapper args > > > > 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM > > sandwich logic. > > > > 3) update call sites to use the above > > > > 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to > > disambiguate vs. SkShader::makeWithLocalMatrix. > > > > BUG=skia:7744 > > > > Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 > > Reviewed-on: https://skia-review.googlesource.com/119330 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com > > Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7744 > Reviewed-on: https://skia-review.googlesource.com/120340 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com Change-Id: If194862a928d1abe22ed8fa968436c725d19a8fc No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7744 Reviewed-on: https://skia-review.googlesource.com/120480 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove unused/dumb methods from SkRectGravatar Mike Reed2018-04-11
| | | | | | | | Bug: skia: Change-Id: I407dc94256a347c7a9343b75a5af43c4294891d3 Reviewed-on: https://skia-review.googlesource.com/119360 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* Revert "Add private fIsBadForDAA bit to SkPath"Gravatar Yuqian Li2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 54aefc74103a5c1810a7cc074746915c78ab3132. Reason for revert: Forget the guard flag. Pixel tests would fail. Original change's description: > Add private fIsBadForDAA bit to SkPath > > Bug: chromium:821353 > Change-Id: Ic6585e76df692bb1853d0990d75f0e8d1dee22f4 > Reviewed-on: https://skia-review.googlesource.com/120201 > Commit-Queue: Yuqian Li <liyuqian@google.com> > Reviewed-by: Mike Reed <reed@google.com> TBR=caryclark@google.com,liyuqian@google.com,reed@google.com Change-Id: I2fe7cfcc3a80a51415f72d656da95a894a3240a4 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:821353 Reviewed-on: https://skia-review.googlesource.com/120505 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Add private fIsBadForDAA bit to SkPathGravatar Yuqian Li2018-04-11
| | | | | | | | Bug: chromium:821353 Change-Id: Ic6585e76df692bb1853d0990d75f0e8d1dee22f4 Reviewed-on: https://skia-review.googlesource.com/120201 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Fix SkTCopyOnFirstWrite copy semanticsGravatar Florin Malita2018-04-11
| | | | | | | | | | | | | | | The implicit SkTCopyOnFirstWrite copy-ctor and assignment operator are incorrect: fObj must point to the local copy, not to the source copy (when a copy has been made). Add corrected explicit copy (and move) ctor + assignment operator. Also add a get() helper to facilitate rawptr access. Change-Id: Ie3983e12c04eae4f32c40e3e267618cf02008c20 Reviewed-on: https://skia-review.googlesource.com/120442 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove guard around getBackendTexture/RenderTarget callsGravatar Greg Daniel2018-04-11
| | | | | | | | Bug: skia: Change-Id: Ia9ad987d4af183985724f32b022553af0fcb2b78 Reviewed-on: https://skia-review.googlesource.com/120124 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Fix handling of MaskFilter matrices"Gravatar Robert Phillips2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2097fd03ffea48bd904c48c93348b2350600870e. Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix) Original change's description: > Fix handling of MaskFilter matrices > > 1) extend GrFPArgs to track pre/post local matrices, add helpers for > creating pre/post wrapper args > > 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM > sandwich logic. > > 3) update call sites to use the above > > 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to > disambiguate vs. SkShader::makeWithLocalMatrix. > > BUG=skia:7744 > > Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 > Reviewed-on: https://skia-review.googlesource.com/119330 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7744 Reviewed-on: https://skia-review.googlesource.com/120340 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix handling of MaskFilter matricesGravatar Florin Malita2018-04-11
| | | | | | | | | | | | | | | | | | | | 1) extend GrFPArgs to track pre/post local matrices, add helpers for creating pre/post wrapper args 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM sandwich logic. 3) update call sites to use the above 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to disambiguate vs. SkShader::makeWithLocalMatrix. BUG=skia:7744 Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 Reviewed-on: https://skia-review.googlesource.com/119330 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Move GrBackendRenderTarget over to new system of getting backed infosGravatar Greg Daniel2018-04-11
| | | | | | | | Bug: skia: Change-Id: I3927390894715e8424b3d0240dad3ee6cd03dc38 Reviewed-on: https://skia-review.googlesource.com/120181 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add ctor to GrVkImageInfo.Gravatar Greg Daniel2018-04-10
| | | | | | | | | | | Adds an additional ctor so clients who used brace initialization on the struct don't break. Bug: skia: Change-Id: I78ebdbe8242147e48859f2234265365141fe81b1 Reviewed-on: https://skia-review.googlesource.com/120185 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Update getBackendInfo calls on GrBackendTexture to support VkImageLayout better.Gravatar Greg Daniel2018-04-10
| | | | | | | | | | | | | | | The big api level change here is that the getBackendInfo calls now return by value instead of a pointer. These changes are being made in support of Vulkan so that the client can update the VkImageLayout on the GrBackendTexture and have that update get reflected in our internal tracking of the image. This is done by storing a ref counted GrVkImageLayout object on the GrBackendTexture and the GrVkImage. Bug: skia: Change-Id: I8c6158fd3a66eb61fef97ebf09ea5364bca3f1ae Reviewed-on: https://skia-review.googlesource.com/119101 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* fix path to rect when missing close verbGravatar Cary Clark2018-04-10
| | | | | | | | | | | R=brianosman@google.com,robertphillips@google.com TBR=reed@google.com Bug: 824145,skia:7792 Change-Id: I24f121cfa7d437c95b94bd917d3c4888a10c519e Reviewed-on: https://skia-review.googlesource.com/119569 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Reland "Remove deprectated GrContext::MakeGL overloads that take raw ptr"Gravatar Brian Salomon2018-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 87f852d1a30f040cfa0e9567b17ec236e14a0f41. Reason for revert: Google3 updated Original change's description: > Revert "Remove deprectated GrContext::MakeGL overloads that take raw ptr" > > This reverts commit efa60a1d13fa1de00a4cba0454fdd9ad375caa72. > > Reason for revert: Surprise! Google3 still uses these. > > Original change's description: > > Remove deprectated GrContext::MakeGL overloads that take raw ptr > > > > Change-Id: Iae12bf61fa1e2f5d4b13b98198cddb7482656fdf > > Reviewed-on: https://skia-review.googlesource.com/118660 > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com > > Change-Id: Ica09d80e1563924a286a4a6aa8a1f93cb5ca9c5d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/119001 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I87c12253f759a97cb4da3ff35dc1ec846513caef Reviewed-on: https://skia-review.googlesource.com/119921 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove SK_SUPPORT_LEGACY_BLURMASKFILTERGravatar Brian Osman2018-04-06
| | | | | | | Change-Id: I1d99d9bb83d8a612d1c1fd298c1f7ed706a2277b Reviewed-on: https://skia-review.googlesource.com/118990 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add versions of MakeGL() that don't require include GrGLInterface.h in order ↵Gravatar Brian Salomon2018-04-06
| | | | | | | | | to use the GrGLMakeNativeInterface Change-Id: I77bd3c683c284aecc50a3552bbf1fb901f1bcc44 Reviewed-on: https://skia-review.googlesource.com/119002 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Don't use GrPixelConfig value as proxy for valid on GrBackendSurface.Gravatar Greg Daniel2018-04-06
| | | | | | | | Bug: skia: Change-Id: I275b74b915240c9918bb2efa6a9708341f3bb189 Reviewed-on: https://skia-review.googlesource.com/119004 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* remove SK_IGNORE_TO_STRINGGravatar Cary Clark2018-04-05
| | | | | | | | | | | | | | | | | | | SK_IGNORE_TO_STRING is not defined anywhere. The same effect can be had by using a modern linker. Removing it simplifies bookmaker and makes our includes easier to understand. R=robertphillips@google.com TBR=reed@google.com Bug: skia:6898 Change-Id: Ib716f5ef1b42a7fbda0df43ece212d1b7c40289f Reviewed-on: https://skia-review.googlesource.com/118963 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* Revert "Remove deprectated GrContext::MakeGL overloads that take raw ptr"Gravatar Robert Phillips2018-04-05
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit efa60a1d13fa1de00a4cba0454fdd9ad375caa72. Reason for revert: Surprise! Google3 still uses these. Original change's description: > Remove deprectated GrContext::MakeGL overloads that take raw ptr > > Change-Id: Iae12bf61fa1e2f5d4b13b98198cddb7482656fdf > Reviewed-on: https://skia-review.googlesource.com/118660 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Ica09d80e1563924a286a4a6aa8a1f93cb5ca9c5d No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/119001 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove deprectated GrContext::MakeGL overloads that take raw ptrGravatar Brian Salomon2018-04-05
| | | | | | | Change-Id: Iae12bf61fa1e2f5d4b13b98198cddb7482656fdf Reviewed-on: https://skia-review.googlesource.com/118660 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add maxTextureSize()/maxRenderTargetSize() to GrContextGravatar Brian Salomon2018-04-05
| | | | | | | | | This provides an alternative way to access these values which will allow removal GrContext::caps() from public API Change-Id: I53d3c00563da8847e1fc14aea9750dc9fd90d1e5 Reviewed-on: https://skia-review.googlesource.com/118962 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add GrBackendTexture/RenderTarget accessors to SkSurfaceGravatar Robert Phillips2018-04-05
| | | | | | | | | Change-Id: I63477fd4b8d48dc50af72736f0f8df566cd96d4a Reviewed-on: https://skia-review.googlesource.com/85220 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add SK_API to SkSurfaceCharacterizationGravatar Robert Phillips2018-04-05
| | | | | | | | | TBR=bsalomon@google.com Change-Id: I111a6e3eef798d6ad904c17eb536bb64c3801bb2 Reviewed-on: https://skia-review.googlesource.com/118594 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* tweak SkImage documentationGravatar Cary Clark2018-04-05
| | | | | | | | | | | | | | | - fix syntactic nits - add how to check result of getBackendTexture - add example R=robertphillips@google.com TBR=reed@google.com Docs-Preview: https://skia.org/?cl=118590 Bug: skia:6898 Change-Id: I60cfcf448dc2f201ecc34d33ead707d0c3e3b86b Reviewed-on: https://skia-review.googlesource.com/118590 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* Add GrBackendTexture accessor to SkImage (take 2)Gravatar Robert Phillips2018-04-04
| | | | | | | | | | | This makes accessing the GPU resource behind an SkImage a lot more typesafe. Additionally, the GrBackendObject is being deprecated so this is the path forward. I split the controversial stuff off into https://skia-review.googlesource.com/c/skia/+/118575 (Add SkImage::setLayout call). Change-Id: I297e72770e8fb360fac7c7cd74f050ae759ae133 Reviewed-on: https://skia-review.googlesource.com/118571 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* move SkIPoint16 to private headerGravatar Mike Reed2018-04-04
| | | | | | | | | Bug: skia: Change-Id: Ib8045ac7cc24a44c4b70e73153c6faf098730b63 Reviewed-on: https://skia-review.googlesource.com/118721 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add SkSurfaceCharacterization operator== && !=Gravatar Robert Phillips2018-04-04
| | | | | | | | | TBR=bsalomon@google.com Change-Id: Ic58849dcb3be1f00431f897af328f6f3c3f00d75 Reviewed-on: https://skia-review.googlesource.com/118340 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Hide GrPixelConfig in SkSurfaceCharacterizationGravatar Robert Phillips2018-04-04
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ifc38d0ca2b18128d27c187f789461fea62d1edae Reviewed-on: https://skia-review.googlesource.com/117440 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add API for SkTextBlob serialization into caller's memory.Gravatar Khushal2018-04-04
| | | | | | | | | | R=reed@google.com Change-Id: Iaeb67504aabf0dc036e81fa23c1a3c949b72b2b9 Reviewed-on: https://skia-review.googlesource.com/114262 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Mike Reed <reed@google.com>
* fix SkImageInfo indentationGravatar Cary Clark2018-04-03
| | | | | | | | | | | | The presence of global functions threw off the indentation of themselves and everything following. TBR=reed@google.com Bug: skia:6898 Change-Id: I3c6c21b62922f42157085fa7aaa19deb9560f16d Reviewed-on: https://skia-review.googlesource.com/118380 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* update autogenerated includesGravatar Cary Clark2018-04-03
| | | | | | | | | | | | SkImageInfo.h is generated for the first time. Minor corrections in the other includes. TBR=reed@google.com Bug: skia:6898 Change-Id: I9a16753e234ace3bfbcc5b58381347fd0e63b1c8 Reviewed-on: https://skia-review.googlesource.com/118168 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* Revert "implement SkTDArray with std::vector"Gravatar Mike Klein2018-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 80e1d56e198c5fd9fe6db0c945bd558053a8dc6a. Reason for revert: SkRTree.cpp:57 asserting, probably this? Original change's description: > implement SkTDArray with std::vector > > It's always worth seeing if we can get away with replacing custom data > structures with ones from the standard library. Our array-like types > are all good candidates to replace with std::vector, and it's especially > easy to start with SkTDArray. Unlike the others, it has no preallocated > S-variant, which is tricky to make work with std::vector. > > SkTDArray also has known integer overflow bugs, leading to out of range > writes. It'd be _very_ nice to ditch it for a better standard vector. > > I removed a bunch of unused or little-used methods, and updated a couple > call sites that used methods in unusual or dangerous ways. > > I've had to tweak GrAAConvexTessellator and SkBaseShadowTessellator just > a touch to work within the constraints of an std::vector impl. It's not > intended to be legal to write to the reserved-but-not-counted elements > of an SkTDArray, but you can get away with it in our old implementation. > This version now uses setCount() to actually reserve and count them, and > should have the same performance and use the same amount of memory. > > The PathMeasure_explosion GM I added recently to reproduce this bug now > draws without triggering undefined behavior or ASAN errors, provided you > have ~40GB of RAM. > > Bug: skia:7674 > > Change-Id: I4eacae18a976cd4a6d218102f8ca5d973d4d7d0e > Reviewed-on: https://skia-review.googlesource.com/115982 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,bungeman@google.com,brianosman@google.com Change-Id: Icffd9f22fe89746a970ff598e1a05c774960bc0e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7674 Reviewed-on: https://skia-review.googlesource.com/117901 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "In older STLs, std::vector::insert() returns void."Gravatar Mike Klein2018-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7dd8ee9c6091fe51c9d337c06d6243731a0aafb3. Reason for revert: going to revert primary CL Original change's description: > In older STLs, std::vector::insert() returns void. > > CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-arm-Debug-Chromebook_GLES > > Change-Id: I7bd15ecc7122965db16fbb51e51ee166b05dce2f > Reviewed-on: https://skia-review.googlesource.com/117722 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I9c126edbef74293d8e7a2b7e2365e464ba367ae5 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-arm-Debug-Chromebook_GLES Reviewed-on: https://skia-review.googlesource.com/117900 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* In older STLs, std::vector::insert() returns void.Gravatar Mike Klein2018-04-02
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-arm-Debug-Chromebook_GLES Change-Id: I7bd15ecc7122965db16fbb51e51ee166b05dce2f Reviewed-on: https://skia-review.googlesource.com/117722 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ccpr: Normalize homogeneous coords with frexp/ldexpGravatar Chris Dalton2018-04-02
| | | | | | | | | | | | Hopefully increases cubic accuracy by manipulating exponents instead of calling normalize(). Bug: skia: Change-Id: I8d3596e858a2fbb6650c158753133c5a2e01e166 Reviewed-on: https://skia-review.googlesource.com/117009 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* implement SkTDArray with std::vectorGravatar Mike Klein2018-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's always worth seeing if we can get away with replacing custom data structures with ones from the standard library. Our array-like types are all good candidates to replace with std::vector, and it's especially easy to start with SkTDArray. Unlike the others, it has no preallocated S-variant, which is tricky to make work with std::vector. SkTDArray also has known integer overflow bugs, leading to out of range writes. It'd be _very_ nice to ditch it for a better standard vector. I removed a bunch of unused or little-used methods, and updated a couple call sites that used methods in unusual or dangerous ways. I've had to tweak GrAAConvexTessellator and SkBaseShadowTessellator just a touch to work within the constraints of an std::vector impl. It's not intended to be legal to write to the reserved-but-not-counted elements of an SkTDArray, but you can get away with it in our old implementation. This version now uses setCount() to actually reserve and count them, and should have the same performance and use the same amount of memory. The PathMeasure_explosion GM I added recently to reproduce this bug now draws without triggering undefined behavior or ASAN errors, provided you have ~40GB of RAM. Bug: skia:7674 Change-Id: I4eacae18a976cd4a6d218102f8ca5d973d4d7d0e Reviewed-on: https://skia-review.googlesource.com/115982 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* fix SkRRect fuzzer assertGravatar Cary Clark2018-04-02
| | | | | | | | | | | | | | | | | | | fuzzer bug triggers an assert in SkRRect::isValid because on radius is zero and the other, while small, is not. The radii are normally both set to zero if one is zero in SkRRect::setRectRadii. However, subsequently scaleRadii may set one to zero when normalizing the pair. Move the clamping code out of setRectRadii so it can be called from scaleRadii as well. R=reed@google.com Bug: skia: Change-Id: Ib9a86da7212567b2f4b83d99a41cf9ba2c30e9b9 Reviewed-on: https://skia-review.googlesource.com/115701 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Add SkSurface factory that takes an SkSurfaceCharacterizationGravatar Robert Phillips2018-03-30
| | | | | | | | | TBR=bsalomon@google.com Change-Id: Ie38123dc7c35005bfe8500bf4a16e0d16bbf36bd Reviewed-on: https://skia-review.googlesource.com/117236 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "vulkan: Blacklist MSAA path renderer on Qualcomm drivers"Gravatar Chris Dalton2018-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 03616574024a7f321e885e5ab6fc575746573109. Reason for revert: Caused more bad golds than it fixed Original change's description: > vulkan: Blacklist MSAA path renderer on Qualcomm drivers > > Bug: skia:7758 > Change-Id: I96b5c259352949d67f5e0263a7164cdce54b3269 > Reviewed-on: https://skia-review.googlesource.com/117152 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=djsollen@google.com,egdaniel@google.com,csmartdalton@google.com Change-Id: I80714a4cba7d495bc6ad89616b6c5f6eb8492bdb No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7758 Reviewed-on: https://skia-review.googlesource.com/117340 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add SK_API to GrContextThreadSafeProxyGravatar Robert Phillips2018-03-29
| | | | | | | | | TBR=egdaniel@google.com TBR=bsalomon@google.com Change-Id: I7dabb22ae391c6ec124bdfc65c4120de4193352e Reviewed-on: https://skia-review.googlesource.com/117235 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* vulkan: Blacklist MSAA path renderer on Qualcomm driversGravatar Chris Dalton2018-03-29
| | | | | | | | | Bug: skia:7758 Change-Id: I96b5c259352949d67f5e0263a7164cdce54b3269 Reviewed-on: https://skia-review.googlesource.com/117152 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Dump additional details about the gpu resources.Gravatar Derek Sollenberger2018-03-29
| | | | | | | | | | | | | | | | | GpuResources now dump optional string values that describe the type and category of the resource. The type provides a description of the kind of resource it is (e.g. texture, buffer object, stencil, etc.) and the category describes what the resource is currently tasked to do (e.g. path masks, images, scratch, etc.) This CL also refactors the dump logic in an attempt to consolidate duplicated code into GrGpuResources.cpp. Bug: b/74435803 Change-Id: I83cae825f41e6450a21398ab3ecea349c7c61c15 Reviewed-on: https://skia-review.googlesource.com/115989 Commit-Queue: Derek Sollenberger <djsollen@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fixing build with SK_IGNORE_TO_STRING defined.Gravatar Kaloyan Donev2018-03-29
| | | | | | | Change-Id: Id7238e427e490338d1f610255774c2069cfd4879 Reviewed-on: https://skia-review.googlesource.com/117060 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Add new GrResourceCache::purgeUnlockedResources variantGravatar Robert Phillips2018-03-28
| | | | | | | | | TBR=bsalomon@google.com Change-Id: I05bef1f8a271474db878a046cc1f6ac7b60a15f1 Reviewed-on: https://skia-review.googlesource.com/116801 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fixed warnings for casting large type to smaller one.Gravatar Kaloyan Donev2018-03-27
| | | | | | | Change-Id: Ib3e2661d0383bf154bc9178dac070dfd910a393c Reviewed-on: https://skia-review.googlesource.com/115200 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Add SkColorSpaceXform_skcmsGravatar Brian Osman2018-03-27
| | | | | | | | | | | Currently only enabled in Skia dev builds. Has some diffs in GMs and images, but (hopefully) nothing major. Bug: skia: Change-Id: Ifdf5d2804e59f555a3dc84f657e438dd589a2751 Reviewed-on: https://skia-review.googlesource.com/116520 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Hide GrBackendTexture/RenderTarget constructors that take a GrPixelConfigGravatar Brian Salomon2018-03-23
| | | | | | | | | | Make GrGLTexture use the version that takes GrMipMapped. Bug: skia:6718 Change-Id: Id3e801bcb5e781938e610bdea75bd92498117935 Reviewed-on: https://skia-review.googlesource.com/116221 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove legacy GrContext factories function and supporting code/types.Gravatar Brian Salomon2018-03-23
| | | | | | | Change-Id: I437a4a0a58bf70ea1b8b0659b099a2af2bfa64fe Reviewed-on: https://skia-review.googlesource.com/116197 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move GrPixelConfig to GrTypesPrivGravatar Brian Salomon2018-03-23
| | | | | | | | | BUG= skia:6718 Change-Id: I254a5d289c1216e580b8f7fe613236c090d0e901 Reviewed-on: https://skia-review.googlesource.com/116196 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove legacy SkSurface::MakeFromBackendRenderTarget that does not take ↵Gravatar Brian Salomon2018-03-23
| | | | | | | | | | SkColorType Bug: skia:6718 Change-Id: Iefec5be49bf7450426c5ddb668f5525876f8ec2d Reviewed-on: https://skia-review.googlesource.com/116194 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>