Some users of Skia want to build these with -I instead of -isystem, and
until now we've piggybacked it on werror, but it's still kind of
annoying to see warnings even if they're not fatal.
Change-Id: I5a349b2571adc2f94c75dc17317666ddc2dec373
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297788
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
If skia_use_fonthost_mac is set, use SkFontMgr_mac_ct_factory.cpp on
both macOS and iOS. Previously, this was only used on macOS, causing iOS
Flutter builds to default to SkFontMgr_empty_factory.cpp on that
platform.
Patch that introduced the Flutter iOS issue:
https://skia-review.googlesource.com/c/skia/+/295437
Change-Id: If2f1e7db47a55245de6c2658ad564e79134d3e7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297194
Commit-Queue: Chris Bracken <cbracken@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Plus some minor cleanup and asserts.
Bug: oss-fuzz:23395
Change-Id: I667bee2d7f21864defe2fd97df9eb4e99d69d9ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296451
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Change-Id: I5c1e6d8fd52ecfe628a78569b4665a64e1499fa5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296938
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This tests the case where the stroke has butt caps and its width
significantly larger than the path itself. There seems to be some
uncertainty over what should actually be drawn in some of these cases,
as evidenced by the variable results from different path renderers
here.
Change-Id: I5b62ec446bfbba73d09ddb4eac710e338bedfc6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296114
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Reed <reed@google.com>
We also fix getReadSwizzle with this change.
Change-Id: I1989d8347dc97d7a4c75aa9094a0146419c6d8fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295819
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This table is really hot during drawing and we saw a regression when
it was introduced. This change provides wins locally but I don't have
the regressed hardware handy.
Additionally, we change from SkGoodHash to the MixCheap function used by
some other small tables in the library.
Bug: skia:10372
Change-Id: Ic2dfbf41649515245e82cbcc9765cb29270eb5cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295878
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is a reland of a25422faa4
Original change's description:
> Fetch clang-format automatically when compiling .fp files.
>
> On a freshly fetched repo, setting `skia_compile_processors = true` will
> fail to compile because clang-format is missing from the bin directory.
> This CL automatically runs fetch-clang-format for you when clang-format
> is absent.
>
> Change-Id: Ieeb359176072e92ca235316c820310333732f608
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: Ib397716771f742f192ebd6ed7ec0a9915b2400c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295956
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
CCPR stroking is not enabled by default and will eventually be
removed. This CL is a step toward migrating it to an MSAA version.
Change-Id: I565bea1c91c51bcd1ea3766aee6e4702adf3b09e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295608
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This will also expose the Vulkan precompilation path to immutable samplers.
Change-Id: Ida31bd70455299fbcc8f4d728aa15179f7685311
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295799
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit a25422faa4.
Reason for revert: breaks Windows build
Original change's description:
> Fetch clang-format automatically when compiling .fp files.
>
> On a freshly fetched repo, setting `skia_compile_processors = true` will
> fail to compile because clang-format is missing from the bin directory.
> This CL automatically runs fetch-clang-format for you when clang-format
> is absent.
>
> Change-Id: Ieeb359176072e92ca235316c820310333732f608
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=mtklein@google.com,johnstiles@google.com
Change-Id: If6412e74a16aa515c223d5d4f326780c8a69766f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295832
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The ar utility only adds symbols. As a result removed symbols are
sometimes still present in later builds, leading to great confusion.
Delete the .a file before recreating it with ar.
This is similar to what Chromium currently does in gcc_toolchain.gni.
However, we cannot always just use 'rm' because of the build for Android
on Windows, so this introduces 'rm.py' which is just like 'cp.py' but
without the copy part.
Bug: skia:10363
Change-Id: Icc0c3d18dab1e48ccfec47386662c7b4d2dc8811
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295569
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
On a freshly fetched repo, setting `skia_compile_processors = true` will
fail to compile because clang-format is missing from the bin directory.
This CL automatically runs fetch-clang-format for you when clang-format
is absent.
Change-Id: Ieeb359176072e92ca235316c820310333732f608
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: Id7c51504450c1c7c9421eba3838bd6bc3440ca4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295437
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
After removing all unused API from SkReader32, it only had a handful
of functions, and it was (rightly) only used by SkReadBuffer. Remove
the temptation to use it by just folding it into SkReadBuffer.
SkWriter32 had some unnecessary functions as well (only used in unit
tests), so those are gone. There is still a strange relationship:
SkWriteBuffer is just an interface - SkReadBuffer is actually the
complement of SkBinaryWriteBuffer/SkWriter32. Those two classes produce
data in the exact same format, but with slightly different interfaces.
(The choice about which one is used is mostly about high-level
serialization vs. low-level helpers).
Change-Id: I1e823755febecd2e053ea732b21295d8f4d9d832
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295557
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 3b035e0417.
Reason for revert: Build-Win-Clang-arm64-Release-Android runs on
Windows and uses llvm-ar.
Original change's description:
> Delete .a file before writing static library.
>
> The ar utility only adds symbols. As a result removed symbols are
> sometimes still present in later builds, leading to great confusion.
> Delete the .a file before recreating it with ar.
>
> This is similar to what Chromium currently does in gcc_toolchain.gni.
>
> Bug: skia:10363
> Change-Id: I133deb6da570ca38a539b4f0bb486b61d6a664bf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295217
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
TBR=mtklein@google.com,bungeman@google.com
Change-Id: I02ba93ce26eedb2b2362e96d2ebfcacbfb8e0902
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10363
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295445
Reviewed-by: Ben Wagner <bungeman@google.com>
The ar utility only adds symbols. As a result removed symbols are
sometimes still present in later builds, leading to great confusion.
Delete the .a file before recreating it with ar.
This is similar to what Chromium currently does in gcc_toolchain.gni.
Bug: skia:10363
Change-Id: I133deb6da570ca38a539b4f0bb486b61d6a664bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295217
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This CL adds a new descriptor heap manager that handles creation of
descriptor tables, or ranges of shader-visible descriptors. These
are used to set the descriptors that match the setup of the root
signature. Data from non-shader-visible descriptors are copied into
these tables, and then they are bound to the command list.
Change-Id: Ia9fc24cae602244525a196025c044df3c2435d9f
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294300
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Fits a cubic to an arc on the unit circle using the following
constraints:
1) The endpoints and tangent directions at the endpoints must match
the arc.
2) The cubic must be symmetric (length(p1 - p0) == length(p3 - p2)).
3) The height of the cubic must match the height of the arc.
Using the above constraints, we arrive at the following formula for the
control length (c) (i.e., lengths of (p1 - p0) and (p3 - p2)):
d = x0*x1 + y0*y1
c = (sqrt(1 + d) * kM + kA) * rsqrt(1 - d)
(Where x0,y0,x1,y1 are the endpoints, kM = -4/3, and kA = 4/3 * sqrt(2).)
The sample also comes with a root finder that finds the max error value
of the curve, which ends up serving as a semi-formal proof that:
1) Max error always occurs at T=0.21132486540519, regardless of
endpoints.
2) Error is reduced by exactly 64x each time we halve the arc angle
Change-Id: I29ad60dda06743d79f71275c38ffdd97261159ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295303
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Its effect is small and we want to rely on SkReadBuffer being available.
Size changes:
- canvaskit uncompressed: 6,864,481 --> 6,864,481 ( no change )
- canvaskit compressed: 2,667,117 --> 2,667,117 ( no change )
- pathkit uncompressed: 329,187 --> 330,679 (+ 1.5K, +0.5%)
- pathkit compressed: 134,158 --> 134,672 (+ 0.5K, +0.4%)
- flutter : 1,302,108 --> 1,322,568 (+20.0K, +1.6%)
The Flutter change is the biggest mystery, as bloaty only pegs
SkReadBuffer as 3.9K. The rest must come from other files including
SkReadBuffer.h not being able to see and inline away SkReadBuffer
routines? Feels like SK_DISABLE_EFFECT_DESERIALIZATION isn't trimming
enough?
PS 4-6 have an idea to push SK_DISABLE_EFFECT_DESERIALIZATION further.
Change-Id: Ifda3ccb82dd0636cfed6bb826fb185a7bca2cbe0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295061
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This FP was unused and not referenced anywhere in the codebase.
Change-Id: I27f963d7c26382101b585f356a75d84cef5ab237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295080
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
With prior changes, it became "clear" that GrClearOp and
GrClearStencilClipOp behaved very similarly, except that the stencil
op did not have any onCombine logic.
This just combines them in to a single clear op that will call the
render pass's clear and stencil clear functions as needed. I also
implemented combine logic to apply color and stencil clears in a single
op if the scissor state was compatible (although there's no render pass
API to combine the two clears into a single GPU function).
Change-Id: I8aa749fe64cc487d187854fd0acf6b03b86f1356
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290822
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
There can be only one SkFontMgr::Factory, so each should go in its own
translation unit. In addition, the name SkFontHost_mac is now rather out
of date and should now be SkFontMgr_mac_ct. Since the additional burden
of additional build changes after the first is minimal, also split out
SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
which are replacing it. Once references to it are removed from all
builds it can be removed.
This is intended to be a reorganization without much code change. Most
changes are simple renaming of functions which are now shared between
translation units. However, there are a few behavior changes here.
* Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
* SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
* SkFontMgr_New_CoreText takes a CTFontCollectionRef.
Change-Id: Iac548f9fd920c426ea5c6dcdefe8da0a9b89ec90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294704
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294714
Reviewed-by: Ben Wagner <bungeman@google.com>
This reverts commit 2c628340f4.
Reason for revert: ios-simulator chrome bot:
FAILED: obj/skia/x64/skia_unittests
TOOL_VERSION=1591394828 ../../build/toolchain/mac/linker_driver.py -Wcrl,strippath,/opt/s/w/ir/cache/xcode_ios_11e146.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip ../../third_party/llvm-build/Release+Asserts/bin/clang++ -B /opt/s/w/ir/cache/xcode_ios_11e146.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker obj/skia/skia_unittests.xcent -Wl,-fatal_warnings -arch x86_64 -Werror -nostdlib++ -isysroot sdk/xcode_links/iPhoneSimulator13.4.sdk -mios-simulator-version-min=12.0 -Wl,-ObjC -o "obj/skia/x64/skia_unittests" -Wl,-filelist,"obj/skia/x64/skia_unittests.rsp" -framework UIKit -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework UIKit -framework Security
Undefined symbols for architecture x86_64:
"SkCTFontGetSmoothBehavior()", referenced from:
SkTypeface_Mac::onFilterRec(SkScalerContextRec*) const in libskia.a(SkFontHost_mac.o)
SkScalerContext_Mac::generateImage(SkGlyph const&) in libskia.a(SkFontHost_mac.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Original change's description:
> Split out coretext fontmgr factory.
>
> There can be only one SkFontMgr::Factory, so each should go in its own
> translation unit. In addition, the name SkFontHost_mac is now rather out
> of date and should now be SkFontMgr_mac_ct. Since the additional burden
> of additional build changes after the first is minimal, also split out
> SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
> SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
> which are replacing it. Once references to it are removed from all
> builds it can be removed.
>
> This is intended to be a reorganization without much code change. Most
> changes are simple renaming of functions which are now shared between
> translation units. However, there are a few behavior changes here.
> * Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
> * SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
> * SkFontMgr_New_CoreText takes a CTFontCollectionRef.
>
> Change-Id: I897f69f2f5ea06819f5daa964c09cdd36490af85
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294704TBR=mtklein@google.com,bungeman@google.com
Change-Id: I5abeb7598c7f533477b4a4af5b568f7cbe6e8644
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294734
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
There can be only one SkFontMgr::Factory, so each should go in its own
translation unit. In addition, the name SkFontHost_mac is now rather out
of date and should now be SkFontMgr_mac_ct. Since the additional burden
of additional build changes after the first is minimal, also split out
SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
which are replacing it. Once references to it are removed from all
builds it can be removed.
This is intended to be a reorganization without much code change. Most
changes are simple renaming of functions which are now shared between
translation units. However, there are a few behavior changes here.
* Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
* SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
* SkFontMgr_New_CoreText takes a CTFontCollectionRef.
Change-Id: I897f69f2f5ea06819f5daa964c09cdd36490af85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294704
Change-Id: I364365455cc3580f38ddd189f00050ea9e2238a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294565
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This reverts commit 5c14d63297.
Reason for revert: chromium 'analyze' doesn't do a good job
Original change's description:
> Split out coretext fontmgr factory.
>
> There can be only one SkFontMgr::Factory, so each should go in its own
> translation unit. In addition, the name SkFontHost_mac is now rather out
> of date and should now be SkFontMgr_mac_ct. Since the additional burden
> of additional build changes after the first is minimal, also split out
> SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
> SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
> which are replacing it. Once references to it are removed from all
> builds it can be removed.
>
> This is intended to be a reorganization without much code change. Most
> changes are simple renaming of functions which are now shared between
> translation units. However, there are a few behavior changes here.
> * Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
> * SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
> * SkFontMgr_New_CoreText takes a CTFontCollectionRef.
>
> Change-Id: Iaf58a0371667f266ada20c918941fab6bc27d9df
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
TBR=mtklein@google.com,bungeman@google.com
Change-Id: I469084efbfc71bba60e5fbfb4eb7152d57324d0c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294703
Reviewed-by: Ben Wagner <bungeman@google.com>
There can be only one SkFontMgr::Factory, so each should go in its own
translation unit. In addition, the name SkFontHost_mac is now rather out
of date and should now be SkFontMgr_mac_ct. Since the additional burden
of additional build changes after the first is minimal, also split out
SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
which are replacing it. Once references to it are removed from all
builds it can be removed.
This is intended to be a reorganization without much code change. Most
changes are simple renaming of functions which are now shared between
translation units. However, there are a few behavior changes here.
* Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
* SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
* SkFontMgr_New_CoreText takes a CTFontCollectionRef.
Change-Id: Iaf58a0371667f266ada20c918941fab6bc27d9df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
My experience porting the old opts over to the current SKX opts setup
was so bad that I don't want to try any more, and think it's probably
safer to port the SKX code to the old setup.
Need to hook up dependents (Chromium and Google3 I think) before we can
move the actual SXK opts code over.
Change-Id: Ibb8bc4a083cb104cd39f27cbfbc16e9eedd9bd46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294495
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
We are updating FPs to receive their input via a child FP where
possible, instead of relying on the input color.
This CL also adds a GM test for SwizzleOutput, since this did not appear
to be covered by existing unit tests.
Change-Id: I3d8176395bb42eab7ff471c9137597402b5b3a69
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293884
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Move SkFontHost_mac.cpp into an 'optional' like the other fontmgr build
rules. This allows building with other fontmgrs on Mac and makes the lib
dependencies explicit. In the future this helps with splitting the out
the default factory.
Change-Id: Iecef9e428acb69f89b54afa00b4e779f5858c61a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294076
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit 08a39c2b5f.
Reason for revert: Flutter roll?
Original change's description:
> apply SkOpts_skx approach to SkOpts_hsw
>
> Very slightly different build flags, switching from -march=haswell to
> -mavx2 -mfma -mf16c, but there are no diffs.
>
> Left some TODOs for the next ones, but _hsw being so common I figured
> I'd do this one stand alone and make sure it shakes down before doing
> the rest.
>
> clang-cl (but not clang) barfs when we've got a lambda using an AVX
> intrinsic inside a templated static helper function. Luckily they're
> all non-type template parameters, so we can just pass them as normal
> arguments, and it'll optimize the same as the templated code anyway.
>
> This was weird, but since we're covering almost all the SkFoo_opts.h
> headers with HSW here, I don't anticipate this being a problem in the
> future. (And I'm sure I'll never look back on this statement as naive.)
>
> Change-Id: I2f84db356cafa5e158bcc3724fb1c3f58aca7f1e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293599
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,herb@google.com,reed@google.com
Change-Id: If3a75158d6e017f180d9e38d9ba296a0d72e1384
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294281
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 4272d071d9.
Reason for revert: Flutter roll?
Original change's description:
> finish new-style opts
>
> Nothing super interesting.
>
> SkOpts_crc32.cpp is worth looking at
> as the only non-x86 code.
>
> I marked a few places I think we can
> trim to save code size as follow ups.
>
> Change-Id: Ifdc8f4d1495ff56df5d2cdde39f7e9a6ac2b1277
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294019
> Auto-Submit: Mike Klein <mtklein@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
TBR=mtklein@google.com,herb@google.com
Change-Id: Idbb914788489bdc5941f7fed23bf26d35d90dca4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294280
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I can find no references to SkAtlasTextTarget in AOSP or in Chromium.
With google3 CL/314226466 there are no more uses in Google3.
Change-Id: I60b5f06fc17c0e4f8d008886c96645475e3d48e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293839
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Nothing super interesting.
SkOpts_crc32.cpp is worth looking at
as the only non-x86 code.
I marked a few places I think we can
trim to save code size as follow ups.
Change-Id: Ifdc8f4d1495ff56df5d2cdde39f7e9a6ac2b1277
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294019
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Very slightly different build flags, switching from -march=haswell to
-mavx2 -mfma -mf16c, but there are no diffs.
Left some TODOs for the next ones, but _hsw being so common I figured
I'd do this one stand alone and make sure it shakes down before doing
the rest.
clang-cl (but not clang) barfs when we've got a lambda using an AVX
intrinsic inside a templated static helper function. Luckily they're
all non-type template parameters, so we can just pass them as normal
arguments, and it'll optimize the same as the templated code anyway.
This was weird, but since we're covering almost all the SkFoo_opts.h
headers with HSW here, I don't anticipate this being a problem in the
future. (And I'm sure I'll never look back on this statement as naive.)
Change-Id: I2f84db356cafa5e158bcc3724fb1c3f58aca7f1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293599
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Enable shaper and paragraph tests to run on Android builds.
Change-Id: Ib1685653ac4432a04998aed56dc76b9020253e75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293244
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: Ifb47c6be05bffad4a42030f4375dcbe0fe313ae0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293656
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I was hoping this might fix the issues I'm seeing in the dependent CL.
It doesn't, but it's probably worth rolling every few months anyway.
Change-Id: I6d748d9e1a5bf908df78e989a624f2dccb1bd189
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293604
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This makes it easier to work with SkSL files when using an IDE.
Change-Id: I30665478a9cde63b4c9ba7e5a9948e9647f7ef81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293571
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:10178
These functions can be performed generically using SkRasterPipeline
or skcms. Further, the reason we used a function pointer anyway was
so that we could call the same function on each row separately. But
libwebp's API doesn't let us do a single row at a time anyway.
Simplify this method by using readPixels when necessary and
skipping conversion entirely when possible.
Add support for encoding from unpremul 4444. It is simpler to support
it, and it's not obvious why we didn't support it before.
Keep the behavior of not supporting A8, and apply the same to the
other alpha-only formats. Note that we could support encoding such an
image to alpha, r=0, g=0, b=0, but I'd rather leave adding that
feature to a separate change, which enables it for all encoders (and
accounts for the internal use of PNGs as a round-trip for
kAlpha_8_SkColorType).
Add GMs to test the newly supported SkColorTypes.
Change-Id: I4d86c5621792fb6dc3cb68b736a1eb35d577e3a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292962
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is an Android request for our public headers,
much like warning about unused parameters. See bug.
In general I've made two kinds of source changes:
1) more commonly, explicitly cast to the type which
is being implicitly cast to at head;
2) less commonly, flip signedness of a value we're
storing to match how it's used more smoothly.
Much of this is self inflicted inconsistent use of size_t, unsigned,
int, int32_t, uint32_t, etc. SkTArray is particularly tricky because
of its std::vector half-compatibility. E.g. resize() takes size_t,
but operator[] takes int. ¯\_(ツ)_/¯
Bug: skia:9847
Change-Id: I64626a529e1662b3d3020bc03d477fc641eda544
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293436
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
* Adds a base class for the ring buffer (to be used by Metal as well),
which tracks the current available space. APIs will need to
implement creation of the buffer in the subclass.
* The API implementation will need to store SubmitData on command buffer
submit, and then pass it to finishSubmit when the command buffer
finishes.
Change-Id: I4cc5e4a72d259ee9d15dac0e964819d4562da3d7
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291936
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Prelude to adding situational optimizations
Change-Id: Ie7994a87380ba6135398c9a1d4b26cea6bf32fa8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292972
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is will be the main struct used to synchronize changes of certain
texture/image between clients and Skia. With this change we
implement support for the Vulkan shared state as POC.
Bug: skia:10254
Change-Id: I10543357635c347838b193874e4da4496a0dcf06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292311
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I6af3673a9dedf0a5acfbd588bfbbb447b5c68013
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292576
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>