aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
Commit message (Collapse)AuthorAge
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* remove SkThread, using std::thread insteadGravatar Mike Klein2017-10-30
| | | | | | | Change-Id: I871dd5eea4496e87c206b46d9eae81cb521b11ce Reviewed-on: https://skia-review.googlesource.com/65103 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Do not TryBlitFatAntiRect if isInverseGravatar Yuqian Li2017-10-30
| | | | | | | | | | | | | This fixes https://bugs.chromium.org/p/skia/issues/detail?id=7193 That bug only exists in our FDAA (forceDAA) bots (and maybe future threaded backend) because we don't use DAA for convex paths otherwise. Bug: skia:7193 Change-Id: I5e8660012655610417b40d964ee8d21b050a7820 Reviewed-on: https://skia-review.googlesource.com/65061 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* add Type enum to SkColorSpaceGravatar Mike Reed2017-10-27
| | | | | | | | Bug: 727128 Change-Id: I116de4efd6e64504a4e1892f431f528533b1173a Reviewed-on: https://skia-review.googlesource.com/64261 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Pass GrRenderTargetContext's GrColorSpaceInfo to SkShader and SkColorFilter.Gravatar Brian Salomon2017-10-25
| | | | | | | | | | | | | | Also to SkColorTo(Premul|Unpremul)GrColor4f. This can avoid cache lookups to find GrColorSpaceXforms as the xform pointer is stored in GrColorSpaceInfo after the first lookup. Also uses GrColorSpaceInfo to construct GrTextUtils::Paint. Bug: skia: Change-Id: Idf19d512a60d2269e6921c7fb54d93aee499a70d Reviewed-on: https://skia-review.googlesource.com/63660 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Short-circuit gradient color space conversionGravatar Florin Malita2017-10-25
| | | | | | | | | ... when src == dst Change-Id: Idd62fb673105a62ee4d381a4dbc1d5117ce6abb9 Reviewed-on: https://skia-review.googlesource.com/63702 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* - add bench for pixmap orientGravatar Mike Reed2017-10-25
| | | | | | | | | | - reduce code size by using a draw instead of custom blits Bug: skia: Change-Id: I90f9fb2abf40496e771f1f725556c178d730b590 Reviewed-on: https://skia-review.googlesource.com/62860 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* fine-grained ARMv7 CPU feature detectionGravatar Mike Klein2017-10-25
| | | | | | | | | | VPFv4 does not imply NEON, so check that bit separately. Bug: b/63553517 Change-Id: Ibc218871804204d5a91d0b7fc8d5c91fe2e95f01 Reviewed-on: https://skia-review.googlesource.com/63640 Reviewed-by: Bailey Forrest <bcf@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add GrColorSpaceInfo and use in place of GrRenderTargetContext in paint ↵Gravatar Brian Salomon2017-10-24
| | | | | | | | | | | conversion. This moves us closer to making GrAtlasTextContext and related classes usable without a GrRenderTargetContext. Change-Id: Ife52d69a3f925e23da88043acb4d8dc9f672a025 Reviewed-on: https://skia-review.googlesource.com/63304 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* add srcover_bgra_8888Gravatar Mike Klein2017-10-24
| | | | | | | | | | | | | | Chrome generally uses BGRA buffers, so srcover_rgba_8888 isn't really doing them any good. Probably a good idea to cover both kN32 options any time we specialize like this? There's one small diff, so I've lazily guarded this by SK_LEGACY_LOWP_STAGES, which I want to rebaseline today anyway. Change-Id: Ice672aa01a3fc83be0798580d6730a54df075478 Reviewed-on: https://skia-review.googlesource.com/63301 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Create mipped texture proxys for PictureImageGeneratorGravatar Greg Daniel2017-10-24
| | | | | | | | Bug: skia: Change-Id: If86b01e5c008537de8c9af99000559bf524c836f Reviewed-on: https://skia-review.googlesource.com/63260 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Use SK_SUPPORT_LEGACY_AA_CHOICE to stage some changesGravatar Yuqian Li2017-10-23
| | | | | | | | | | | So I can rebaseline the golden images and unify AA choices without fully turning on DAA. Bug: skia: Change-Id: I33447f60c8eac6318dda7730abd6caefdb14c5dc Reviewed-on: https://skia-review.googlesource.com/62840 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com>
* translate+scale -> scale+translateGravatar Mike Klein2017-10-20
| | | | | | | | | | | | | | | | This is a no-op refactor. It's just always surprised me that the matrix_scale_translate stage expects [tx ty sx sy], when scales precede the translates in the names and in both normal row-major and column-major matrix layouts. This switches to [sx sy tx ty], scale then translate. Change-Id: I2d88701121ae8013facd5a28bb0ff520211db5a6 Reviewed-on: https://skia-review.googlesource.com/62541 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* make matrix serialization privateGravatar Cary Clark2017-10-20
| | | | | | | | | | | | | | | | | | Moves readFromMemory, writeToMemory to private section. No sign that these are called from google3, android, chromium, but function names are common enough that it's hard to know for sure. These are used inside templates internally and for testing, so it is not quite as simple as adding alternate entry points in SkMatrixPriv. R=reed@google.com Bug: skia:6898 Change-Id: I1fac142f4bf0f38608ea93438c46f39147606c4d Reviewed-on: https://skia-review.googlesource.com/62361 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* make skmatrix getmapproc privateGravatar Cary Clark2017-10-20
| | | | | | | | | | | | | | Make SkMatrix MapXYProc MapPtsProc and friends private. Code search turned up no clients in chromium, google3, android. Fingers crossed. R:reed@google.com Bug: skia:6898 Change-Id: Iee20fe5150499215a09f67cc6f117b685f38f455 Reviewed-on: https://skia-review.googlesource.com/62140 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Avoid 2PtConical gradient flippingGravatar Florin Malita2017-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when startRadius > endRadius conical gradients are inverting their data (start/end points and radii, colors and positions) to guarantee r0 < r1 at raster time. But the radii ordering is only mildly interesting to the impl: it controls which of the two quadratic solutions we select for the inside case, but doesn't fundamentally change the algorithm. Furthermore, for the "outside" case, inverting the order is already inconvenient and needs to be taken into account (both CPU/GPU impls are already tracking this bit of info). Instead of transforming the gradient definition, we can detect the inverted case and adjust the quadratic solution selector. In practice this means: * |edge| case - no change, the equation is linear * |inside| case - select the smaller root instead of largest * |outside| case - [gpu-only] invert the clamp/limiting function Change-Id: Ie3106464e39a4dd3848dc43671d973f7e1958e63 Reviewed-on: https://skia-review.googlesource.com/61660 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* fix mapRect to always return the same as rectStaysRectGravatar Mike Reed2017-10-18
| | | | | | | | Bug: skia: Change-Id: I7c19703613b3173942a12153b30e9951f35c0008 Reviewed-on: https://skia-review.googlesource.com/61820 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Move SkCodec::Origin into its own fileGravatar Leon Scroggins III2017-10-18
| | | | | | | | | | | | | | It is now used by SkPixmap and will soon be in SkJpegEncoder. No need for those to depend on SkCodec. Bug: 768878 TBR=reed@google.com (reed@ already approved the API change in https://skia-review.googlesource.com/60721) Change-Id: If1a6e1d5b60a7a3d8c97818e15a48d28ba804668 Reviewed-on: https://skia-review.googlesource.com/61680 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Remove color space xform from GrTextureDomain & GrSimpleTextureEffectGravatar Brian Osman2017-10-18
| | | | | | | | Bug: skia: Change-Id: I31435d334da28cce9bbc654c4b98746b03078897 Reviewed-on: https://skia-review.googlesource.com/61460 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Add an Option for orientation on JPEG encodes"Gravatar Ben Wagner2017-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5411a60e0d7370a5d47b5049de845a06fe52e98b. Reason for revert: ASAN and Coverage failing: https://chromium-swarm.appspot.com/task?id=394978f3b7d44610 Flutter_Android failing. Original change's description: > Add an Option for orientation on JPEG encodes > > Move Origin to its own header so that SkPixmap and SkJpegEncoder need > not depend on SkCodec. > > Add libexif, which is already used by Android, and use it to write the > orientation. Write a makefile based on the Android.bp in Android, minus > warnings. (libexif has an LGPL license.) > > Add a test that verifies all the orientations work. > > Optionally enable writing the orientation (and therefore including > libexif). Chromium does not currently need it, and Android does not > expose an API that would allow using it. Disable on Windows, where we > still have build errors to fix. > > Bug: skia:7138 > Change-Id: Iaeff44c36aebe0e639666979dc00e1b7594bbeb1 > Reviewed-on: https://skia-review.googlesource.com/60721 > Commit-Queue: Leon Scroggins <scroggo@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Reed <reed@google.com> TBR=mtklein@chromium.org,mtklein@google.com,scroggo@google.com,reed@google.com Change-Id: I05b7ae8d1c5bbd1de1642d9ef024943500256273 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7138 Reviewed-on: https://skia-review.googlesource.com/61620 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
* Add an Option for orientation on JPEG encodesGravatar Leon Scroggins III2017-10-18
| | | | | | | | | | | | | | | | | | | | | | | Move Origin to its own header so that SkPixmap and SkJpegEncoder need not depend on SkCodec. Add libexif, which is already used by Android, and use it to write the orientation. Write a makefile based on the Android.bp in Android, minus warnings. (libexif has an LGPL license.) Add a test that verifies all the orientations work. Optionally enable writing the orientation (and therefore including libexif). Chromium does not currently need it, and Android does not expose an API that would allow using it. Disable on Windows, where we still have build errors to fix. Bug: skia:7138 Change-Id: Iaeff44c36aebe0e639666979dc00e1b7594bbeb1 Reviewed-on: https://skia-review.googlesource.com/60721 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Reland the combined 3 pass image blur with a fix to the bounds calculationGravatar Herb Derby2017-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the old bounds calculation so that CPU and GPU agree. Adjust all the combined 3 pass code to use the new bounds. This reverts commit 59f8f154872a66433eb1dfccd3d56b540193089e and fixes bound calculation. Original change's description: > Revert "Use combined three pass code for image blur." > > This reverts commit d4a0fc7383546d106db2216515b3753937398ece. > > Reason for revert: Too naive about bounds > > Original change's description: > > Use combined three pass code for image blur. > > > > This changes more closely matches the GL output, and the runtimes are similar or > > faster for the common cases. > > > > x86_64 times: > > benchmark old-Us new-Us old/new > > blur_image_filter_large_80.00_80.00 4842.04 2626.10 1.84381 > > blur_image_filter_small_80.00_80.00 3297.72 854.97 3.85712 > > blur_image_filter_large_10.00_10.00 930.44 720.50 1.29138 > > blur_image_filter_small_10.00_10.00 69.96 42.15 1.65979 > > blur_image_filter_large_1.00_1.00 682.66 521.78 1.30833 > > blur_image_filter_small_1.00_1.00 19.21 14.43 1.33125 > > blur_image_filter_large_0.50_0.50 696.17 64.14 10.8539 > > blur_image_filter_small_0.50_0.50 16.26 5.02 3.23904 > > > > arm64 times: > > benchmark old-Us new-Us old/new > > blur_image_filter_large_80.00_80.00 42144.53 14128.42 2.98296 > > blur_image_filter_small_80.00_80.00 24840.58 4392.58 5.65512 > > blur_image_filter_large_10.00_10.00 3556.40 3793.70 0.937449 > > blur_image_filter_small_10.00_10.00 282.53 220.62 1.28062 > > blur_image_filter_large_1.00_1.00 2502.20 2937.99 0.851671 > > blur_image_filter_small_1.00_1.00 83.32 81.93 1.01697 > > blur_image_filter_large_0.50_0.50 5643.80 272.83 20.6861 > > blur_image_filter_small_0.50_0.50 141.02 38.29 3.68295 > > > > Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD > > Change-Id: Ic53b3186607d5485477b92e4ca7b092bf1366c52 > > Reviewed-on: https://skia-review.googlesource.com/52771 > > Commit-Queue: Herb Derby <herb@google.com> > > Reviewed-by: Mike Klein <mtklein@google.com> > > TBR=mtklein@google.com,herb@google.com,senorblanco@chromium.org > > Change-Id: Idf679a8fc6d777625ad9527b843aa1614d878cba > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD > Reviewed-on: https://skia-review.googlesource.com/60900 > Reviewed-by: Herb Derby <herb@google.com> > Commit-Queue: Herb Derby <herb@google.com> Change-Id: Idda0d83b1e2f753c9c8e703f9506dd31b117ec55 Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Reviewed-on: https://skia-review.googlesource.com/61320 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Feed seed_shader() iota through a context pointer.Gravatar Mike Klein2017-10-18
| | | | | | | | | | As this array grows longer it causes troublesome code generation when we're compiling offline, but it's easy as an argument. Change-Id: I53526443f534f29d3bff17c3aec24a9e916c9b86 Reviewed-on: https://skia-review.googlesource.com/60564 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* convert mapHomogeneousPoints to SkPoint3Gravatar Cary Clark2017-10-18
| | | | | | | | | | | | | | | SkMatrix::mapHomogeneousPoints takes an array of SkScalar, but expects essentially SkPoint3, so make it so. R: robertphillips@google.com, reed@google.com Bug: skia:6898 Change-Id: Ibaf8b05c08b7df16c67d6a77d914667ace9a70da Reviewed-on: https://skia-review.googlesource.com/58380 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Make GPU backend triangulate rects such that they are ↵Gravatar Brian Salomon2017-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rendered as tri strips rather than tri fans."" This reverts commit 62563deb6b4dbb0b1db7f29f35e07dcef043af31. Reason for revert: change that affected similar set of GMs reverted, relanding now that this is more easily triagable. Original change's description: > Revert "Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans." > > This reverts commit fa2d604a7ded95a3ace905519b476129cd0fffcb. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans. > > > > Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip. > > > > I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case. > > > > > > Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca > > Reviewed-on: https://skia-review.googlesource.com/60081 > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com > > Change-Id: I7c4c23aa418da09c9708b28cce64ab58e282dd3a > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/60683 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Iefcd16676a7617d32e89fc84206cd4e88e9a06e1 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/61160 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Use combined three pass code for image blur."Gravatar Herb Derby2017-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d4a0fc7383546d106db2216515b3753937398ece. Reason for revert: Too naive about bounds Original change's description: > Use combined three pass code for image blur. > > This changes more closely matches the GL output, and the runtimes are similar or > faster for the common cases. > > x86_64 times: > benchmark old-Us new-Us old/new > blur_image_filter_large_80.00_80.00 4842.04 2626.10 1.84381 > blur_image_filter_small_80.00_80.00 3297.72 854.97 3.85712 > blur_image_filter_large_10.00_10.00 930.44 720.50 1.29138 > blur_image_filter_small_10.00_10.00 69.96 42.15 1.65979 > blur_image_filter_large_1.00_1.00 682.66 521.78 1.30833 > blur_image_filter_small_1.00_1.00 19.21 14.43 1.33125 > blur_image_filter_large_0.50_0.50 696.17 64.14 10.8539 > blur_image_filter_small_0.50_0.50 16.26 5.02 3.23904 > > arm64 times: > benchmark old-Us new-Us old/new > blur_image_filter_large_80.00_80.00 42144.53 14128.42 2.98296 > blur_image_filter_small_80.00_80.00 24840.58 4392.58 5.65512 > blur_image_filter_large_10.00_10.00 3556.40 3793.70 0.937449 > blur_image_filter_small_10.00_10.00 282.53 220.62 1.28062 > blur_image_filter_large_1.00_1.00 2502.20 2937.99 0.851671 > blur_image_filter_small_1.00_1.00 83.32 81.93 1.01697 > blur_image_filter_large_0.50_0.50 5643.80 272.83 20.6861 > blur_image_filter_small_0.50_0.50 141.02 38.29 3.68295 > > Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD > Change-Id: Ic53b3186607d5485477b92e4ca7b092bf1366c52 > Reviewed-on: https://skia-review.googlesource.com/52771 > Commit-Queue: Herb Derby <herb@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,herb@google.com,senorblanco@chromium.org Change-Id: Idf679a8fc6d777625ad9527b843aa1614d878cba No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Reviewed-on: https://skia-review.googlesource.com/60900 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Fix left shift ASAN problemGravatar Yuqian Li2017-10-17
| | | | | | | | | | This should fix our new FSAA ASAN bot: https://chromium-swarm.appspot.com/task?id=39446a25c7957710&refresh=10&show_raw=1&wide_logs=true Bug: skia:7179 Change-Id: I1fcee6f7e3d8c8e3a646c67e41d4b6c19d372835 Reviewed-on: https://skia-review.googlesource.com/60702 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Make GPU backend triangulate rects such that they are rendered as ↵Gravatar Brian Salomon2017-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tri strips rather than tri fans." This reverts commit fa2d604a7ded95a3ace905519b476129cd0fffcb. Reason for revert: <INSERT REASONING HERE> Original change's description: > Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans. > > Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip. > > I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case. > > > Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca > Reviewed-on: https://skia-review.googlesource.com/60081 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I7c4c23aa418da09c9708b28cce64ab58e282dd3a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/60683 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert[4] "apply codec origin in generator"Gravatar Mike Reed2017-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dd340146f1fe7414702d6fea251da989d425691e. Reason for revert: ios gn file fixed Original change's description: > Revert "Revert "Revert "apply codec origin in generator""" > > This reverts commit 82269abfec798621c8dbbc6bd48996c0b2686f41. > > Reason for revert: ios build needs include path for SkCodec.h > > Original change's description: > > Revert "Revert "apply codec origin in generator"" > > > > This reverts commit 363dd988a55c2ed3fa92e2368c1c889101425734. > > > > Reason for revert: pdfium fix landed > > > > Original change's description: > > > Revert "apply codec origin in generator" > > > > > > This reverts commit fa15877f487333bec876e7315cf584c0d598d098. > > > > > > Reason for revert: Appears to break PDFium. > > > > > > Original change's description: > > > > apply codec origin in generator > > > > > > > > Bug: skia: > > > > Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a > > > > Reviewed-on: https://skia-review.googlesource.com/58600 > > > > Reviewed-by: Leon Scroggins <scroggo@google.com> > > > > Commit-Queue: Mike Reed <reed@google.com> > > > > > > TBR=scroggo@google.com,reed@google.com > > > > > > Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: skia: > > > Reviewed-on: https://skia-review.googlesource.com/60041 > > > Reviewed-by: Ben Wagner <benjaminwagner@google.com> > > > Commit-Queue: Ben Wagner <benjaminwagner@google.com> > > > > TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com > > > > Change-Id: I1b54a6e6e6cbda07f346ffbbc4977f9db705abcd > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: skia: > > Reviewed-on: https://skia-review.googlesource.com/60320 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com > > Change-Id: I4c2d310521d1a678b407d30b9fe3c261c49d67bc > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/60560 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com Change-Id: I5c1e53aff3ad174b0d4a806c35b7cdcd194479d7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/60563 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Make GPU backend triangulate rects such that they are rendered as tri strips ↵Gravatar Brian Salomon2017-10-17
| | | | | | | | | | | | | | rather than tri fans. Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip. I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case. Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca Reviewed-on: https://skia-review.googlesource.com/60081 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Use combined three pass code for image blur.Gravatar Herb Derby2017-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes more closely matches the GL output, and the runtimes are similar or faster for the common cases. x86_64 times: benchmark old-Us new-Us old/new blur_image_filter_large_80.00_80.00 4842.04 2626.10 1.84381 blur_image_filter_small_80.00_80.00 3297.72 854.97 3.85712 blur_image_filter_large_10.00_10.00 930.44 720.50 1.29138 blur_image_filter_small_10.00_10.00 69.96 42.15 1.65979 blur_image_filter_large_1.00_1.00 682.66 521.78 1.30833 blur_image_filter_small_1.00_1.00 19.21 14.43 1.33125 blur_image_filter_large_0.50_0.50 696.17 64.14 10.8539 blur_image_filter_small_0.50_0.50 16.26 5.02 3.23904 arm64 times: benchmark old-Us new-Us old/new blur_image_filter_large_80.00_80.00 42144.53 14128.42 2.98296 blur_image_filter_small_80.00_80.00 24840.58 4392.58 5.65512 blur_image_filter_large_10.00_10.00 3556.40 3793.70 0.937449 blur_image_filter_small_10.00_10.00 282.53 220.62 1.28062 blur_image_filter_large_1.00_1.00 2502.20 2937.99 0.851671 blur_image_filter_small_1.00_1.00 83.32 81.93 1.01697 blur_image_filter_large_0.50_0.50 5643.80 272.83 20.6861 blur_image_filter_small_0.50_0.50 141.02 38.29 3.68295 Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Change-Id: Ic53b3186607d5485477b92e4ca7b092bf1366c52 Reviewed-on: https://skia-review.googlesource.com/52771 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Revert "Revert "Revert "apply codec origin in generator"""Gravatar Mike Reed2017-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 82269abfec798621c8dbbc6bd48996c0b2686f41. Reason for revert: ios build needs include path for SkCodec.h Original change's description: > Revert "Revert "apply codec origin in generator"" > > This reverts commit 363dd988a55c2ed3fa92e2368c1c889101425734. > > Reason for revert: pdfium fix landed > > Original change's description: > > Revert "apply codec origin in generator" > > > > This reverts commit fa15877f487333bec876e7315cf584c0d598d098. > > > > Reason for revert: Appears to break PDFium. > > > > Original change's description: > > > apply codec origin in generator > > > > > > Bug: skia: > > > Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a > > > Reviewed-on: https://skia-review.googlesource.com/58600 > > > Reviewed-by: Leon Scroggins <scroggo@google.com> > > > Commit-Queue: Mike Reed <reed@google.com> > > > > TBR=scroggo@google.com,reed@google.com > > > > Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: skia: > > Reviewed-on: https://skia-review.googlesource.com/60041 > > Reviewed-by: Ben Wagner <benjaminwagner@google.com> > > Commit-Queue: Ben Wagner <benjaminwagner@google.com> > > TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com > > Change-Id: I1b54a6e6e6cbda07f346ffbbc4977f9db705abcd > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/60320 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com Change-Id: I4c2d310521d1a678b407d30b9fe3c261c49d67bc No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/60560 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "apply codec origin in generator""Gravatar Mike Reed2017-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 363dd988a55c2ed3fa92e2368c1c889101425734. Reason for revert: pdfium fix landed Original change's description: > Revert "apply codec origin in generator" > > This reverts commit fa15877f487333bec876e7315cf584c0d598d098. > > Reason for revert: Appears to break PDFium. > > Original change's description: > > apply codec origin in generator > > > > Bug: skia: > > Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a > > Reviewed-on: https://skia-review.googlesource.com/58600 > > Reviewed-by: Leon Scroggins <scroggo@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > TBR=scroggo@google.com,reed@google.com > > Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/60041 > Reviewed-by: Ben Wagner <benjaminwagner@google.com> > Commit-Queue: Ben Wagner <benjaminwagner@google.com> TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com Change-Id: I1b54a6e6e6cbda07f346ffbbc4977f9db705abcd No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/60320 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "apply codec origin in generator"Gravatar Ben Wagner2017-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fa15877f487333bec876e7315cf584c0d598d098. Reason for revert: Appears to break PDFium. Original change's description: > apply codec origin in generator > > Bug: skia: > Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a > Reviewed-on: https://skia-review.googlesource.com/58600 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=scroggo@google.com,reed@google.com Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/60041 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
* Remove unnecessary includes of GrColorSpaceXform.hGravatar Brian Osman2017-10-16
| | | | | | | | | Bug: skia: Change-Id: I559486ac8750bb23d477ae8bdaa9d71f8bc7c459 Reviewed-on: https://skia-review.googlesource.com/60183 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* apply codec origin in generatorGravatar Mike Reed2017-10-16
| | | | | | | | Bug: skia: Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a Reviewed-on: https://skia-review.googlesource.com/58600 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
* remove unused SkMatrix setIDivGravatar Cary Clark2017-10-16
| | | | | | | | | | | | Unused setIDiv, untested internally. Unused by google3, android, chromium. R: reed@google.com Bug: skia: 6898 Change-Id: I57101b147272ed198746afc298cc0f5a6434abe0 Reviewed-on: https://skia-review.googlesource.com/59960 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com>
* remove dead code -- older than min picture versionGravatar Mike Reed2017-10-13
| | | | | | | | Bug: skia: Change-Id: I9bd3ed23debb4d0cbfff5417f34daf64b101ca2d Reviewed-on: https://skia-review.googlesource.com/59602 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Make SkTypeface::Style and FromOldStyle private.Gravatar Ben Wagner2017-10-13
| | | | | | | | | These are no longer used outside of Skia, so make them private. Change-Id: I735bb39c10553885cc6051aebddeff150ba4caa9 Reviewed-on: https://skia-review.googlesource.com/59180 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>