aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Validate readByteArrayAsData sizeGravatar Florin Malita2018-05-10
| | | | | | | | | | | | Check that the reader has enough data before attempting to allocate the buffer. Also update to return nullptr on read failures. Change-Id: Ia1ea8f611bad95cf3a4493b12582ac3fa7c2b00f Reviewed-on: https://skia-review.googlesource.com/127129 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Add driver bug workarounds to GrCapsGravatar Adrienne Walker2018-05-10
| | | | | | | | | | | | | This moves GrDriverBugWorkarounds to include so that it can be included by GrCaps. This also makes GrContextOptions a nearly empty class in the case of !SK_SUPPORT_GPU so that non-gpu builds don't need to build in GrDriverBugWorkarounds.cpp. Bug: chromium: 829614 Change-Id: Iedf73677fd09e9a487cfe618a696fd4b25c8703d Reviewed-on: https://skia-review.googlesource.com/126581 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Adrienne Walker <enne@chromium.org>
* Remove GrBackendObject and all related functions from Skia.Gravatar Greg Daniel2018-05-10
| | | | | | | | Bug: skia: Change-Id: I59434b7477c0bc26fd982bd81eb97ab94bbba073 Reviewed-on: https://skia-review.googlesource.com/125822 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Validate gradient DescriptorScope size during deserializationGravatar Florin Malita2018-05-10
| | | | | | | | | | Check that the reader has sufficient data before allocating buffers. Bug: skia:7937 Change-Id: I2352d9a5cbace77b77c150a3a6439e8ac18b0dc5 Reviewed-on: https://skia-review.googlesource.com/127132 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* Revert "Revert "Don't use GrRRectBlurEffect for large rects when highp is ↵Gravatar Brian Salomon2018-05-10
| | | | | | | | | | | | | not full float"" This reverts commit 729715298c8af1d2ecc4cbe887eeeb9a1c17c595. Changed std::abs() to SkScalarAbs() and #include "SkScalar.h" Change-Id: I9a02ca1a63eef748f9a11d324e8bb89e14571bc9 Reviewed-on: https://skia-review.googlesource.com/127320 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix clipping of SkMatrixImageFilter input (take 2)Gravatar Robert Phillips2018-05-10
| | | | | | | | | | This cannot land before the Chrome CL https://chromium-review.googlesource.com/c/chromium/src/+/1052850 (Add a flag to ignore an upcoming Skia bug fix that changes layout and unit tests) Bug: skia:7931 Change-Id: I2951a727bd3f61aeda0e1e322cd76e48f677f75f Reviewed-on: https://skia-review.googlesource.com/127125 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix extra texture creation in GrResourceProvider::createTexture() with SRGB ↵Gravatar Brian Salomon2018-05-09
| | | | | | | | | | | | | | | | | | | | data. We would make a temporary surface context around a scratch texture with a SRGB color space and then attempt writePixels with a src SkImageInfo with no color space. Then we'd fall back to creating a texture with initial data. Now we will make the src SkImageInfo have a SRGB color space and then assume success. Bug: b/78866720 Change-Id: I541a3b73c72f610533cfbc6892b2782c90e5121d Reviewed-on: https://skia-review.googlesource.com/127130 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Don't use GrRRectBlurEffect for large rects when highp is not full ↵Gravatar Brian Salomon2018-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | float" This reverts commit e0dc9432d8836ec34a3ef90eabc39eadc3d1db90. Reason for revert: compile breakage Original change's description: > Don't use GrRRectBlurEffect for large rects when highp is not full float > > Change-Id: Idf12e0a1fba2d9bd2fab8100bd9319c6ec6115b9 > Reviewed-on: https://skia-review.googlesource.com/127049 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Ibbf8abfd4089d963d2457db4710207d1c91faf35 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/127180 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Support C++11 range-for loops in SkTInternalLListGravatar Chris Dalton2018-05-09
| | | | | | | | Bug: skia: Change-Id: Iad5e06fac95c5b805f3735c106103e5a07975b5d Reviewed-on: https://skia-review.googlesource.com/127106 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Don't use GrRRectBlurEffect for large rects when highp is not full floatGravatar Brian Salomon2018-05-09
| | | | | | | Change-Id: Idf12e0a1fba2d9bd2fab8100bd9319c6ec6115b9 Reviewed-on: https://skia-review.googlesource.com/127049 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* SkColorSpace::Make(const skcms_ICCProfile&)Gravatar Mike Klein2018-05-09
| | | | | | | | Change-Id: Ib12208d6c148f143fdd0b54538d852b97616a72d Reviewed-on: https://skia-review.googlesource.com/127122 Commit-Queue: Mike Klein <mtklein@chromium.org> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* strip down SkICC.cppGravatar Mike Klein2018-05-09
| | | | | | | | | | | | | | | | Most of SkICC{.h,.cpp} is unused and gone. I've renamed the part that's left to SkWriteICCProfile() and tweaked its API just a little, leaving SkICC:WriteToICC() a wrapper around it. Most of the tests in ICCTest.cpp are moot and deleted, but a few looked somewhat valuable so I've kept them with a little modification. Change-Id: Ia1bb4c772af679885e17dac53d213c315ad0828c Reviewed-on: https://skia-review.googlesource.com/127022 Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Fix clipping of SkMatrixImageFilter input"Gravatar Robert Phillips2018-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cb8b5d1101d0a1bf7c78f3d1fec73afbe470994c. Reason for revert: Chrome layout tests Original change's description: > Fix clipping of SkMatrixImageFilter input > > Bug: skia:7931 > Change-Id: I3e424dcd5c0b04542976f4f59a5836e7c3079d06 > Reviewed-on: https://skia-review.googlesource.com/127020 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: I6b871071e180c45016038dcf2b01d2c96e93911c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7931 Reviewed-on: https://skia-review.googlesource.com/127160 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* rewrite while to for loop to avoid last incrementGravatar Mike Reed2018-05-09
| | | | | | | | | | | | Can we efficiently avoid the last "increment" step for these sorts of loops? We are always calculating one more value than we actually need (we do this everywhere we forward-difference something). Bug: oss-fuzz:8146 Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Change-Id: I8b2838cc51370d53b8854191fce9ff87e5dc669d Reviewed-on: https://skia-review.googlesource.com/127042 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* check for focaldata failureGravatar Mike Reed2018-05-09
| | | | | | | | Bug: oss-fuzz:8150 Change-Id: I061365aa5baa62405d732e92beb560a557671bf6 Reviewed-on: https://skia-review.googlesource.com/127046 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* make sure we don't set level-of-detail to zeroGravatar Mike Reed2018-05-09
| | | | | | | | Bug: oss-fuzz:8156 Change-Id: I37c7fd758e347b609410c40b74f702e38b95434e Reviewed-on: https://skia-review.googlesource.com/127048 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* ccpr: Clean up GrCoverageCountingPathRendererGravatar Chris Dalton2018-05-09
| | | | | | | | | | | | Extracts all the nested classes to their own files and detangles their interactions. Encapsulates the per-flush resources in their in their own separate class. Bug: skia: Change-Id: Ic134b627f6b66cb2ce1e5d6f896ac6b2f75f6fa2 Reviewed-on: https://skia-review.googlesource.com/126845 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Approximate conics as quads in GrAAHairlinePathRenderer when fp32 not supportedGravatar Brian Salomon2018-05-09
| | | | | | | | | This fixes the precision issues with hairline conics on Mali 4xx. Change-Id: I1924915eba7bf6056df1fb8dd366ecebd8c40dd0 Reviewed-on: https://skia-review.googlesource.com/126622 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "SkAdvancedTypefaceMetrics: factor out GlyphToUnicode""Gravatar Hal Canary2018-05-09
| | | | | | | | | This reverts commit 97c1108607584b6050a6880d6ce22846e4913a92. Change-Id: Ic3c6addc64ced39766bbee3e10b4d88faf61ba2f Reviewed-on: https://skia-review.googlesource.com/127021 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Add fPreferExternalImagesOverES3 to GrContextOptionsGravatar Brian Osman2018-05-09
| | | | | | | | | | | | | This forces us to use the ES2 shading language when we have an ES3 context, but the driver claims to only support GL_OES_EGL_image_external (and not the _essl3 variant). Many of these devices will work correctly if we blindly enable both extensions, but there are some that won't. Bug: skia: Change-Id: Id632003a1905ea61b46166befd30905a57cead69 Reviewed-on: https://skia-review.googlesource.com/126681 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix clipping of SkMatrixImageFilter inputGravatar Robert Phillips2018-05-09
| | | | | | | | Bug: skia:7931 Change-Id: I3e424dcd5c0b04542976f4f59a5836e7c3079d06 Reviewed-on: https://skia-review.googlesource.com/127020 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove SK_IGNORE_MASK_FILTER_GLYPH_FIX.Gravatar Ben Wagner2018-05-09
| | | | | | | | | | | This removes the SK_IGNORE_MASK_FILTER_GLYPH_FIX flag check and the code it guards. This flag existed for rebaselining and the rebaselines have been done. Change-Id: Ic2d6850051a7f4dcbf2e31c6174db1248ce9367a Reviewed-on: https://skia-review.googlesource.com/126925 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "SkAdvancedTypefaceMetrics: factor out GlyphToUnicode"Gravatar Greg Daniel2018-05-09
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1c2bcd8b14e029a70e88b1e81acd29553cab0d1c. Reason for revert: breaking chrome roll Original change's description: > SkAdvancedTypefaceMetrics: factor out GlyphToUnicode > > Change-Id: Iedce8c1ea2c405d5ab64ccac353970d5cd2b9d63 > Reviewed-on: https://skia-review.googlesource.com/126507 > Commit-Queue: Hal Canary <halcanary@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> TBR=halcanary@google.com,bungeman@google.com,reed@google.com Change-Id: Ib1ff8484ffd09cdb88d461ac00745aa32c191124 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/127000 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* clean up some SkDebugf()Gravatar Mike Klein2018-05-09
| | | | | | | | | | | These annoy the crap out of me every time I run DM. Change-Id: I76edf1d5a5c1931a93d208ba1d8db5220987e62d Reviewed-on: https://skia-review.googlesource.com/126929 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* ccpr: Cleanup on-flush path statsGravatar Chris Dalton2018-05-09
| | | | | | | | | | | | Adds a wrapper struct to limit the number of free variables. Fixes a bug where we preallocated draw instances for clip paths. Counts conic weights and preallocates their buffer as well. Bug: skia: Change-Id: I72779c9017322a0dc64461c8cb927f975406b9af Reviewed-on: https://skia-review.googlesource.com/126844 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Cleanup SK_IGNORE_BLUR_IMAGE_FILTER_FIX (since Chrome no longer uses it)Gravatar Robert Phillips2018-05-09
| | | | | | | Change-Id: I3eebd6233d6f6a8b43ce0d865ffafd85d58f0c16 Reviewed-on: https://skia-review.googlesource.com/126926 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* When validating transfer fns, allow D > 1Gravatar Brian Osman2018-05-09
| | | | | | | | | | | | | | This matches behavior in skcms. Previously, we could get a profile with a large D value, skcms would decide it was okay, but then we'd be unable to create an SkColorSpace from it. Bug: chromium:841110 Change-Id: I2418a0b770172bff62a14d2d4d0fc7ba70f33e0b Reviewed-on: https://skia-review.googlesource.com/126920 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Auto-Submit: Brian Osman <brianosman@google.com>
* SkAdvancedTypefaceMetrics: factor out GlyphToUnicodeGravatar Hal Canary2018-05-09
| | | | | | | Change-Id: Iedce8c1ea2c405d5ab64ccac353970d5cd2b9d63 Reviewed-on: https://skia-review.googlesource.com/126507 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* fonts: Fix a trace name in SkRemoteGlyphCacheGravatar Khushal2018-05-09
| | | | | | | | | TBR=herb@google.com Change-Id: I5df4295a94d9af93e29ebf64b06f5259dc54ce90 Reviewed-on: https://skia-review.googlesource.com/126842 Reviewed-by: Khusal Sagar <khushalsagar@chromium.org> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
* fonts: Fix subpixel position mismatch in font remotingGravatar Khushal2018-05-08
| | | | | | | | | | R=herb@google.com Bug: skia:7786 Change-Id: Icb52be92d193eb17ac20734bfa7cb00370c6ea21 Reviewed-on: https://skia-review.googlesource.com/126664 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Treat SkFILEStream's fOriginalOffset as the startGravatar Leon Scroggins III2018-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: b/78866720 ::rewind() rewinds to fOriginalOffset ::seek(position) seeks to position + fOriginalOffset ::move(offset) will not move < fOriginalOffset ::getPosition() returns position relative to fOriginalOffset ::getLength() returns full size minus fOriginalOffset ::duplicate() and ::fork() pass on fOriginalOffset Android may create an SkFILEStream using a file descriptor whose offset is at the beginning of the data that Android cares about. Treat all positions in SkFILEStream as relative to that original offset. This allows AnimatedImageDrawable to read directly from the SkFILEStream, rather than using an SkFrontBufferedStream and forcing SkGifCodec to cache data for later use. This fixes a TODO that was introduced in https://skia-review.googlesource.com/c/skia/+/9498 and takes it a step further. In that CL, bungeman@ and I discussed the change and decided to "leave this alone for now to avoid changing behavior". Doing a code search today, the only two callers want the new behavior. Change-Id: I9211394d5b730adf528fac0df0af7a664b1295be Reviewed-on: https://skia-review.googlesource.com/126511 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Only enable noperspective with ES3 shading languageGravatar Brian Osman2018-05-08
| | | | | | | | | | | | | | This will never happen in real usage - the extension requires ES3 support. However, we're likely to be testing/running with ES3 and ES2 shading language to work around driver bugs on other devices. Across many devices, this was the only issue I found when forcing ES2 shading language, so it seemed worth fixing. Change-Id: I8b75c6935827c1a24c712cec4b36515581aea353 Reviewed-on: https://skia-review.googlesource.com/126640 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* SkBlurMask to blur all the things.Gravatar Ben Wagner2018-05-08
| | | | | | | | | | | | | | | SkBlurMask used to handle only A8 as input, and was recently extended to ARGB as input. This adds LCD16 and A1 as inputs as well, allowing SkScalerContext to no longer force all requests with a mask filter to A8. This also fixes the shadows for LCD16 and A1 glyphs, which at small sigma were quite obviously wrong since they were generated from an A8 version. Change-Id: I151cdbf5556d18c2938da990ecee5bcd8ee31be8 Reviewed-on: https://skia-review.googlesource.com/126615 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Use device and key descriptorsGravatar Herb Derby2018-05-08
| | | | | | | Change-Id: I2ac13303376f3d1464dd1e259637374a9c5ef237 Reviewed-on: https://skia-review.googlesource.com/125823 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Khushal Sagar <khushalsagar@google.com>
* Add a drawPaths method to GrCCPathProcessorGravatar Chris Dalton2018-05-08
| | | | | | | | Bug: skia: Change-Id: I5d3762203cbe1d823ea3f3967240bcab76651f2c Reviewed-on: https://skia-review.googlesource.com/126662 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fix a bug in SkGpuBlurUtils::GaussianBlur (take 3)Gravatar Robert Phillips2018-05-08
| | | | | | | | | | | | | This fixes the remaining imageblurclampmode bug and a preexisting un-reported error in the imageblurrepeatmode GM. This relies on https://chromium-review.googlesource.com/c/chromium/src/+/1044113 (Add a flag to disable a blur imagefilter bug fix in Skia) landing in Chrome first. Bug: skia:7765 Change-Id: I66e27384541002829b2bd4b42d9cbda837aa7c3d Reviewed-on: https://skia-review.googlesource.com/125961 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-on: https://skia-review.googlesource.com/126220
* Avoid rerunning path renderer chain when path known to require swGravatar Brian Salomon2018-05-08
| | | | | | | Change-Id: If8bdeadf95543917a6e00570b5806a3ee23aa335 Reviewed-on: https://skia-review.googlesource.com/126508 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* text-blob: Fix OOM issues during blob deserialization.Gravatar Khushal2018-05-07
| | | | | | | | | | | | Limit the number of glyphs allowed during blob deserialization. Allocating for an arbitrary number can lead to OOM issues. Bug: 840096 Change-Id: I1673fd312438b99ff76dadcfdc9f9427acdca13b R=bsalomon@chromium.org Reviewed-on: https://skia-review.googlesource.com/126603 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Visit the image proxy in GrLatticeOpGravatar Brian Salomon2018-05-07
| | | | | | | | | Bug: b/77917978 Change-Id: Ib6b40ce891f576f4a1c7d624a2409f3bba36b344 Reviewed-on: https://skia-review.googlesource.com/126620 Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add null proxy test to SkGpuDevice::drawProducerLatticeGravatar Brian Salomon2018-05-07
| | | | | | | | | | | | Bug: b/77917978 TBR=brianosman@google.com Change-Id: Ib7ecb00dd0beac2444ca95106c2560c2b2940465 Reviewed-on: https://skia-review.googlesource.com/126509 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* SkAdvancedTypefaceMetrics: simplify moreGravatar Hal Canary2018-05-07
| | | | | | | Change-Id: I80c28c50aa96c28181d2fef13daad4a80ec91a12 Reviewed-on: https://skia-review.googlesource.com/120160 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* make SkColorSpace::MakeICC strict as skcmsGravatar Mike Klein2018-05-07
| | | | | | | | | | | | | | | We do this somewhat trivially by calling skcms_Parse() and failing if it fails. This will help keep us sane while we work to remove SkColorSpace::MakeICC(). Change-Id: Icb1bc1a088083e181f46465dbb3a530f0e004193 Reviewed-on: https://skia-review.googlesource.com/126510 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Handle failure to create SkColorSpaceXform in SkConvertPixelsGravatar Brian Osman2018-05-07
| | | | | | | | | | | | For now, this will just fallback to the pipeline code. Eventually, we may need to support more color spaces in skcms, (or put in a simpler fallback that just does type conversion and ignores color space)? Bug: chromium:838115 Change-Id: Id71eec6a72202683957c884620ee3fe90df6c776 Reviewed-on: https://skia-review.googlesource.com/126201 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Make sure the ScalerContextRec is denseGravatar Herb Derby2018-05-07
| | | | | | | | | | | Make sure that the Rec structure is dense because the SkDescriptor code takes checksums of this structure. Change-Id: Id384ed49e17f4613647da538c810f09a066efd90 Reviewed-on: https://skia-review.googlesource.com/126503 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Make GPU lattice/nine patch not bleed across cells.Gravatar Brian Salomon2018-05-07
| | | | | | | | | | | | | Consolidate code for handling various image/bitmap and lattice/ninepatch flavors. Makes refTextureForParams virtual on GrTextureProducer. Previously both subclasses had non-virtual flavors of this. Bug: b/77917978 Change-Id: I14787faef33c4617ef359039e81453d683f33ff1 Reviewed-on: https://skia-review.googlesource.com/125520 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Update canvas2D read/write pixels fast path to handle BGRA input/outputGravatar Brian Salomon2018-05-07
| | | | | | | Change-Id: Ib77b45dc0ea2b00c728b080d6d847f97b1471bff Reviewed-on: https://skia-review.googlesource.com/126482 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove android specific code - v2Gravatar Herb Derby2018-05-07
| | | | | | | Change-Id: I2010b168f1a1f3bc48b86a075b0398eaf46ea328 Reviewed-on: https://skia-review.googlesource.com/126480 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Reland "Avoid drawing BW clipped color glyphs many times."Gravatar Ben Wagner2018-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8a95244f626c2f7d4b66c8ca18266c2b0640bebb. Reason for revert: Didn't actually break anything. Original change's description: > Revert "Avoid drawing BW clipped color glyphs many times." > > This reverts commit bba38ee80e4140908ac0c351dc18a2f1224e5f0a. > > Reason for revert: possibly breaking chrome text > > Original change's description: > > Avoid drawing BW clipped color glyphs many times. > > > > Prior to this change if a color glyph is drawn through the raster device > > with an aliased clip the glyph is drawn once for each rectangular region > > in the aliased clip. In addition, even when the glyph was not a color > > glyph in this situation, the mask was checked for being a color glyph > > once for each rectangular region of the aliased clip. This change hoists > > the test for the color format out of the loop to ensure that the mask > > format is checked once and the mask is drawn once. > > > > This issue was discovered by rotating the coloremoji_blendmodes gm. > > > > Change-Id: I18b6b546356780e0b00948fff7b65783219f5c92 > > Reviewed-on: https://skia-review.googlesource.com/125868 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Ben Wagner <bungeman@google.com> > > TBR=mtklein@google.com,bungeman@google.com,reed@google.com > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Change-Id: Ife6d7255f9cb88b6f9d7a3c5800e88cc065e475b > Reviewed-on: https://skia-review.googlesource.com/126401 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,mtklein@google.com,bungeman@google.com,reed@google.com Change-Id: I7fc4c1f901bcee482f6b118b192caee14c112e43 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/126540 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Respect SkBitmapDeviceFilteredSurfaceProps in SkThreadedBMPDeviceGravatar Yuqian Li2018-05-07
| | | | | | | | | | | | Bug: skia:7909 Change-Id: I13ccfbdc883f764f60701383b90537d3175a8126 Reviewed-on: https://skia-review.googlesource.com/126100 Commit-Queue: Ben Wagner <bungeman@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com> Reviewed-on: https://skia-review.googlesource.com/126463 Reviewed-by: Greg Daniel <egdaniel@google.com>
* track bounds of top-level control opsGravatar Mike Klein2018-05-07
| | | | | | | | | | | | | | | | We don't need an explicit save-restore block to determine the bounds of top-level control operations... the implicit save-restore that all picutres have should logically work the same way. The commented test failed before this and passes now. Bug: skia:7735 Change-Id: Ibd31a3a9b0b48042ab3869a6bb57bc8d8bb78c09 Reviewed-on: https://skia-review.googlesource.com/126460 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>