aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Revert "Don't use analytic clip FPs when drawing to stencil"Gravatar Chris Dalton2017-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4c92d4aa3ed653afdff9996b90a1139ed1dc9420. Reason for revert: Chromecast bot failure Original change's description: > Don't use analytic clip FPs when drawing to stencil > > It doesn't make sense to multiply by coverage when drawing to stencil. > This could theoretically work with FPs that discard and/or modify > the sample mask, but for the time being an analytic FP means one that > calculates a coverage value. > > Bug: skia:7190 > Change-Id: Ic40cf6c19c377cba80bad458993582f5cc07022a > Reviewed-on: https://skia-review.googlesource.com/67423 > 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: Ie5bd4852c201e47daee0920f5644141bee2d8a46 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7190 Reviewed-on: https://skia-review.googlesource.com/68400 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Don't use analytic clip FPs when drawing to stencilGravatar Chris Dalton2017-11-07
| | | | | | | | | | | | | It doesn't make sense to multiply by coverage when drawing to stencil. This could theoretically work with FPs that discard and/or modify the sample mask, but for the time being an analytic FP means one that calculates a coverage value. Bug: skia:7190 Change-Id: Ic40cf6c19c377cba80bad458993582f5cc07022a Reviewed-on: https://skia-review.googlesource.com/67423 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Correct edges_too_closeGravatar Yuqian Li2017-11-07
| | | | | | | | | | | | | | | | | If the next edge has 0 fDX, we should add a SLACK = 1 so two edges with fX less than 1 pixel apart should be considered close, and noRealBlitter should be true to force the use of AdditiveBlitter and the cumulation of alpha. The changed GM will show bleed through if SLACK is 0. The artifact without the fix can be seen at: https://fiddle.skia.org/c/f6912f1af6c14e054f5b5935a93380ea Bug: skia: Change-Id: I15f9c3aef25a0357cd11d447e7bf0b4fbac0ce67 Reviewed-on: https://skia-review.googlesource.com/67804 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Add MakeCrossContextFromPixmapGravatar Brian Osman2017-11-07
| | | | | | | | | | | | This operates just like MakeCrossContextFromEncoded, but starting from raster data. This version is defensive (always uses copies if a raster image needs to be made). Bug: skia: Change-Id: Ibc2b9a235c89a41fbbfd022d943f15ac212d0677 Reviewed-on: https://skia-review.googlesource.com/68205 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* converted LumaColorFilterEffect to skslGravatar Ethan Nicholas2017-11-07
| | | | | | | | Bug: skia: Change-Id: I208984ec9ad357249ee1b2fe28477f1450b4b69d Reviewed-on: https://skia-review.googlesource.com/67848 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "refactored SkSLVarDeclaration out of existence"Gravatar Ethan Nicholas2017-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1ae353c887fdf447e1fe627e3cd29f8fa62c2a05. Reason for revert: ASAN failures Original change's description: > refactored SkSLVarDeclaration out of existence > > Bug: skia: > Change-Id: I3dbc08e6d759f6828a472246d4797babb6cc132e > Reviewed-on: https://skia-review.googlesource.com/66147 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> TBR=egdaniel@google.com,ethannicholas@google.com Change-Id: I8cae451de1546fe783e32dd41df00eac7da61b21 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/68280 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* refactored SkSLVarDeclaration out of existenceGravatar Ethan Nicholas2017-11-07
| | | | | | | | Bug: skia: Change-Id: I3dbc08e6d759f6828a472246d4797babb6cc132e Reviewed-on: https://skia-review.googlesource.com/66147 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* make point array methods privateGravatar Cary Clark2017-11-07
| | | | | | | | | | | | | | | | | | | | | | | Moved method are not used by chromium, google3, or android. SkPoint::setRectIFan isn't used or tested at all. SkPoint::setRectFan and SkPoint::setRectTriStrip are only used internally. These routines pretend that a SkPoint is part of an array of points. Since that's kind of an odd contract to make public, and because they aren't used outside of Skia, relegate them to a priv file. R=bsalomon@google.com,reed@google.com Bug: skia: 6898 Change-Id: I5ec2eb47799f6fd4b2994da962b1fa69ce659931 Reviewed-on: https://skia-review.googlesource.com/68121 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* This is a reland of 67340. This CL fixes the broken layout tests byGravatar Yuqian Li2017-11-07
| | | | | | | | | | | preserving the containedInClip boolean. We will eventually remove it and rebaseline the layout tests. Bug: skia:7271 Change-Id: I20e7220340d561ea2c50d30cd5d6ac6d2b4b3743 Reviewed-on: https://skia-review.googlesource.com/68100 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Fix dangling pointers when Ganesh culls CCPR Ops earlyGravatar Chris Dalton2017-11-07
| | | | | | | | | BUG=chromium:775868 Change-Id: I0066e34fd8ebe4b46ad72481f5bb955dc0dd5910 Reviewed-on: https://skia-review.googlesource.com/67682 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrAtlasTextBlob return to caller when a flush is required during subrun ↵Gravatar Brian Salomon2017-11-07
| | | | | | | | | | | | | | | | | | | tessellation. The old code used a helper object in the tessellation code that called flush() on GrAtlasTextOp. A confusing aspect of this was that the pre-flush vertex data generated for the sub run was copied to the op's vertex buffer after flush() had already recorded the draw that read the data. The new code adds a tessellator nested helper class to GrAtlasTextBlob. The helper exits early if a flush is required, the op performs the flush, and then the helper is invoked again until tessellation is complete. This also changes the blob object to use char* instead of unsigned char* for its vertex pointers. Change-Id: I31bed251435f13b2172e6f5829ba437b882dd44d Reviewed-on: https://skia-review.googlesource.com/67856 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* For legacy GPU configs, run high contrast filter on linearized valuesGravatar Brian Osman2017-11-07
| | | | | | | | | | | | | | Uses the same pow(2) approximation at the CPU version, and now produces results that are nearly identical. Also removed an extra copy of the config from the GLSL FP class - just use the data from the FP. Bug: skia:7265 Change-Id: If7b36094d5ae07f21219faba0bef9b2e4cb1e3d0 Reviewed-on: https://skia-review.googlesource.com/68041 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* add a SkFontMgr to DM that returns portable fontsGravatar Mike Klein2017-11-06
| | | | | | | | | Controlled by --[no]nativeFonts, and still defaults to native fonts. Change-Id: Ib2879e69fadb63ddb5a17a7e4ae227941893b8cf Reviewed-on: https://skia-review.googlesource.com/67806 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Setup CCPR testing with GrMockContextGravatar Chris Dalton2017-11-06
| | | | | | | | | | | Beefs up the mock context to be able to support CCPR, sets up a framework for testing CCPR with the mock context, and adds a new test. Bug: skia: Change-Id: If95f92726f7b1a7f52ad04ca8126551f58ea8032 Reviewed-on: https://skia-review.googlesource.com/67980 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Simplify fill path call by removing do_fill_path"Gravatar Yuqian Li2017-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 12f322b9d4e98619bd128f39b02d3a6f3b78ba79. Reason for revert: Unexpectedly break Chrome layout tests. Will check why. Original change's description: > Simplify fill path call by removing do_fill_path > > The git diff is not very informative for this CL. > Here's a better diff: > > 1. do_fill_path is removed and its content is copied to AntiFillPath > > 2. Any call to do_fill_path is removed. > > 3. std::function FillPathFunc is removed (and replaced by direct > AAAFillPath, DAAFillPath, and SAAFillPath call). > > 4. The old call chain is: > AntiFillPath -> (AAAFillPath/DAAFillPath/...) > -> do_fill_path > -> specific FillPathFunc > The new call chain is: > AntiFillPath -> AAAFillPath/DAAFillPath/SAAFillPath > > This is made possible by the removal of SK_SUPPORT_LEGACY_AA_CHOICE > which makes sure that AntiFillPath is the only function that makes > the choice of AAA/DAA/SAA. > > In the next CL, I'll improve the structure of SkScan::AntiFillPath > to prepare for Threaded Backend's init-once change. > > Bug: skia: > Change-Id: If6ebbdab207cadb7bfe2cb3fcf33ea3d180c3896 > Reviewed-on: https://skia-review.googlesource.com/67340 > Reviewed-by: Mike Reed <reed@google.com> > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=caryclark@google.com,liyuqian@google.com,reed@google.com,caryclark@skia.org Change-Id: I7d9517574265db5bc372a5749e6480df8e938f2e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/67855 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Simplify fill path call by removing do_fill_pathGravatar Yuqian Li2017-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The git diff is not very informative for this CL. Here's a better diff: 1. do_fill_path is removed and its content is copied to AntiFillPath 2. Any call to do_fill_path is removed. 3. std::function FillPathFunc is removed (and replaced by direct AAAFillPath, DAAFillPath, and SAAFillPath call). 4. The old call chain is: AntiFillPath -> (AAAFillPath/DAAFillPath/...) -> do_fill_path -> specific FillPathFunc The new call chain is: AntiFillPath -> AAAFillPath/DAAFillPath/SAAFillPath This is made possible by the removal of SK_SUPPORT_LEGACY_AA_CHOICE which makes sure that AntiFillPath is the only function that makes the choice of AAA/DAA/SAA. In the next CL, I'll improve the structure of SkScan::AntiFillPath to prepare for Threaded Backend's init-once change. Bug: skia: Change-Id: If6ebbdab207cadb7bfe2cb3fcf33ea3d180c3896 Reviewed-on: https://skia-review.googlesource.com/67340 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Remove SK_SUPPORT_LEGACY_UNIFORM_GRADIENTSGravatar Florin Malita2017-11-06
| | | | | | | | | | All clients are now switched over. Change-Id: Idfdb910241ab9f7c2caf5baf59e9c3277aef164f Reviewed-on: https://skia-review.googlesource.com/67846 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Fix another blurring bug with sRGB sources and legacy destsGravatar Brian Osman2017-11-06
| | | | | | | | | | | | | | By default, we propagate the input image's config to the temporary surface used for blurring. Without sRGB write control (eg Vulkan), we would end up unable to suppress the linear -> sRGB conversion, causing the blur results to be far too bright. Now, if we're rendering to a non-color correct dest, ensure that we never create an sRGB surface. Bug: skia: Change-Id: I18f5760005c11f788869251e58569029ce9f5c27 Reviewed-on: https://skia-review.googlesource.com/67845 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Disable CCPR while we sort out clippingGravatar Chris Dalton2017-11-06
| | | | | | | | | | | | | | The current usage of CCPR by clipping code is suboptimal. This is causing regressions on the bots and projects like Flutter that make heavy use of clipPath. Disabling CCPR while we fix it up. Bug: skia:7190 Bug: flutter:12839 Change-Id: I03af5249b53cf2eab5a13d85a5f87708030c8666 Reviewed-on: https://skia-review.googlesource.com/67920 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Modify fontcache GM to actually spill atlas.Gravatar Brian Salomon2017-11-06
| | | | | | | | | | | | Adds an option to GrDrawOpAtlas to disable multitexturing. Adds option to GrContextOptions to disable multitexturing for glyph atlases. Change-Id: If413ab7061538fa0e75628d252be4fd14215b6ba Reviewed-on: https://skia-review.googlesource.com/67802 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Detect explicit uniform gradient positionsGravatar Florin Malita2017-11-04
| | | | | | | | | | | | | | | | | | When the color stop positions are uniform, the client is allowed to not specify them (implicit positions, signaled by a null |pos| pointer). This enables some internal optiomizations and yields improved rasterization times. But if the client does pass explicit uniform positions, we currently treat them as general/non-uniform. Detect explicit uniform color stop positions at construction time, and drop them - to ensure optimal treatment downstream. Change-Id: I32ee86daa652622de2936a6f47acb68b64e0b70a Reviewed-on: https://skia-review.googlesource.com/67765 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove SK_SUPPORT_LEGACY_GRADIENT_COLOR_CONVERSIONGravatar Florin Malita2017-11-03
| | | | | | | | | | | | The original change didn't produce any diffs, so this flag is not useful. TBR= Change-Id: Ic4c8d6dcd7d03ace8624345fd624bc5840b99d27 Reviewed-on: https://skia-review.googlesource.com/67724 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Disable CCPR on the Android Framework.Gravatar Derek Sollenberger2017-11-03
| | | | | | | | | | There is a memory leak when CCPR is used by SkCanvas::drawArc. Bug: b/68764873 Change-Id: Id7129acb289a8ac96a523c77c183869e314b7480 Reviewed-on: https://skia-review.googlesource.com/67767 Commit-Queue: Derek Sollenberger <djsollen@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Enforce gradient color stop monotonicity in ctorGravatar Florin Malita2017-11-03
| | | | | | | | | | | | | | From the SVG 1.1 spec: Each gradient offset value is required to be equal to or greater than the previous gradient stop's offset value. If a given gradient stop's offset value is not equal to or greater than all previous offset values, then the offset value is adjusted to be equal to the largest of all previous offset values. Change-Id: I797369a1e14dc776ceb6478ac9fcdd4792e65562 Reviewed-on: https://skia-review.googlesource.com/67761 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Make SkImageGeneratorCG apply encoded originGravatar Leon Scroggins III2017-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | SkImageGeneratorCG: - Detect the origin and apply it to the output - Deprecate NewFromEncodedCG and add MakeFromEncodedCG SkCodecImageGenerator: - Move code elsewhere for sharing - Apply origin for incomplete decodes SkPixmap.cpp/SkPixmapPriv.h: - Now has the shared code for generators to apply origin DMSrcSink.cpp: - Call MakeFromEncodedCG SkCGUtils.h: - Add a version of SkCopyPixelsFromCGImage that takes an SkPixmap Bug: skia:7138 Bug: skia:3834 Change-Id: Ic6dbc76360c6a84913b67373582f328d3946d637 Reviewed-on: https://skia-review.googlesource.com/63740 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* 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>