aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Add support for instanced drawsGravatar Chris Dalton2017-05-31
| | | | | | | | | | | | Adds an instance buffer to GrMesh and instance attribs to GrPrimitiveProcessor. Implements support in GL and Vulkan. Adds unit tests for instanced rendering with GrMesh. Bug: skia: Change-Id: If1a9920feb9366f346b8c37cf914713c49129b3a Reviewed-on: https://skia-review.googlesource.com/16200 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Do color correction of vertex colors in GPU drawVerticesGravatar Brian Osman2017-05-31
| | | | | | | | | | | SkColor vertex colors need to be linearized (from sRGB), and possibly converted from sRGB gamut to destination gamut. Bug: skia:6659 Change-Id: I2b1b1dd0fa5938519693f56a728fed5957f13fd5 Reviewed-on: https://skia-review.googlesource.com/17534 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* slant colorfilter away from filterSpan4fGravatar Mike Reed2017-05-31
| | | | | | | | | | | rename to make it easy to delete any impl that also had onAppendStages... i.e. rename to make it clear that it is just an impl trick for rasterpipeline. Bug: skia: Change-Id: If3c3b2811eff12d399cdf7a77552c01e72c06996 Reviewed-on: https://skia-review.googlesource.com/18234 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* fix incorrect variable not assigned error in skslcGravatar Ethan Nicholas2017-05-31
| | | | | | | | Bug: skia: Change-Id: Id89db8acb0b14024b79b00d98d32f9c10f019537 Reviewed-on: https://skia-review.googlesource.com/18121 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* enable geometry shader support in GrGLShaderStringBuilderGravatar Ethan Nicholas2017-05-31
| | | | | | | | Bug: skia: Change-Id: Ibbd5209eb3aef9543b7195a114e39ee4254a56c3 Reviewed-on: https://skia-review.googlesource.com/18062 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Update clearOp for split-OpList world (take 3)Gravatar Robert Phillips2017-05-31
| | | | | | | | | | | It would reduce a lot of noise if the GrRenderTargetOpList kept a pointer to the GrCaps but, for now, I'm trying to shrink the GrRTOpList, not expand it. Reland of: https://skia-review.googlesource.com/c/17323/ (Update clearOp for split-OpList world) Change-Id: Ia61ce4d6ce245380fc9651928a46c22039fc12cf Reviewed-on: https://skia-review.googlesource.com/18026 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* remove 565 sprite blitter tooGravatar Mike Klein2017-05-31
| | | | | | | | | While we're deleting sprite blitters, here's another good candidate. Change-Id: If10fc677e6bd120413b6ec54ae2e7876c2de7091 Reviewed-on: https://skia-review.googlesource.com/18232 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* allow sprite blitter for equal color spacesGravatar Mike Klein2017-05-31
| | | | | | | Change-Id: Id64aadcc372b856c4ddbf7144b3d67e618efbeb3 Reviewed-on: https://skia-review.googlesource.com/18231 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* add stages to colorfiltershaderGravatar Mike Reed2017-05-31
| | | | | | | | | | | | Interestingly, this public api (makeWithColorFilter) is only used internally by the legacy raster blitters. Perhaps we could remove/hide it? ... and that API is the only way we create one of these shaders. Bug: skia: Change-Id: I9bbd3786160844c963a78663e503e08122183701 Reviewed-on: https://skia-review.googlesource.com/18230 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Expand partial render target write pixels workaround."Gravatar Brian Salomon2017-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0cc507d22566bb7e28e5fe21e4b3fc7b682d86a2. Reason for revert: Causing IntTextureText to fail on bots Original change's description: > Expand partial render target write pixels workaround. > > The workaround is extended in the following ways: > > 1) It now applies to any texture whose base level has *ever* been attached to a FBO. > 2) It applies to Adreno 5xx in addition to Adreno 4xx > 3) It applies in the atlas upload code path. > > This workaround (and a similar one) are narrowed to GLCaps rather than Caps. > > Bug: skia: > Change-Id: Id600e9739bb97bf6766075ea2a987fd2039e53e5 > Reviewed-on: https://skia-review.googlesource.com/18150 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Change-Id: I53c8dd7ea7f614da57331470fcc24c6d84aba354 Reviewed-on: https://skia-review.googlesource.com/18229 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* assume sRGB transfer function on untagged imagesGravatar Mike Klein2017-05-31
| | | | | | | | | | | | | | | | This has been a long time coming. There are probably one or two more places we'd want to do this on the CPU side too, but it's a start. Somewhat seriously, this is my proposed fixed for colorburn + xfermodes2. We're not interpreting the red or green images sensibly. BUG=skia:6680 Change-Id: Iea15be08c1907ac1ac46ef358d3d74f1cc35a156 Reviewed-on: https://skia-review.googlesource.com/18221 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* remove unused spanprocs (leftover from spriteblitter simplification)Gravatar Mike Reed2017-05-31
| | | | | | | | Bug: skia: Change-Id: Iaa8cd1e5700610cddfb2092fcf7b13d12cf117bd Reviewed-on: https://skia-review.googlesource.com/18228 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Delete SkGaussianEdgeShader""Gravatar Florin Malita2017-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9d14f936cc09de2a37c05c7af2cf60aa31f74722. Reason for revert: Android fix merged. Original change's description: > Revert "Delete SkGaussianEdgeShader" > > This reverts commit 64790a3714467300848971aa153aca8cea91cf7b. > > Reason for revert: pending Android fix merge. > > Original change's description: > > Delete SkGaussianEdgeShader > > > > No longer used. > > > > Change-Id: I65a61696060ca19f528066ea587e140798450e36 > > Reviewed-on: https://skia-review.googlesource.com/18132 > > Reviewed-by: Jim Van Verth <jvanverth@google.com> > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > > > TBR=jvanverth@google.com,fmalita@chromium.org,reed@google.com > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > > Change-Id: I88a428e942c78b1fc8e70501ba7fdda5727b2ab2 > Reviewed-on: https://skia-review.googlesource.com/18156 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=mtklein@google.com,jvanverth@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ia6c97a79a6425a28fab49984691505bf89ac9736 Reviewed-on: https://skia-review.googlesource.com/18227 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Expand partial render target write pixels workaround.Gravatar Brian Salomon2017-05-31
| | | | | | | | | | | | | | | | The workaround is extended in the following ways: 1) It now applies to any texture whose base level has *ever* been attached to a FBO. 2) It applies to Adreno 5xx in addition to Adreno 4xx 3) It applies in the atlas upload code path. This workaround (and a similar one) are narrowed to GLCaps rather than Caps. Bug: skia: Change-Id: Id600e9739bb97bf6766075ea2a987fd2039e53e5 Reviewed-on: https://skia-review.googlesource.com/18150 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix outset for blurs when using ignoreXform flag on GPUGravatar Greg Daniel2017-05-31
| | | | | | | | Bug: skia: Change-Id: I7d77bfc4e7652a0ab432b1137f918862ac2009cb Reviewed-on: https://skia-review.googlesource.com/18223 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* simplify a confusing expression in SkSLSPIRVCodeGeneratorGravatar Ethan Nicholas2017-05-31
| | | | | | | | | Bug: skia: Change-Id: I3ce0c174677cf93903a5fb33287dfe1df3445837 Reviewed-on: https://skia-review.googlesource.com/18141 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Bruce Dawson <brucedawson@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* remove sprite blitters for non-legacy targets, rely on rasterpiplineGravatar Mike Reed2017-05-31
| | | | | | | | | | preliminary step to trying to remove filterSpan4f() from colorfilter Bug: skia: Change-Id: I6aa6cfde506ffac22188e9641a23a8285e80a5b9 Reviewed-on: https://skia-review.googlesource.com/18185 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* clean up now that min_stride == 1Gravatar Mike Klein2017-05-31
| | | | | | | Change-Id: I1c285e818c3119bc5917dee6d7fbe4c0c62ff6d7 Reviewed-on: https://skia-review.googlesource.com/18153 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* call compile in convert_with_pipeline()Gravatar Mike Klein2017-05-31
| | | | | | | | | | We used to do this a while ago, then I removed compile(). This puts things back how they used to be. Change-Id: I676ec1a06249f2356f426fd2847af093526f54d2 Reviewed-on: https://skia-review.googlesource.com/18079 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Allow GPU blur fast path for circles and rects when using ignore xformGravatar Greg Daniel2017-05-31
| | | | | | | | | | | | | Since the only thing it looks like we alter when using the ignore xform flag is the blur radius, this is already handled by the computeXformedSigma function call. Thus it should be safe to just use the current fps and draws for circle and rect. Bug: chromium:724735 Change-Id: I7a2f52dc965dcd875b8c2802141f30607a966347 Reviewed-on: https://skia-review.googlesource.com/18122 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Delete SkGaussianEdgeShader"Gravatar Florin Malita2017-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 64790a3714467300848971aa153aca8cea91cf7b. Reason for revert: pending Android fix merge. Original change's description: > Delete SkGaussianEdgeShader > > No longer used. > > Change-Id: I65a61696060ca19f528066ea587e140798450e36 > Reviewed-on: https://skia-review.googlesource.com/18132 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=jvanverth@google.com,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I88a428e942c78b1fc8e70501ba7fdda5727b2ab2 Reviewed-on: https://skia-review.googlesource.com/18156 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Speculative fix for SkPerlinNoiseShaderImpl::asFragmentProcessor leakGravatar Florin Malita2017-05-30
| | | | | | | | Change-Id: I9dfa0e825f944d6abf88abfdfd585f2d504ea4f6 Reviewed-on: https://skia-review.googlesource.com/18151 Commit-Queue: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Add aarch64 tail code.Gravatar Herb Derby2017-05-30
| | | | | | | Change-Id: I25f029604a04f5fc6c249a3817b0dd84379071be Reviewed-on: https://skia-review.googlesource.com/18149 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* [Reland] Relocate shaders to own dirGravatar Florin Malita2017-05-30
| | | | | | | | | | | Consolidate all shader impls under src/shaders/. (reland of https://skia-review.googlesource.com/c/17927/) Change-Id: I7918bdc1aafe842ed194412ba95b9ae53a2ec1d7 Reviewed-on: https://skia-review.googlesource.com/18146 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Delete SkGaussianEdgeShaderGravatar Florin Malita2017-05-30
| | | | | | | | | No longer used. Change-Id: I65a61696060ca19f528066ea587e140798450e36 Reviewed-on: https://skia-review.googlesource.com/18132 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* move perlinenoise2 into effectsGravatar Mike Reed2017-05-30
| | | | | | | | Bug: skia: Change-Id: I5c178bdc5901d15c6924b3fb1f29119ab3cc701d Reviewed-on: https://skia-review.googlesource.com/18131 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* simplify sse41::srcover_srgb_srgbGravatar Mike Klein2017-05-30
| | | | | | | | Most importantly, remove the undefined behavior implied by "delta". Change-Id: I8f9740804ec74dd40b049eafd4f0d51b36ce3237 Reviewed-on: https://skia-review.googlesource.com/18140 Reviewed-by: Herb Derby <herb@google.com>
* Add arm tail code.Gravatar Herb Derby2017-05-30
| | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android Change-Id: Ia0e9f32d0324e66c9d4812dbb156a2b858d49a13 Reviewed-on: https://skia-review.googlesource.com/18127 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* remove sse2::srcover_srgb_srgbGravatar Mike Klein2017-05-30
| | | | | | | Change-Id: Icc570d8a8f1df1dea202e1d234433491122b9b67 Reviewed-on: https://skia-review.googlesource.com/18135 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Don't pull private headers in SkOverdrawColorFilter.hGravatar Florin Malita2017-05-30
| | | | | | | Change-Id: I16254709ffaf6c85110964568ec9422a1ffbb970 Reviewed-on: https://skia-review.googlesource.com/18129 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Fix glDrawRangeElementsGravatar Chris Dalton2017-05-30
| | | | | | | | | | | | | | | | | | Adds explicit min/max index value fields to GrMesh. This eliminates the previous assumption that the index values were within the range [0..vertexCount-1]. In the pattern case we still maintain this assumption. Updates GrMesh to hide its fields and handle its new complexity using a "helper" interface instead. Adds a unit test for GrMesh. Bug: skia: Change-Id: Ia23de72d510f8827cee56072b727fb70a6e46b8d Reviewed-on: https://skia-review.googlesource.com/17964 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* bug fix in convert_with_pipeline()Gravatar Mike Klein2017-05-30
| | | | | | | | | | | | What do you supppose happens if we put an SkColorSpaceTransferFn on the stack, pass its address to SkRasterPipeline, then pop it off the stack? BUG=skia:6671 Change-Id: I17c777d9dc55a67cca6196a01c076a6be8283d3d Reviewed-on: https://skia-review.googlesource.com/18078 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Convert DstTexture to DstProxy (take 2)Gravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | The last GrTexture-based TextureSampler::reset call must be removed before the TextureSamplers can become purely GrTextureProxy-backed Reland of: https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I3a497b6a950fad899f23882c0a9552894ef640f8 Reviewed-on: https://skia-review.googlesource.com/17205 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revise system for checking for uninstantiated proxiesGravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | | The new pattern is: we will "instantiate" pipelines at flush time at flush time we will only access the backing GrSurface by peeking If instantiation fails we should never try to access the GrSurfaces Change-Id: I87f7ff41bd0e84d9ca3dbdd61d3361d3d4ceefd6 Reviewed-on: https://skia-review.googlesource.com/17932 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Hide ctors of SkShader, SkImage & SkColorSpaceGravatar Florin Malita2017-05-26
| | | | | | | | | To prevent external clients from subclassing. Change-Id: I60a3833bf64019aea2f537850ca2a1ae38bb8767 Reviewed-on: https://skia-review.googlesource.com/18038 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* no sprite blitters support gamut conversionGravatar Mike Klein2017-05-26
| | | | | | | | | | | This fixes the None/Low bitmap filtering in gamut GM. BUG=skia:6679 Change-Id: Ic6e0efa6a23b537aea69b4beb24f3c8b8c6ca347 Reviewed-on: https://skia-review.googlesource.com/17923 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Explicitly check edge count >= 2 in non-debug buildGravatar Yuqian Li2017-05-26
| | | | | | | | | | | We also preserve the check in debug mode that the count should never be 1 when the path is convex. Bug: skia:6684 Change-Id: I4d4c9ad9f9d704e94bbe51f10a96f8b3066afaa1 Reviewed-on: https://skia-review.googlesource.com/17983 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Faster and more accurate blit_row_s32a_opaque for ARMGravatar Matteo Franchin2017-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change ARM implementation of alpha blending to work on 8 pixels at a time (using NEON). Also improve the accuracy of alpha blending by using a formula based on SkMulDiv255Round rather than SkPMSrcOver. Note that a number of variations of this code were considered. Here are some notes: - A 16 pixels at a time version was considered. This performs well for the case of extreme alpha (all-opaque or all-transparent pixels), but performs worst than the 8 pixels version when there are frequent transitions of alpha. Also gcc 6.2.1 seems to have troubles with register pressure when using this version. - If the branch to detect the fully-opaque or fully-transparent cases is removed, then the performance increases significantly for images which are all partially transparent (especially on ARM Cortex A72), but can significantly decrease for images that are almost fully opaque or fully transparent. This implementation is a compromise to the effects described above. This patch produces a ~10% improvement on the nanobench's sub-scores repeatTile_BGRA_8888_A, constXTile_MM_filter_trans, constXTile_CC_trans, constXTile_RR_filter_trans when running on ARM Cortex A72. Improvements of greater magnitude (20% to 30%) are observed when running on ARM Cortex A53. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I1f0c9f549057613bbffd26e6651f3beeb0019af9 Bug: skia: Reviewed-on: https://skia-review.googlesource.com/16520 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix two more drawVertices "bugs"Gravatar Brian Osman2017-05-26
| | | | | | | | | | | | | | | | | | | 1) Prior to SkVertices, drawing with local coords but no shader triggered wireframe mode (as if no local coords were supplied, and assuming no colors). I find the wireframe thing to be strange, but restore that behavior to match CPU backend. 2) More importantly: If we *do* fall into the wireframe mode, make sure to not *also* draw in non-wireframe. Yesterday's bugfix to paint conversion caused those kinds of draws to draw wireframe, then draw in fill mode on top. Bug: skia: Change-Id: Ie579b54480b4488a09c207fecbbe3badbddc5d68 Reviewed-on: https://skia-review.googlesource.com/18032 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Delete onChooseBlitProcs() and related codeGravatar Florin Malita2017-05-26
| | | | | | | | | | | | All dead code now. Change-Id: I3d88103fef90d9e2ceee8b13db143ac9704689f5 Reviewed-on: https://skia-review.googlesource.com/18034 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* avoid rebuilding pipeline w/ only tricolorsGravatar Mike Reed2017-05-26
| | | | | | | | | | patch_primitive: 2.0 --> 1.4 Bug: skia: Change-Id: Ia43c31873b9438332c94958232f6367240ba9a62 Reviewed-on: https://skia-review.googlesource.com/18030 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Initialize rects in SkValidatingReadBuffer readRect & readIRect on failureGravatar Robert Phillips2017-05-26
| | | | | | | | | BUG: 726199 Change-Id: I2afeebbd2240e1c2f3b7d7298cb11572eef18acd Reviewed-on: https://skia-review.googlesource.com/17984 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Only support SkVertices in GrDrawVerticesOp and GrRenderTargetContextGravatar Brian Osman2017-05-26
| | | | | | | | | | | | Allow overriding the primitive type at draw time, so everyone can funnel through the same code path. Simplifies the color array type logic, and saves one memcpy (of indices) in the drawWireframe case. Bug: skia: Change-Id: I46653d34169842b9b5304cff48d804b2a9ace529 Reviewed-on: https://skia-review.googlesource.com/17783 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Unexport private SkShader classesGravatar Florin Malita2017-05-26
| | | | | | | | | | Alternative to https://skia-review.googlesource.com/c/18025/: these subclasses are private, we shouldn't need to SK_API-tag them. Change-Id: I94fc38e76ee4468132e41ab16f21ae6ad61fe1f2 Reviewed-on: https://skia-review.googlesource.com/18029 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* rasterpipeline:Gravatar Mike Reed2017-05-26
| | | | | | | | | | | | | | + only dither if the paint asks for it - don't special case if the shader is a gradient guard: SK_SUPPORT_LEGACY_RASTERPIPELINE Bug: skia: Change-Id: I7f0c101049e5cb32a80306dcfff3bc21bcf318be Reviewed-on: https://skia-review.googlesource.com/17931 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Add method to GrContext to purge unlocked resources.Gravatar Derek Sollenberger2017-05-26
| | | | | | | | | | | Beyond setting the total cache limits this method enables clients to request to purge a specific number of bytes, as well as specify their preference to purge scratch resources over resources of other types. Change-Id: I9259d5544d34251575d77eebe599388f213ff3ce Reviewed-on: https://skia-review.googlesource.com/17987 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* add SK_API to SkShaderBaseGravatar Mike Klein2017-05-26
| | | | | | | | | | | | | Ought to fix Chrome roll: warning C4275: non dll-interface class 'SkShaderBase' used as base for dll-interface class 'SkEmptyShader' etc. May fix Android too? Change-Id: Ic8ff988b9000c484aa54959e49a1ff17e5635340 Reviewed-on: https://skia-review.googlesource.com/18025 Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Update clearOp for split-OpList world (take 2)"Gravatar Mike Klein2017-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3fdd0bf2d90b1b82c1ac3aa982bdca600de7f4a8. Reason for revert: Chrome roll dryrun? Original change's description: > Update clearOp for split-OpList world (take 2) > > It would reduce a lot of noise if the GrRenderTargetOpList kept a pointer to the GrCaps but, for now, I'm trying to shrink the GrRTOpList, not expand it. > > Reland of: https://skia-review.googlesource.com/c/17323/ (Update clearOp for split-OpList world) > > Change-Id: I97f3fb81e6258d430e7f7cf1ea8bd51a392f9f47 > Reviewed-on: https://skia-review.googlesource.com/17830 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ib70285bb484a1ed8babaa519c74bfdf619313806 Reviewed-on: https://skia-review.googlesource.com/18024 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "Remove (now-dead) SK_LEGACY_SWEEP_GRADIENT code"Gravatar Mike Klein2017-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 04d22c04838fb312aa5ecc770299aff31076e7e3. Reason for revert: Android roll? junit.framework.AssertionFailedError: res/drawable/vector_icon_gradient_1.xml: totalDiffPixelCount is 123 Original change's description: > Remove (now-dead) SK_LEGACY_SWEEP_GRADIENT code > > Behold the first raster pipeline-only gradient! > > Change-Id: Ib6f53224e4ff9506aafdae1d2303102fc5235dfc > Reviewed-on: https://skia-review.googlesource.com/17982 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I328585f5412068f4eff1d0a2a6083cb4c1a3c078 Reviewed-on: https://skia-review.googlesource.com/18022 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "Relocate shaders to own dir"Gravatar Stan Iliev2017-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fabe0b26d05624ce7374f6ca89bd66df6142534e. Reason for revert: Last android roll failed with "external/skia/src/effects/SkGaussianEdgeShader.h:11:10: fatal error: 'SkShaderBase.h' file not found" Original change's description: > Relocate shaders to own dir > > Consolidate all shader impls under src/shaders/. > > Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3 > Reviewed-on: https://skia-review.googlesource.com/17927 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Herb Derby <herb@google.com> > TBR=mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Idbb2b75053969df1dad9d8ce0217cd39189b9ddb Reviewed-on: https://skia-review.googlesource.com/18020 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Stan Iliev <stani@google.com>