SkTypeface_FreeType uses SkFontData and makeFontData as a way to lazily
create FT_Face objects. Other SkTypeface types do not need this, so
remove it.
Change-Id: I2f2f829deac9f7f6aac06f9ce84f856922d8a861
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299443
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: I6f4409e9e8c6d4a6d71bc41e57dce7417d7788f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302440
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
I spent a little time working on adding the --dylib JIT
mode to Windows where we'd shell out to Clang to make a .dll,
but then I remembered this VTune JIT API.
That dylib approach is nice for working with a wide range
of tools (perf, Instruments, gdb, etc.), but when your only
need is Vtune, this API is actually the best option. You
get your profiler aware of your JIT'd code with way less
overhead than the shell-then-dlopen approach.
If we need to expand to more tools I'll go make the dylib
mode work, but I think this is good enough to make me happy
on Windows for now.
This should look really similar to
https://skia-review.googlesource.com/c/skia/+/255124.
Change-Id: I9e283cdf9bdfeb11c647a2315a7916dc68ef73c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301935
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This CL is working towards replacing GrContext with the GrDirectContext/
GrRecordingContext pair.
Change-Id: Id4488e1280d76a16c37d58bd8d29fb7f8dde6b1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301940
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The major improvement is that now the fuzzer is able to execute
the sksl code (before it just compiled it). The fuzzer will
reserve 256 bytes for providing uniforms to the shader;
meanwhile, the fuzzer will read the remaining bytes as sksl code
to create SkRuntimeEffect. It then creates a shader and executes
it by painting the shader on a canvas.
The code was tested locally with afl-fuzz, and the execution
speed was around 700/sec.
An alternative implementation would have been using Fuzz.h to
read bytes; I decided to go with sk_sp<SkData> since it has a
comparable format to other binary fuzzer and meets all the
functionality in this fuzzer.
For future changes, there are 2 important improvements to the
implementation:
1) Current shader does not have children shaders; thus,
makeShader() will fail if the SkSL ever tries to use an 'in shader'.
As pointed out in patchset 11, after creating the runtime effect,
effect->children().count() will tell you how many children it's
expecting (how many 'in shader' variables were declared). When you
call makeShader(), the second and third arguments are a
(C-style) array of shader pointers, and
a count (which must match children().count()).
Some helpful examples can be SkRTShader::CreateProc in
SkRuntimeEffect.cpp, make_fuzz_shader in FuzzCanvas.cpp.
2)
In this fuzzer, after creating the paint from a shader, the paint
can be drawn on either GPU canvas or CPU, so a possible way is to
use SkSurface::MakeRenderTarget to create GPU canvas and use a byte
to determine which canvas it will be drawn on.
Change-Id: Ib0385edd0f5ec2f23744aa517135a6955c53ba38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300618
Commit-Queue: Zepeng Hu <zepenghu@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Previously, doing an official build of Skia with Vulkan and particles
enabled would succeed in compiling all of skia.lib, then fail to find
Vulkan headers for two particle .cpp files (that reach GrVkVulkan.h
via SkSL headers).
Bug: skia:10469
Change-Id: Ia5bdb7df25e7259e43cef3e6ff9719a8c8452022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301002
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ie57fea197778f4b17ca08d2e3022b77f783de927
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298616
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
GM was updated in:
https://skia-review.googlesource.com/c/skia/+/300172 (Make GM::onGpuSetup take a GrDirectContext)
This CL updates: skpbench, nanobench, and some testing infrastructure.
Only minor changes were made to the unit tests as they will be updated
en masse in a follow up cl.
Change-Id: Ieffc98865d4c9fc73e292d3c807ed4ae2081745a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300220
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit c61e35dbc6.
Reason for revert: Breaking builds
Original change's description:
> Switch GN defs on Mac and iOS to use frameworks instead of libs.
>
> GN will be removing support for frameworks in the libs variable, so
> might as well get ahead of it.
>
> Change-Id: I67b118457721975ac2408308438d71172be66592
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300181
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,jvanverth@google.com
Change-Id: I7b81a92a67181e08ee57bcb184768794281cd37a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300228
Reviewed-by: Jim Van Verth <jvanverth@google.com>
GN will be removing support for frameworks in the libs variable, so
might as well get ahead of it.
Change-Id: I67b118457721975ac2408308438d71172be66592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300181
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Also added various sk_app headers to BUILD.gn for ease of access.
Change-Id: I99646c8f3906e00ca95f8e583319cb9b873c66ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300037
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I26c7b6030bb6be7e5005a05c593d1de40dda88db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299859
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
In 75626e4b1a "Regularize selection of fontmgr." a clever change was
made which allowed the skia_fontmgr_factory to be specified as a source
file to allow the user to specify which factory to use. Unfortunately
this implies that the Skia target which uses this source does not know
which other targets (like fontmgr targets) to depend on. A factory
target must generally depend on the target which provides the widget the
factory makes.
This change puts all the current factories into targets of their own so
that they can depend on whatever they need. The skia_fontmgr_factory is
now the name of a target which is the sole public member of the
:fontmgr_factory target. Users can now specify a particular fontmgr
target to build into Skia as the default instead of simply specifying a
source file.
The fontmgr_fontconfig target now also properly publicly depends on the
fontconfig target since it has a public header which includes
fontconfig.h.
Bug: b/160133836
Change-Id: I212d842b8e07c4e99ab53e32310642d18eeb7cb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299677
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit 1caf3789f8.
Makes the image GMs detect an abandoned context just like the surface
GMs.
Bug: skia:10431
Change-Id: I56a3631a75e6b0383f96a73f461cfa314ee29afa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299379
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 7ac9b5fdb6.
Reason for revert: abandon context bots breaking
Original change's description:
> Add async rescale and read APIs to SkImage.
>
> These function the same as the already existing
> SkSurface APIs.
>
> Bug: skia:10431
>
> Change-Id: I4f1e842d8d4b72ee27bae5f8a85e499e130d420c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299281
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I351795274245fc9f553cd210d82178f497f22660
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10431
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
These function the same as the already existing
SkSurface APIs.
Bug: skia:10431
Change-Id: I4f1e842d8d4b72ee27bae5f8a85e499e130d420c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299281
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I09b8f8bb95dac443b64d85340db12f59f8977654
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299143
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Try to merge change 296417 again with new changes to skottie BUILD in google3
This time, the autoroller shouldn't get upset.
move setupSkiaLibraryBuild call to new lib module
Move shared skottie files we intend to distribute into a library module
Change-Id: I3a86ec611cb38e1940033b60d607fabe6a4b24e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297842
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
This is a reland of c34344989a
Original change's description:
> Allow building with Wuffs v0.3, not just v0.2
>
> This is step 1 of a multi-step, multi-repository transition:
>
> 1. Let Skia work with either Wuffs v0.3 or v0.2. This repository
> defaults to v0.3 but other repositories' defaults remain at v0.2.
> 2. Update users' Skia version (automatic if they update regularly).
> 3. Update users' Wuffs version and opt them in to Skia-uses-Wuffs-v0.3.
> 4. Flip Skia choosing Wuffs version 0.3 from opt-in to opt-out.
> 5. Remove the option for Skia to work wih Wuffs v0.2.
>
> Change-Id: Ie5cf238057060f2a40cc7c0070d6e2a076943e2b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295976
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
Change-Id: Iafc4acf69c3d61d512ffde25cc7e405092e384c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296758
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This reverts commit dff4d584ed.
Reason for revert: breaking the google3 roll
Change-Id: I0e26c77e9bad0f48bc726d3b63a97d5aa7fa51ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297190
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Previously, all backends allowed the SkSL to be edited, and GL allowed
GLSL to be edited. Now any backend's source can be seen, and they can
all be edited (other than SPIR-V). Tested with HLSL and SPIRV. I don't
have a Mac available, but MSL should work, too.
Change-Id: Ia2a11bb5922dd49a5f25840e48384e0246a28b69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296856
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit c34344989a.
Reason for revert: breaking the windows msvc compile bot as well as the flutter canary
Original change's description:
> Allow building with Wuffs v0.3, not just v0.2
>
> This is step 1 of a multi-step, multi-repository transition:
>
> 1. Let Skia work with either Wuffs v0.3 or v0.2. This repository
> defaults to v0.3 but other repositories' defaults remain at v0.2.
> 2. Update users' Skia version (automatic if they update regularly).
> 3. Update users' Wuffs version and opt them in to Skia-uses-Wuffs-v0.3.
> 4. Flip Skia choosing Wuffs version 0.3 from opt-in to opt-out.
> 5. Remove the option for Skia to work wih Wuffs v0.2.
>
> Change-Id: Ie5cf238057060f2a40cc7c0070d6e2a076943e2b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295976
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
TBR=scroggo@google.com,nigeltao@google.com
Change-Id: I2c8a44962eb9b136b199dba5f52a860d756a0aa1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296441
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
This is step 1 of a multi-step, multi-repository transition:
1. Let Skia work with either Wuffs v0.3 or v0.2. This repository
defaults to v0.3 but other repositories' defaults remain at v0.2.
2. Update users' Skia version (automatic if they update regularly).
3. Update users' Wuffs version and opt them in to Skia-uses-Wuffs-v0.3.
4. Flip Skia choosing Wuffs version 0.3 from opt-in to opt-out.
5. Remove the option for Skia to work wih Wuffs v0.2.
Change-Id: Ie5cf238057060f2a40cc7c0070d6e2a076943e2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295976
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This CL avoids the JNI complexity of reading the Java InputStream in
C++. Instead, the stream is read into memory (or mmap'd) in Java and
the resulting ByteBuffer is passed to the native code to be wrapped
in a SkData object.
Change-Id: Iba4e41999da03481188434ddfbbff2d7bd741edd
Bug: skia:10310
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295820
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Reviewed-by: John Stiles <johnstiles@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>
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>
It occurred to me that we try to guarantee this but don't test it.
Luckily this public_headers_warnings_check target is a perfect spot.
Change-Id: Ie06732706ee80da798a9c3bda215d5a65f02b5bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295856
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
When a fontmgr is included in the Skia build any headers it provides
(like through public) are also public Skia headers.
Change-Id: Ibf18819a956e626a925f83a4f8ebab90978ff9a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295818
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>
The aim here is to unify VkTestHelper with the VkYcbcrSamplerHelper's context creation code. AFAICT they have a ~90% overlap.
Change-Id: Iba8d1482b8c1d7164682f90e19d2183d8cfe45d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295583
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@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>
The intent is to reuse this helper to create a YCbCr GM.
Change-Id: I4d6af42745dbf845e28753bec670ad4a75c393b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295443
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
"Artboards" are top-level Rive containers (similar to AE compositions),
holding the scene graphics and related animations.
Artboard properties:
- name
- width/height (size)
- translation (position)
- origin (anchor point for transforms?)
- (background) color
- clip contents flag
Plumb artboard parsing + background rendering, and hook into viewer.
TBR=
Change-Id: Ib188245ce41a76197cf9e0937689adf8243826d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295244
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@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 file is now just a stub. Remove it.
Change-Id: I3156c1f2218ebb69a52558e0d139309e1c108b74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294916
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit fee069880d.
Reason for revert: google3 roller is glitchy today, try again later
Original change's description:
> Reland "Move JavaInputStreamAdaptor into third_party and add a LICENSE file."
>
> This is a reland of eac2d518bd
>
> The aosp folder was added to the google3 roller include_patterns list:
> http://cl/315274044
>
> Original change's description:
> > Move JavaInputStreamAdaptor into third_party and add a LICENSE file.
> >
> > Change-Id: I723b15fbcf3343559fb5a3fe3015cf3db96e2841
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294696
> > Reviewed-by: Heather Miller <hcm@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Change-Id: I27ac16c3ac05fbee1473af886379e95492302d50
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295000
> Reviewed-by: Heather Miller <hcm@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=djsollen@google.com,hcm@google.com,johnstiles@google.com
Change-Id: I8c620c47a8c6c7f3e081fe786a17396a40236105
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295081
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is a reland of eac2d518bd
The aosp folder was added to the google3 roller include_patterns list:
http://cl/315274044
Original change's description:
> Move JavaInputStreamAdaptor into third_party and add a LICENSE file.
>
> Change-Id: I723b15fbcf3343559fb5a3fe3015cf3db96e2841
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294696
> Reviewed-by: Heather Miller <hcm@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I27ac16c3ac05fbee1473af886379e95492302d50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295000
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@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
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>