aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* create imagepriv and name paramsGravatar Cary Clark2017-11-03
| | | | | | | | | | | | | | Named all parameters and made the names consistent for documentation. Moved SK_IMAGEFILTER_UNFLATTEN_COMMON to private file. TBR=reed@google.com Bug: skia:6898 Change-Id: I1343d2b16d4217088fa3bc9c40f1f4177fa32740 Reviewed-on: https://skia-review.googlesource.com/66521 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* Remove gradient onGetGLSLProcessorKey() overridesGravatar Florin Malita2017-11-03
| | | | | | | | | | | None of the gradient processor subclassess contributes anything to the base class key. Relocate the key logic to GrGradientEffect, and remove unneeded builerplate. Change-Id: I6b33ad359212579adedf95c0c3d481373c83d4c4 Reviewed-on: https://skia-review.googlesource.com/67721 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* add some lowp gradient stagesGravatar Mike Klein2017-11-03
| | | | | | | | | | | | | | I was originally going to add these to help test a lowp dither, but after looking at diffs I don't think lowp dither is a good idea. Non-dithered lowp gradients look fine to me so far. I'd have done conics, but they scare me. Change-Id: I8f5e75aec726983186214845ca38cfa0d54496b3 Reviewed-on: https://skia-review.googlesource.com/66460 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Revert "Fix int overflow issues with clip and path bounds, take 2.""Gravatar Jim Van Verth2017-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e3a700522f6e088be00011bc98fcdc4a13bd798b. Reason for revert: The GM changes I saw appear to be due to a new bot. Original change's description: > Revert "Fix int overflow issues with clip and path bounds, take 2." > > This reverts commit 430ad1f2065c182746e43e67ca95fb911cc55892. > > Reason for revert: Many bad GMs. > > Original change's description: > > Fix int overflow issues with clip and path bounds, take 2. > > > > * Change IsInsideClip test to be more int overflow friendly > > * Check to make sure path bounds can have representable width and height > > > > Bug: skia:7239 > > Bug: skia:7240 > > Change-Id: If8468e46bc74a428c25d466ff3756d0cad385c09 > > Reviewed-on: https://skia-review.googlesource.com/66154 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Jim Van Verth <jvanverth@google.com> > > TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com > > Change-Id: I5b1a651b60340bb4230893ef5f5d2df2ce6fd241 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7239, skia:7240 > Reviewed-on: https://skia-review.googlesource.com/67240 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I710ebeec30a4d7eb5fe7dd3a168df28073733cab No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7239, skia:7240 Reviewed-on: https://skia-review.googlesource.com/66862 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Support for direct gaussian blur evaluationGravatar Herb Derby2017-11-02
| | | | | | | Change-Id: I1b00ba2720648b75fce47d3f4d0f56fb8f2cd171 Reviewed-on: https://skia-review.googlesource.com/67041 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Remove SK_SUPPORT_LEGACY_AA_CHOICEGravatar Yuqian Li2017-11-02
| | | | | | | | Bug: skia: Change-Id: If754225685699c1d1e8e516fb2a4671da2d13572 Reviewed-on: https://skia-review.googlesource.com/67260 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Revert "Fix int overflow issues with clip and path bounds, take 2."Gravatar Jim Van Verth2017-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 430ad1f2065c182746e43e67ca95fb911cc55892. Reason for revert: Many bad GMs. Original change's description: > Fix int overflow issues with clip and path bounds, take 2. > > * Change IsInsideClip test to be more int overflow friendly > * Check to make sure path bounds can have representable width and height > > Bug: skia:7239 > Bug: skia:7240 > Change-Id: If8468e46bc74a428c25d466ff3756d0cad385c09 > Reviewed-on: https://skia-review.googlesource.com/66154 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I5b1a651b60340bb4230893ef5f5d2df2ce6fd241 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7239, skia:7240 Reviewed-on: https://skia-review.googlesource.com/67240 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Fix GPU blurring when using SkColorSpaceXformCanvasGravatar Brian Osman2017-11-02
| | | | | | | | | | | | | Several GMs didn't draw at all (and asserted in debug builds). This fixes all of that, so that the xform canvas (or even just pure-legaacy canvas) doesn't accidentally blur in linear space by creating sRGB render target contexts for sRGB-tagged inputs. Bug: skia: Change-Id: I37c567a1c5b0e004dc301e5c272c7b470ac5f4c8 Reviewed-on: https://skia-review.googlesource.com/66884 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Do not always allocate temp space in GrGLGpu::uploadTexDataGravatar Robert Phillips2017-11-02
| | | | | | | | | | | | | | The always allocate behavior (which is being changed here) was introduced in: https://codereview.chromium.org/1249543003/ (Creating functions for uploading a mipmapped texture) I have also created skbug.com/7258 (Improve GrGLGpu::uploadTexData memory behavior) to drive future improvments. Bug: 780766 Change-Id: I5aad7172003c947502b9ffd27d7e29e6389d7830 Reviewed-on: https://skia-review.googlesource.com/66800 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix int overflow issues with clip and path bounds, take 2.Gravatar Jim Van Verth2017-11-02
| | | | | | | | | | | | * Change IsInsideClip test to be more int overflow friendly * Check to make sure path bounds can have representable width and height Bug: skia:7239 Bug: skia:7240 Change-Id: If8468e46bc74a428c25d466ff3756d0cad385c09 Reviewed-on: https://skia-review.googlesource.com/66154 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Implement window rectangles in vulkan"Gravatar Jim Van Verth2017-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94c0468b2b4255e3beed81efdcfbf6d9d39e11e4. Reason for revert: <INSERT REASONING HERE> Original change's description: > Implement window rectangles in vulkan > > Bug: skia: > Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a > Reviewed-on: https://skia-review.googlesource.com/65423 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: I5a90cb57fb5d4bcf8c7e76a5f71a7f16edbaf6be No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/67060 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Fix signed/unsigned comparison in assert"Gravatar Chris Dalton2017-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ed6d6daa566c2576cd41b94b6d856d27ae325274. Reason for revert: vulkan crash Original change's description: > Fix signed/unsigned comparison in assert > > Bug: skia: > Change-Id: I4759ea1c42cad1d1b1f159d1d8c2c607453abad7 > Reviewed-on: https://skia-review.googlesource.com/66900 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=jvanverth@google.com,csmartdalton@google.com Change-Id: Idedaf001ba86bf76b86c317bbfeaf4226e37d314 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/67020 Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Fix signed/unsigned comparison in assertGravatar Chris Dalton2017-11-02
| | | | | | | | Bug: skia: Change-Id: I4759ea1c42cad1d1b1f159d1d8c2c607453abad7 Reviewed-on: https://skia-review.googlesource.com/66900 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* During flush store GrOp draw and upload records on GrOpFlushState instead of ↵Gravatar Brian Salomon2017-11-02
| | | | | | | | | | on the ops themselves. Bug: skia: Change-Id: Id99267d9e7762829a3f9bebce0e92e7b97a092f8 Reviewed-on: https://skia-review.googlesource.com/66680 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Implement window rectangles in vulkanGravatar Chris Dalton2017-11-02
| | | | | | | | | Bug: skia: Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a Reviewed-on: https://skia-review.googlesource.com/65423 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove content area from GrTextureAdjuster.Gravatar Greg Daniel2017-11-02
| | | | | | | | Bug: skia: Change-Id: I77854ee22303afe5787bf3094bca2db1a3dcf5ef Reviewed-on: https://skia-review.googlesource.com/66149 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* API to cache shader binaries between runs of Skia.Gravatar Ethan Nicholas2017-11-02
| | | | | | | | | | | | This CL does not include an actual implementation of said cache. Stan is working on the cache implementation on the Android side of things. Bug: skia: Change-Id: Iabe4f19b2dbacaaa1ead8bb3fa68d88c687b9a84 Reviewed-on: https://skia-review.googlesource.com/54780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Make the intervals in GrResourceAllocator use SkArenaAllocGravatar Robert Phillips2017-11-02
| | | | | | | Change-Id: I3190396fe34c01c232654fcb225dbf76df3137b4 Reviewed-on: https://skia-review.googlesource.com/66463 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Attempt to disable clear-as-draw-workaround on iOS PowerVR.Gravatar Brian Salomon2017-11-02
| | | | | | | | | | | | This workaround was modified here: https://chromium.googlesource.com/skia.git/+/43f8bf0f784f4182ed0fca9053ecf570caf7ad70 We have a report that this triggered a rendering regression on iOS. I believe this workaround was enabled on PowerVR due to issues on Android and not iOS. Change-Id: Iba4b589d8119f9e6106dec3504af156f536cb38c Reviewed-on: https://skia-review.googlesource.com/66541 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Streamline legacy gradient color conversionGravatar Florin Malita2017-11-01
| | | | | | | | | | | | | | | | To produce colors for interpolation in legacy mode, we currently do something like SkColor c = Sk4f_toS32(swizzle_rb(Sk4f::Load(c4f))); color4f = swizzle_rb(SkNx_cast<float>(Sk4b::Load(&c)) * (1/255.0f)); Let's see if we can streamline some of that. Change-Id: I423b5aa8c2df8d115cc236d5f0a2e79923a9c2cc Reviewed-on: https://skia-review.googlesource.com/66142 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Allow bitmap extraction from HEIF image sequencesGravatar Chong Zhang2017-11-01
| | | | | | | | | | b/63633199 Change-Id: I0e86589a485830066fe52ae3a74c18ee7f333a7d Reviewed-on: https://skia-review.googlesource.com/65883 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Chong Zhang <chz@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Revert "Fold analytic clip FPs into GrReducedClip"Gravatar Chris Dalton2017-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d29e0da3523e390eeb77b5a823d7ff86569ac1d3. Reason for revert: More asserts Original change's description: > Fold analytic clip FPs into GrReducedClip > > Perf result on Pixel phone (sorted by impact): > > GEOMEAN 6.73 -> 6.49 ms [96% ] > > top25desk_pinterest.skp 0.45 -> 0.49 ms [107%] > desk_pokemonwiki.skp 14.6 -> 15.9 ms [106%] > keymobi_pinterest.skp 0.47 -> 0.49 ms [104%] > ... > keymobi_androidpolice_com_2012_.skp 3.69 -> 3.09 ms [83% ] > keymobi_shop_mobileweb_ebay_com.skp 2.90 -> 2.29 ms [78% ] > keymobi_boingboing_net.skp 2.95 -> 2.29 ms [76% ] > desk_jsfiddlebigcar.skp 1.79 -> 1.29 ms [71% ] > keymobi_m_youtube_com_watch_v_9.skp 12.9 -> 9.09 ms [70% ] > keymobi_blogger.skp 3.80 -> 2.69 ms [70% ] > keymobi_sfgate_com_.skp 8.16 -> 5.69 ms [69% ] > > Cleaner code, improved skps, slightly better geometric mean time. > > Pixel C is mostly unaffected, presumably because it uses window > rectangles. > > Bug: skia:7190 > Change-Id: I9c7f3512ca57e1d1afcd42865357b63ffcc192ce > Reviewed-on: https://skia-review.googlesource.com/66280 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: Ia91076d7b7a240798f1543f892d41a2968b421ae No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7190 Reviewed-on: https://skia-review.googlesource.com/66184 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fold analytic clip FPs into GrReducedClipGravatar Chris Dalton2017-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perf result on Pixel phone (sorted by impact): GEOMEAN 6.73 -> 6.49 ms [96% ] top25desk_pinterest.skp 0.45 -> 0.49 ms [107%] desk_pokemonwiki.skp 14.6 -> 15.9 ms [106%] keymobi_pinterest.skp 0.47 -> 0.49 ms [104%] ... keymobi_androidpolice_com_2012_.skp 3.69 -> 3.09 ms [83% ] keymobi_shop_mobileweb_ebay_com.skp 2.90 -> 2.29 ms [78% ] keymobi_boingboing_net.skp 2.95 -> 2.29 ms [76% ] desk_jsfiddlebigcar.skp 1.79 -> 1.29 ms [71% ] keymobi_m_youtube_com_watch_v_9.skp 12.9 -> 9.09 ms [70% ] keymobi_blogger.skp 3.80 -> 2.69 ms [70% ] keymobi_sfgate_com_.skp 8.16 -> 5.69 ms [69% ] Cleaner code, improved skps, slightly better geometric mean time. Pixel C is mostly unaffected, presumably because it uses window rectangles. Bug: skia:7190 Change-Id: I9c7f3512ca57e1d1afcd42865357b63ffcc192ce Reviewed-on: https://skia-review.googlesource.com/66280 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Directly use SkScalerContextRec.Gravatar Ben Wagner2017-11-01
| | | | | | | | | | | | | | | | | Some time ago SkScalerContext::Rec was made SkScalerContextRec so that it could be forward declared. However, SkScalerContext::Rec remains as a typedef to SkScalerContextRec. This removes the typedef and updates the users to use the SkScalerContextRec type directly. This change was prompted by my own confusion when looking at some code which mixed these two, by IntelliSense's confusion when declaring an argument with one and defining with the other, and reducing the general proliferation of nested 'Rec' types in Skia. Change-Id: I3a23a4bdd83a591807c78cea6aa7a0117544b614 Reviewed-on: https://skia-review.googlesource.com/66153 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Gradient cleanup passGravatar Florin Malita2017-11-01
| | | | | | | | | | | 1) replace manual storage management with SkAutoSTMalloc 2) simplify explicit positions processing (remove redundant branch) Change-Id: I7841e2018ac421768ed1d61c4e3ef6a1d28f6244 Reviewed-on: https://skia-review.googlesource.com/66146 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Fold analytic clip FPs into GrReducedClip"Gravatar Chris Dalton2017-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1af37b758bc3c285effb7b96bd27faf4481d90d0. Reason for revert: asserts Original change's description: > Fold analytic clip FPs into GrReducedClip > > Perf result on Pixel phone (sorted by impact): > > GEOMEAN 6.73 -> 6.49 ms [96% ] > > top25desk_pinterest.skp 0.45 -> 0.49 ms [107%] > desk_pokemonwiki.skp 14.6 -> 15.9 ms [106%] > keymobi_pinterest.skp 0.47 -> 0.49 ms [104%] > ... > keymobi_androidpolice_com_2012_.skp 3.69 -> 3.09 ms [83% ] > keymobi_shop_mobileweb_ebay_com.skp 2.90 -> 2.29 ms [78% ] > keymobi_boingboing_net.skp 2.95 -> 2.29 ms [76% ] > desk_jsfiddlebigcar.skp 1.79 -> 1.29 ms [71% ] > keymobi_m_youtube_com_watch_v_9.skp 12.9 -> 9.09 ms [70% ] > keymobi_blogger.skp 3.80 -> 2.69 ms [70% ] > keymobi_sfgate_com_.skp 8.16 -> 5.69 ms [69% ] > > Cleaner code, improved skps, slightly better geometric mean time. > > Pixel C is mostly unaffected, presumably because it uses window > rectangles. > > Bug: skia:7190 > Change-Id: I070148258d04284def535134a72a4584c5d6f7c7 > Reviewed-on: https://skia-review.googlesource.com/65460 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com Change-Id: I6c325f969c1f4ff0fe80945a675c5f72a81d3865 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7190 Reviewed-on: https://skia-review.googlesource.com/66260 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fold analytic clip FPs into GrReducedClipGravatar Chris Dalton2017-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perf result on Pixel phone (sorted by impact): GEOMEAN 6.73 -> 6.49 ms [96% ] top25desk_pinterest.skp 0.45 -> 0.49 ms [107%] desk_pokemonwiki.skp 14.6 -> 15.9 ms [106%] keymobi_pinterest.skp 0.47 -> 0.49 ms [104%] ... keymobi_androidpolice_com_2012_.skp 3.69 -> 3.09 ms [83% ] keymobi_shop_mobileweb_ebay_com.skp 2.90 -> 2.29 ms [78% ] keymobi_boingboing_net.skp 2.95 -> 2.29 ms [76% ] desk_jsfiddlebigcar.skp 1.79 -> 1.29 ms [71% ] keymobi_m_youtube_com_watch_v_9.skp 12.9 -> 9.09 ms [70% ] keymobi_blogger.skp 3.80 -> 2.69 ms [70% ] keymobi_sfgate_com_.skp 8.16 -> 5.69 ms [69% ] Cleaner code, improved skps, slightly better geometric mean time. Pixel C is mostly unaffected, presumably because it uses window rectangles. Bug: skia:7190 Change-Id: I070148258d04284def535134a72a4584c5d6f7c7 Reviewed-on: https://skia-review.googlesource.com/65460 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* consolidate SkSRGB functions, and remove unusedGravatar Mike Klein2017-11-01
| | | | | | | | | | | | | This kills off the unused routines in this file, and folds the singly-used routines into sk_linear_to_srgb(). It also takes away the templating. No one's calling these with anything but Sk4f. Change-Id: I93ba7c59ea28c9c1a8f852167c31cdb44d53bb5a Reviewed-on: https://skia-review.googlesource.com/66152 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Plumb internal helper to enable more GPU GMs w/SkColorSpaceXformCanvasGravatar Brian Osman2017-11-01
| | | | | | | | | | | | API change isn't really public. TBR:bsalomon@google.com Bug: skia: Change-Id: I3a1ae5d7ddb562387e8b8e1248b347704f88037b Reviewed-on: https://skia-review.googlesource.com/66144 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Update GrTextureMaker to handle mips when copying for npotGravatar Greg Daniel2017-11-01
| | | | | | | | Bug: skia: Change-Id: I4b5ea3b8fadf207aef521404c4e9205df23ef3c8 Reviewed-on: https://skia-review.googlesource.com/65900 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* More attempts at clipping perf.Gravatar Jim Van Verth2017-11-01
| | | | | | | | | | | | | | With the 1.5x allocation strategy, it can take more reallocations to reach a similar size as before. Increasing this initial size reduces the number of reallocations. Also reduce size of Geometry struct slightly. Bug: skia:7230 Change-Id: Ied3f275b01b07aa300e0b7e1f24abc5fc3853ea7 Reviewed-on: https://skia-review.googlesource.com/64500 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* fix typo in SkJpegCodec.cppGravatar Mike Klein2017-11-01
| | | | | | | | | The missing break rejects grayscale profiles for grayscale images. Change-Id: I16ad8e7b581f009257a47c4e0f45f7b3c0008487 Reviewed-on: https://skia-review.googlesource.com/66140 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* another batch of lowp stagesGravatar Mike Klein2017-11-01
| | | | | | | | | | The 4444 image in all_bitmap_configs now draws slightly different before and after serialization. (It's serialized as 8888.) Still looks fine. Change-Id: I1396cf1550b6769a1734ed25d59bd5b1866dfacd Reviewed-on: https://skia-review.googlesource.com/65960 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix undefined behavior in normalize_t_sGravatar Chris Dalton2017-10-31
| | | | | | | | | BUG=chromium:743617 Change-Id: I00ad3103cdd5b7d2eac3b6827a3c2932009042a9 Reviewed-on: https://skia-review.googlesource.com/65860 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Allow GrAppliedClip to have >1 clip coverage FPGravatar Chris Dalton2017-10-31
| | | | | | | | Bug: skia:7190 Change-Id: I07fc689b20968a1b9fe2620bf8a33faacf917823 Reviewed-on: https://skia-review.googlesource.com/65401 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Some lowp refactoringGravatar Mike Klein2017-10-31
| | | | | | | | | | | | | | | | | | 1) Move a couple stages around in the enum to places that make more sense, and guass_a_to_rbga in the code too. 2) mirror the SkRasterPipeline stage enum with either: LOWP(st): the stage is implemented in low precision TODO(st): the stage should be lowp, but isn't NOPE(st): the stage shouldn't be done in lowp. 3) statically enforce that all stages are covered by one of LOWP, TODO, or NOPE. Change-Id: I06c7a7e470663ef73bf652c1b65c0d3c89f0d767 Reviewed-on: https://skia-review.googlesource.com/63800 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Fix int overflow issues with clip and path bounds."Gravatar Mike Klein2017-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b1fc36829de69da5376019403fdd649c06f4cf1b. Reason for revert: I hate to revert this, but I think it's caused some layout test diffs that are holding up the roll. https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/17909/layout-test-results/results.html Original change's description: > Fix int overflow issues with clip and path bounds. > > * Clamp scissor clip bounds to query bounds (which are RT bounds) > * Change IsInsideClip test to be more int overflow friendly > * Check to make sure path bounds can have representable width and height > > Bug: skia:7239 > Bug: skia:7240 > Change-Id: I4c512d05c5609a5a466393408282101697ebea83 > Reviewed-on: https://skia-review.googlesource.com/65506 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: Ic5c15219cdbe92811284130bce1e984823f0c4d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7239, skia:7240 Reviewed-on: https://skia-review.googlesource.com/65920 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Devirtualized token management in GrDeferredUploadTarget.Gravatar Brian Salomon2017-10-31
| | | | | | | Change-Id: I7bef9d532f19056b5581e24e95949d1d32e8dd95 Reviewed-on: https://skia-review.googlesource.com/65505 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* clean up SK_LEGACY_LOWP_STAGESGravatar Mike Klein2017-10-31
| | | | | | | Change-Id: I5629e74c4c13ddb9217fd3c2df3388030fa03f0c Reviewed-on: https://skia-review.googlesource.com/63780 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Make deferred upload handling and draw recording be virtual interfaces ↵Gravatar Brian Salomon2017-10-31
| | | | | | | | | | | | implemented by GrOpFlushState. The motivation for this is to allow other clients of GrDrawOpAtlas. Making GrMeshDrawOp::Target also be an abstract interface is somewhat incidental to this goal. Bug: skia: Change-Id: I0987adfa8a269aa2ca94147e933a2827d734c1cc Reviewed-on: https://skia-review.googlesource.com/65121 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Simplify SkColorSpace::MakeICCGravatar Leon Scroggins III2017-10-31
| | | | | | | | | | | | | | | | | | | Rather than restricting the supported ICC types in MakeICC, create any ICC type that we support, and make the client reject them as necessary by querying the SkColorSpace::Type. Remove ICCTypeFlag and replace uses of it with SkColorSpace::Type. This depends on a change in Chromium (https://chromium-review.googlesource.com/c/chromium/src/+/741843). Without that, this change will start allowing non-CMYK images to use CMYK profiles. Bug: 727128 Change-Id: I085b4665e49bc80083264496d864cc4cd62ae914 Reviewed-on: https://skia-review.googlesource.com/64841 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove SK_IGNORE_SUBPIXEL_HINTING_FIX.Gravatar Ben Wagner2017-10-31
| | | | | | | | | | | | | This flag was used to stage this change. All users have now been updated and there is no known build which defines it. Remove all uses of this define and the code it guarded. BUG=skia:6931 Change-Id: I791795af4a8ff761508611cf29c7b065c1b43c82 Reviewed-on: https://skia-review.googlesource.com/65782 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Don't store legacy colors in gradient shadersGravatar Florin Malita2017-10-31
| | | | | | | | | | | | We only pass linear/4f colors to the ctor, and then derive the legacy colors from them. Might as well just derive when needed. Change-Id: I82b3d159da91f6faa4a3e7d681763c0ec1cdab07 Reviewed-on: https://skia-review.googlesource.com/65680 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Fix int overflow issues with clip and path bounds.Gravatar Jim Van Verth2017-10-31
| | | | | | | | | | | | | * Clamp scissor clip bounds to query bounds (which are RT bounds) * Change IsInsideClip test to be more int overflow friendly * Check to make sure path bounds can have representable width and height Bug: skia:7239 Bug: skia:7240 Change-Id: I4c512d05c5609a5a466393408282101697ebea83 Reviewed-on: https://skia-review.googlesource.com/65506 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add support for transfer functions to GrColorSpaceXformGravatar Brian Osman2017-10-31
| | | | | | | | | | | | | | | | | | | With this change, untagged sources (eg N32) are treated as sRGB data, which causes a huge number of GMs to render more correctly in GPU sRGB/F16/etc... configs. Also, because the sources are treated as having a color space, we actually do gamut conversion for wide or narrow gamut outputs. This change also applies the transfer function math to individual colors in the case of gradient stops and color shaders. (The CPU backend doesn't do this yet, but I think we've decided there's no reason not to support it). Bug: skia: Change-Id: If76e9e4a268f9f74110ff4bbe4fe189ba5d19d9f Reviewed-on: https://skia-review.googlesource.com/64100 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Have mip status match surface when snapping image from wrapped objectGravatar Greg Daniel2017-10-30
| | | | | | | | | | Also fixes some bugs involved with creating mipped SkSurfaces. Bug: skia: Change-Id: I6e0109000eadd2bdee4a907d3ee2231104528165 Reviewed-on: https://skia-review.googlesource.com/65063 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add mip support to GrAHardwareBufferImageGeneratorGravatar Greg Daniel2017-10-30
| | | | | | | | Bug: skia: Change-Id: I482d8f9937c86ed441016afef2d8f924282dd17a Reviewed-on: https://skia-review.googlesource.com/63861 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Fix GrDefaultPathRender inversely wound path bug""Gravatar Robert Phillips2017-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fc28138c0422637741ac2839914ef10c56438054. Reason for revert: Suppression have landed for failing tests Original change's description: > Revert "Fix GrDefaultPathRender inversely wound path bug" > > This reverts commit 511a9d49998ec6a74c375e6cfc55f660f7987c40. > > Reason for revert: vulkan > > Original change's description: > > Fix GrDefaultPathRender inversely wound path bug > > > > Bug: 769898 > > Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56 > > Reviewed-on: https://skia-review.googlesource.com/64065 > > Commit-Queue: Robert Phillips <robertphillips@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com > > Change-Id: Ib1a987294d14f0526bf5ff5a8fd90bbd5f6f3a0d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 769898 > Reviewed-on: https://skia-review.googlesource.com/65201 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I3a3543c46b3192f1ffd31a5566cf337dc03561a8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 769898 Reviewed-on: https://skia-review.googlesource.com/65202 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Initialize mask to 0 during AntiRect optimizationGravatar Yuqian Li2017-10-30
| | | | | | | | | | | | Previously, the mask is uninitialized (which is probably caught by MSAN) for the region to the left and right of fAntiRect when fAntiRect is non-empty. That causes skbug.com/7192 Bug: skia:7192 Change-Id: Ida0551d00f0ac8053a1e0232cfbc4f05c9f35c6c Reviewed-on: https://skia-review.googlesource.com/65023 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* fix skslc splitting escape sequences in halfGravatar Ethan Nicholas2017-10-30
| | | | | | | | Bug: skia: Change-Id: I810c4e77664bffb711969fb513f396646972f66e Reviewed-on: https://skia-review.googlesource.com/65100 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>