aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* move divide by zero inside guardGravatar Cary Clark2017-12-13
| | | | | | | | | | | | speculative fix to see if this helps developer. It's the right thing to do in any case. TBR=reed@google.com Change-Id: I4fa576a096a6188f290957a7f2fabe73668f142d Reviewed-on: https://skia-review.googlesource.com/84521 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* converted GrMagnifierEffect to SkSLGravatar Ethan Nicholas2017-12-13
| | | | | | | | Bug: skia: Change-Id: I6dc14ac66d5b911117e71fa23fef49a897082781 Reviewed-on: https://skia-review.googlesource.com/71342 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Reimplement TwoPointConicalGradient_gpu"Gravatar Yuqian Li2017-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 84f18c422ae98085c452d3f721ec32228e92f531. Reason for revert: GMs are incorrect on some mobile devices Original change's description: > Reimplement TwoPointConicalGradient_gpu > > 4.24% faster in gradient_conical_clamp_shallow_dither > 6.43% faster in gradient_conicalOutZero_clamp_hicolor > 10.41% faster in gradient_conicalOut_clamp_hicolor > 14.85% faster in gradient_conicalOutZero_clamp_3color > 16.72% faster in gradient_conicalOut_clamp > 24.30% faster in gradient_conicalOut_clamp_3color > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android,Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android > > Bug: skia: > Change-Id: I6bc1f24c9463fc9c2acbcba7bd4d55b37ade1613 > Reviewed-on: https://skia-review.googlesource.com/82161 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=egdaniel@google.com,fmalita@google.com,liyuqian@google.com Change-Id: Ieb20cce12a958abb8293218b89baf3d5a2aad0a8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Cq-Include-Trybots: skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android, Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android Reviewed-on: https://skia-review.googlesource.com/84801 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Reimplement TwoPointConicalGradient_gpuGravatar Yuqian Li2017-12-13
| | | | | | | | | | | | | | | | | 4.24% faster in gradient_conical_clamp_shallow_dither 6.43% faster in gradient_conicalOutZero_clamp_hicolor 10.41% faster in gradient_conicalOut_clamp_hicolor 14.85% faster in gradient_conicalOutZero_clamp_3color 16.72% faster in gradient_conicalOut_clamp 24.30% faster in gradient_conicalOut_clamp_3color CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android,Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android Bug: skia: Change-Id: I6bc1f24c9463fc9c2acbcba7bd4d55b37ade1613 Reviewed-on: https://skia-review.googlesource.com/82161 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Add stubbed out GrContextGravatar Robert Phillips2017-12-13
| | | | | | | | | | | | This CL mainly just: stores the GrContextOptions in GrContextThreadSafeProxy (so they can be passed on to a stubbed out GrContext) adds a method to create a stubbed out GrContext that has a GrStubGpu - the stubbed out GrContext isn't quite ready for prime time yet Change-Id: I31be6763640e406c5963e6f0714489ac358339e4 Reviewed-on: https://skia-review.googlesource.com/79601 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* fix float-cast-overflow in pathopsGravatar Cary Clark2017-12-13
| | | | | | | | | | | | | | | | | these tests can be taken off the blacklist: clippedcubic2 PathOpsCubicIntersection PathOpsCubicLineIntersection PathOpsOpCubicsThreaded PathOpsOpLoopsThreaded R=benjaminwagner@google.com Bug: skia:7052 Change-Id: I25b422e78ea1d19531613fea0a3fece7f4096e16 Reviewed-on: https://skia-review.googlesource.com/80863 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "Revert "impl SkSerial picture procs""Gravatar Mike Reed2017-12-13
| | | | | | | | | | | | This reverts commit 2a3009931d7bb0f5ca31490c4cf19eef205e4e7a. Implement SkSerialProcs for pictures Bug: skia: Change-Id: Icde2d912941a19999e204ac5213f519ed5387e12 Reviewed-on: https://skia-review.googlesource.com/84480 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Simplify image clearingGravatar Herbert Derby2017-12-13
| | | | | | | | | TBR=fmalita@google.com Change-Id: Ibc7271d599bf2a1b85f3cd2dc07e49bef38fddb0 Reviewed-on: https://skia-review.googlesource.com/84520 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Start removing uses of VkFormatToPixelConfig in vulkan backendGravatar Greg Daniel2017-12-13
| | | | | | | | Bug: skia: Change-Id: I2c8e86b9e8ca6a33913be347a3c65af963c5fd12 Reviewed-on: https://skia-review.googlesource.com/84341 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Update SkImage::MakeFromYUVTexturesCopy to GrBackendTextureGravatar Robert Phillips2017-12-13
| | | | | | | Change-Id: I7ba030c5d7856309709e892a2b1b625cf74c70b8 Reviewed-on: https://skia-review.googlesource.com/82823 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "impl SkSerial picture procs"Gravatar Mike Reed2017-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c8226728541fdd6434a7f1b97678246202b0edc5. Reason for revert: broke old skps Original change's description: > impl SkSerial picture procs > > The picture serialization code is a bit of a mess, with duplicated functions for streams and buffers. > Could not see how to fix that and land this at the same time, but I will try to circle back and > simplify if possible afterwards. > > Bug: skia: > Change-Id: I9053fdc476c60f483df013d021e248258181c199 > Reviewed-on: https://skia-review.googlesource.com/83943 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com Change-Id: I68ae019a286691b65cc373cb29c941d6620fd34a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/84460 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Ensure we flush TextBlobCache message queue.Gravatar Jim Van Verth2017-12-13
| | | | | | | | | | | | If we create and delete TextBlobs without actually renderering them, their deletion messages can back up in the message queue. This adds a routine to GrContext to ensure these messages get flushed. Bug: 703297 Change-Id: Icc222373ac2a954dc3b77190cad79070ea562ba2 Reviewed-on: https://skia-review.googlesource.com/82686 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* CCPR: Optimize Hull geometryGravatar Chris Dalton2017-12-13
| | | | | | | | | | | | | Conceptualizes hulls a as single entity, rather than a set of "wedges" fanned around the midpoint. Optimizes GSImpl hulls to use less, better triangles and not use the midpoint. This refactoring also paves the way for VSImpl hulls. Bug: skia: Change-Id: I6a03c7b64811edfd1589f11a5d102e6ee56ea2d2 Reviewed-on: https://skia-review.googlesource.com/83962 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* impl SkSerial picture procsGravatar Mike Reed2017-12-13
| | | | | | | | | | | | The picture serialization code is a bit of a mess, with duplicated functions for streams and buffers. Could not see how to fix that and land this at the same time, but I will try to circle back and simplify if possible afterwards. Bug: skia: Change-Id: I9053fdc476c60f483df013d021e248258181c199 Reviewed-on: https://skia-review.googlesource.com/83943 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* disable f16<->f32 instructions on Google3Gravatar Mike Klein2017-12-13
| | | | | | | | | | | | We're still working out why these intrinsics aren't available. Long term options: - get the intrinsics to work - convert to inline asm Change-Id: I07edf1944daf01842f01b26ad874f62314d0f68f Reviewed-on: https://skia-review.googlesource.com/84222 Reviewed-by: Mike Klein <mtklein@chromium.org>
* JUMPER_IS_AVX2 -> JUMPER_IS_HSWGravatar Mike Klein2017-12-12
| | | | | | | | | | | | | | | | | | | | We need to be a bit more pedantic here to support builds that may be using AVX2 as part of their baseline but perhaps not enabling all the related features SkJumper would like to use. E.g. we've seen Tensorflow build with AVX2 and FMA, but not F16C. So check all three {AVX2,FMA,F16C}, and only then build stages in HSW mode. I've updated the define as a reminder. This only affects builds using these features for their _baseline_ stages... the offline-compiled stages in SkJumper_generated.S are not affected. Change-Id: I9bfb3bae3589d35043b748782cefa8c213726d6a Reviewed-on: https://skia-review.googlesource.com/84221 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Handle small sigma in one directionGravatar Herb Derby2017-12-12
| | | | | | | | | | | | | | | Because GPU/CPU must interoperate, the border calculation code adds transparent black border pixels for sigmas that produce a window of 1. This is a very rare case and seems to only happen in fuzzers. In this case cleare everything to black before bluring. BUG=chromium:793285 Change-Id: I2b56f9ad88304abaa2669c9c9ef69b5443ba4333 Reviewed-on: https://skia-review.googlesource.com/83562 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Push much of the SkColorSpace_Base interface up to SkColorSpaceGravatar Brian Osman2017-12-12
| | | | | | | | | | | Some pieces still remain, but the next step looks less mechanical, so I wanted to land this piece independently. Bug: skia: Change-Id: Ie63afcfa08af2f6e4996911fa2225c43441dbfb2 Reviewed-on: https://skia-review.googlesource.com/84120 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove GrBackendObject from tests (except image_from_yuv_textures)Gravatar Robert Phillips2017-12-12
| | | | | | | | | This sets the stage for landing https://skia-review.googlesource.com/c/skia/+/82823 (Update SkImage::MakeFromYUVTexturesCopy to GrBackendTexture) Change-Id: I2c62f23dc447b9ad55c0b5f06bcd6d7ca0ec4d2b Reviewed-on: https://skia-review.googlesource.com/83920 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* a little SkJumper tidy upGravatar Mike Klein2017-12-12
| | | | | | | | | | | | | | | | I noticed these little bits while working on that old-Clang fix. - We can force-inline anytime we've got Clang, not just when JUMPER_IS_OFFLINE. - The _aarch64 and _vfp4 WRAP functions are dead code, as they're never compiled offline now. Change-Id: I5850daded2ffcfe50ceeadc43f89fa8597df3387 Reviewed-on: https://skia-review.googlesource.com/84060 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* only read color array if flag is fixed colorGravatar Cary Clark2017-12-12
| | | | | | | | | | | | | | Fixed color array shouldn't be required in Lattice if no flag is set to kFixedColor. Skip the read from the array if it is not set. R=stani@google.com Bug: skia:6898 Change-Id: I846b5fdf036cf110ce0ae4ffcf0654bca7029412 Reviewed-on: https://skia-review.googlesource.com/83942 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* drop to scalar mode in some armv7 debug buildsGravatar Mike Klein2017-12-12
| | | | | | | | | | | | | Older versions of Clang, at least vanilla 3.9 and "Apple LLVM version 8.1.0 (clang-802.0.42)" seem to crash when compiling SkJumper_stages.cpp with NEON for ARMv7 without at least -O1. So detect that case, and fall back to scalar code. Change-Id: I3c1595da491bef38c18f47f96690700c67fdc70e Reviewed-on: https://skia-review.googlesource.com/83980 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* converted vertex shaders to device coordsGravatar Ethan Nicholas2017-12-12
| | | | | | | | Bug: skia:6239 Change-Id: I1a3b67fe84d208d426d71deb7aea6b0cd433af37 Reviewed-on: https://skia-review.googlesource.com/75501 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Prefer fullscreen clears on Qualcomm/GLGravatar Chris Dalton2017-12-12
| | | | | | | | | | | | | | | | | Adds Qualcomm to the set of GL devices on which we prefer fullscreen clears. Renames fullscreenClearIsFree in GrCaps to preferFullscreenClears. Replaces 'bool canIgnoreClip' on GrRenderTargetContext::clear with an enum. Bug: skia: Change-Id: I5b30298c4d0b092c398b9fea6060f3e2bea91e46 Reviewed-on: https://skia-review.googlesource.com/83060 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* remove vfpv4 requirement for SkJumper on ARMv7Gravatar Mike Klein2017-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VFPv4 gives us two interesting features: - FMA - f16<->f32 conversions Even without FMAs, NEON still has non-fused MLA instructions. We don't really care about the fusedness of those mul-adds, so losing FMA here is kind of no big deal. We already maintain portable code to do f16<->f32 conversions, so it's not much of a maintanence hit to use that instead of the native instructions. To my knowledge software F16 rendering is not a performance critical mode of operation for any of our users. This drops our minimum requirement to basically just having NEON. Devices like the Nexus 7 2012 will now take SkJumper fast paths instead of portable code. (Though actually, we've only ever required NEON for _lowp... only the float code also needed vfpv4). The main file to look at here is actually SkJumper_vectors.h, where you will see all the substantive changes. The rest just kind of tears down most of the old complexity, add adds ABI to put just a little of it back. :) Change-Id: Ia9237117698729c91e5fa51126baf80748093bf4 Bug: skia: Reviewed-on: https://skia-review.googlesource.com/83521 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Rename GrGLAssembleFooInterface to GrGLMakeAssembledFooInterface.Gravatar Brian Salomon2017-12-11
| | | | | | | | | | | | Add GrGLAssembleInterface with legacy bare pointer return. This allows existing clients of GrGLAssembleInterface to roll Skia without code changes. Change-Id: I0764a9f4583e554fff5574889adcc6fe004db159 Reviewed-on: https://skia-review.googlesource.com/83564 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix fuzzer crash in SkReadBuffer::readTypeface()Gravatar Florin Malita2017-12-11
| | | | | | | | | BUG=skia:7398 Change-Id: I1d0f7a37c6f02ec5f621f7c1b5983b668530dcd9 Reviewed-on: https://skia-review.googlesource.com/83561 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Use first/second instead of min/max in 2pt conical gradientGravatar Yuqian Li2017-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | Here's the tiny performance gain: $python tools/calmbench/calmbench.py firstsecond --extraarg "-m conic" firstsecond (compared to master) is likely 4.23% faster in gradient_conicalOut_clamp_3color 4.23% faster in gradient_conicalOutZero_clamp_3color 4.79% faster in gradient_conical_clamp_shallow_dither 6.04% faster in gradient_conical_clamp_3color 6.04% faster in gradient_conicalZero_clamp_3color 6.42% faster in gradient_conicalOut_clamp 6.43% faster in gradient_conicalOutZero_clamp 6.74% faster in gradient_conical_clamp 6.98% faster in gradient_conical_clamp_shallow 6.98% faster in gradient_conicalZero_clamp Bug: skia: Change-Id: Id74866908b99753ed8b16a657d3f67c9255d0043 Reviewed-on: https://skia-review.googlesource.com/76561 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* read signed 32 if we want to treat it as signedGravatar Mike Reed2017-12-11
| | | | | | | | Bug:793603 Change-Id: I040d775fcf76da095ea2a25c33408508b3466fd7 Reviewed-on: https://skia-review.googlesource.com/83280 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* add virtual to confirm flattenable typeGravatar Mike Reed2017-12-11
| | | | | | | | | | | meant to replace https://skia-review.googlesource.com/c/skia/+/83381 Bug:793639 Change-Id: I972dc80725bf5ce5be24769aafa23269735e089c Reviewed-on: https://skia-review.googlesource.com/83444 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Implement a fast path for solid color lattice rectangleGravatar Stan Iliev2017-12-11
| | | | | | | | | | | | Add a flag that hints, which lattice rectangles are solid colors. Draw solid rectangles and 1x1 rectangles with drawRect. Test: Measured performance of a ninepatch drawn by HWUI Bug: b/69796044 Change-Id: Ib3b00ca608da42fa9f2d2038cc126a978421ec7c Reviewed-on: https://skia-review.googlesource.com/79821 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* fixed SkSL optimizing away side effectsGravatar Ethan Nicholas2017-12-11
| | | | | | | | Bug: skia:7196 Change-Id: I44676003d9ea7970efb40df2f7e40c2de05a5f67 Reviewed-on: https://skia-review.googlesource.com/83440 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Add GrGLMakeNativeInterface factory that returns sk_sp<const GrGLInterface>.Gravatar Brian Salomon2017-12-11
| | | | | | | | | | | | | | | Removes the concept of a configurable "default" interface and makes the default always be the "native" interface. Also removes unused functions: GrGLInterfaceAddTestDebugMarker and GrGLInterface::NewClone. Keeps around legacy GrGLCreateNativeInterface() until clients can be weened. Change-Id: I4a3bdafa8cf8c68ed13318393abd55686b045ccb Reviewed-on: https://skia-review.googlesource.com/83000 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* CCPR: Don't use instanced draw calls with geometry shadersGravatar Chris Dalton2017-12-11
| | | | | | | | | | | | It isn't necessary for the vertex shader to know all the points because everything happens in the geometry shader. It's simpler to use regular vertex arrays instead. Bug: skia: Change-Id: I7bf83180476fbe0ab01492611cd72e72b3f7d4f2 Reviewed-on: https://skia-review.googlesource.com/82881 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "add experimental bilerp_clamp_8888 stage"Gravatar Mike Klein2017-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a7fa3377d24643d86117159f8a58d2ee66880a4d. Reason for revert: lots of crashing GPU bots. Original change's description: > add experimental bilerp_clamp_8888 stage > > It looks like we can specialize hot image shaders into their > own single stages for a good speedup on both x86 and ARM. > > I've started here with bilerp_clamp_8888, and will > follow up with bgra and 565, and lowp versions of those, > and probably also the same for nearest neighbors. > > All pixels are identical in GMs. > > Change-Id: I2f6995767cd38053d670b8d0bfdb71b687803d70 > Reviewed-on: https://skia-review.googlesource.com/82100 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,mtklein@google.com,liyuqian@google.com Change-Id: If70abb91b69bcd781e395dd3ac05ff1eebb1169f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/83340 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* add experimental bilerp_clamp_8888 stageGravatar Mike Klein2017-12-11
| | | | | | | | | | | | | | | | It looks like we can specialize hot image shaders into their own single stages for a good speedup on both x86 and ARM. I've started here with bilerp_clamp_8888, and will follow up with bgra and 565, and lowp versions of those, and probably also the same for nearest neighbors. All pixels are identical in GMs. Change-Id: I2f6995767cd38053d670b8d0bfdb71b687803d70 Reviewed-on: https://skia-review.googlesource.com/82100 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix tautological comparison in GrTextureDomain.cppGravatar Hans Wennborg2017-12-09
| | | | | | | | | | | | | | | | | -1 is not a valid value for the GrTextureDomain::Mode enum, so certain versions of Clang warn that the comparison is a no-op: ../../third_party/skia/src/gpu/effects/GrTextureDomain.cpp:70:23: warning: comparison of constant -1 with expression of type 'GrTextureDomain::Mode' is always false [-Wtautological-constant-out-of-range-compare] SkASSERT((Mode)-1 == fMode || textureDomain.mode() == fMode); ~~~~~~~~ ^ ~~~~~ Bug: chromium:793189 Change-Id: Iba49ae15622285a62ad218dbdd78b0846338b7cb Reviewed-on: https://skia-review.googlesource.com/82962 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* centralize encoding to SkDataGravatar Mike Reed2017-12-09
| | | | | | | | Bug: skia: Change-Id: If3a9a6de54cf76d03e4d159b54b07a4ea6d5cda9 Reviewed-on: https://skia-review.googlesource.com/83020 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Fix tautological compare in GrSurfaceProxy.cppGravatar Hans Wennborg2017-12-09
| | | | | | | | | | | | | | | | | | | | -1 is not a valid value for the GrSurfaceOrigin enum, and certain versions of Clang warn that the comparison is effectively a no-op: ../../third_party/skia/src/gpu/GrSurfaceProxy.cpp:547:38: warning: comparison of constant -1 with expression of type 'GrSurfaceOrigin' is always true [-Wtautological-constant-out-of-range-compare] SkASSERT(kGrUnknownSurfaceOrigin != fProxy->origin()); ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~ Instead of trying to force -1 in there, drop the assert and initialize with top-left as origin. Bug: chromium:793189 Change-Id: I4cb6720d567f6c5650a19df33d3c77f2d738a516 Reviewed-on: https://skia-review.googlesource.com/82961 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Don't force GrGLSLVarying's scope to be compile-time constantGravatar Chris Dalton2017-12-08
| | | | | | | | Bug: skia: Change-Id: I70a191949fd26a39257a8a59a0a4c6448ec1fa37 Reviewed-on: https://skia-review.googlesource.com/82462 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* CCPR: Combine loops and serpentines back into a single shaderGravatar Chris Dalton2017-12-08
| | | | | | | | Bug: skia: Change-Id: I945471ccd2580a2d39afd9c80acb8d9e5e196435 Reviewed-on: https://skia-review.googlesource.com/82460 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Revert "use serialprocs for typefaces""Gravatar Mike Reed2017-12-08
| | | | | | | | | | | | | | This reverts commit 1a104bce20adc47a343fa910899ca6c4f261be40. Change (from first version) is - only signal error in readbuffer for corrupt stream, not default fonts - change test to ensure a non-null typeface (i.e. MakeDefault()) Bug: skia: Change-Id: I325445b56b0a402e1b89a2439df06e92314c793f Reviewed-on: https://skia-review.googlesource.com/82687 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Use sk_sp to own GrCaps in GrContext.Gravatar Brian Salomon2017-12-08
| | | | | | | Change-Id: I46cd37132ecdf0f93be4509c6a06fb74cb185076 Reviewed-on: https://skia-review.googlesource.com/82625 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* keep SVG arcs axis aligned with suppressionGravatar Cary Clark2017-12-08
| | | | | | | | | | | | | | another attempt at https://skia-review.googlesource.com/c/skia/+/79423 this time, bracket change with SK_SUPPORT_LEGACY_SVG_ARC_TO to avoid prematurely changing SVG layout test results. R=djsollen@google.com Bug: b:69622768 Change-Id: Ia929f89d4f4292dfead191a381cdb431f743726a Reviewed-on: https://skia-review.googlesource.com/82723 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* enforce 4-byte alignment and length for buffersGravatar Mike Reed2017-12-08
| | | | | | | | Bug:792859 Change-Id: Ib4cde1015429153709956d4ffc2d4321decb79b0 Reviewed-on: https://skia-review.googlesource.com/82160 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* return data instead of boolGravatar Mike Reed2017-12-08
| | | | | | | | Bug: skia: Change-Id: Id7c3044a2fce087703544c624c75a7756b9c62b4 Reviewed-on: https://skia-review.googlesource.com/82602 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove instanced renderingGravatar Brian Salomon2017-12-08
| | | | | | | Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4 Reviewed-on: https://skia-review.googlesource.com/82241 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* CCPR: Move flatness checks from geometry shaders to CPUGravatar Chris Dalton2017-12-07
| | | | | | | | | | Vertex shaders can't discard geometry. Bug: skia: Change-Id: Iec22a103b7a4eda9a59fd99e48644183b0880f5f Reviewed-on: https://skia-review.googlesource.com/82260 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* turn back on NEON lowp code...Gravatar Mike Klein2017-12-07
| | | | | | | | | | | | Turns out I was defining JUMPER_HAS_NEON_LOWP, but checking JUMPER_NEON_HAS_LOWP. 🤦 Change-Id: Ib328190ce35a367bf3d08d8e66f0ab8791ccb8b2 Reviewed-on: https://skia-review.googlesource.com/82320 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Transition to using size_t for only byte allocation sizes.Gravatar Herbert Derby2017-12-07
| | | | | | | | | | This will simplify coming refactorings, and make the code similar to the image blur code. Change-Id: I4d61ac21e3428b0e4fce03159c66539b9b032fe7 Reviewed-on: https://skia-review.googlesource.com/81961 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Herb Derby <herb@google.com>