This reverts commit e58831cd95.
Reason for revert: looks like breaking a few build bots
Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I07848c1bf8992925c9498e916744d0840355a077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421917
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Change-Id: Ia00f88d00c6010d87c775acd32493673020d5ae8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420577
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This CL fixes up many existing format-specifier violations in Skia.
Note that GCC has a warning for formatting nothing, so existing calls to
`SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
These were apparently meant to be used as a place to set a breakpoint.
Some of our clients also use SkDebug with bad format specifiers, so this
check is currently only enabled when SKIA_IMPLEMENTATION is true.
Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Previously, FT_Face were cached and owned by a global linked list in
which they were retained only if a reference was kept to it.
SkScalerContext_FreeType would keep a reference, but SkTypeface_FreeType
would not. This leads to situations where the FT_Face may be created and
destroyed on most method calls into SkTypeface_FreeType if a
corresponding SkScalerContext were not also created.
One of the reasons for this design was to avoid forcing the creation of
FT_Face on SkTypeface_FreeType creation. This allows for many
SkTypefaces to be created (like creating one for every system font) but
not actually creating the FT_Faces until they are actually used.
This change moves the ownership of FT_Face to SkTypeface_FreeType. The
linked list is removed. As before the FT_Face is created on demand, but
once created is now retained by SkTypeface_FreeType until it is
destroyed.
Bug: skia:12112
Change-Id: I36a2a88dfae1b1313c03060c38e17f0782f02276
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420578
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: Ib4f5c5f3e0918ef5cc54aac8341e3958fbf6647d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421516
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Hypothesis that the gen and obj folders not being deleted led to some
failed builds if there were conflicting object files.
Change-Id: I63df08092bf7d325c0f008d429dd13981f0a67a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421496
Reviewed-by: Brian Osman <brianosman@google.com>
The previous version accidentally retrieved all values from
the in memory glyph cache because it was always measuring
the range 1-300. This changes the glyphID to always be an
increasing number, which avoids the cache hits.
There is now some differences between the font types:
- ttf: ~4ms
- woff: ~160ms
- woff2: ~230ms
The high numbers in the woff categories are expected to be
fixed by https://skia-review.googlesource.com/c/skia/+/420578
Bug: skia:12112
Change-Id: I52f6f7baf27fc28b99ac65a067142281918d7298
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421324
Reviewed-by: Kevin Lubick <kjlubick@google.com>
It is no longer used. The example runner uses the registry and fiddle
checks for the '#if'.
Change-Id: I1213702e89cc4927108eeeabcc10501b30eab934
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205588
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Consolidate the common logic in a Gradient base class, and add
radial/conical/sweep factories.
Change-Id: Ife15ae78e7c6df48cfa67fe20054f9bd9a8a1e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420897
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
This reverts commit 3722d3195b.
Reason for revert: Disables msaa for paths
Original change's description:
> Remove all instances of incorrect coverage with DMSAA
>
> Here we pivot and handle DMSAA differently depending on platform:
>
> 1) Desktop GL and EXT_multisample_compatibility: Here it's easy to use
> all our existing coverage ops because we can just call
> glDisable(GL_MULTISAMPLE). So we only trigger MSAA for paths and
> use the coverage ops for everything else with MSAA disabled.
>
> 2) EXT_multisampled_render_to_to_texture (86% adoption on Android):
> The assumption here is that MSAA is almost free. So we just allow
> MSAA to be triggered often and don't worry about it.
>
> Devices that neither support #1 nor #2 just don't get DMSAA for now.
>
> Bug: skia:11396
> Change-Id: I53ad840216ea6d88ae69eece6f7a062f9e82dad7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421019
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com
Change-Id: If9b9cd25b93d5db2cc7f9c6cd4be783284587a37
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421416
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Here we pivot and handle DMSAA differently depending on platform:
1) Desktop GL and EXT_multisample_compatibility: Here it's easy to use
all our existing coverage ops because we can just call
glDisable(GL_MULTISAMPLE). So we only trigger MSAA for paths and
use the coverage ops for everything else with MSAA disabled.
2) EXT_multisampled_render_to_to_texture (86% adoption on Android):
The assumption here is that MSAA is almost free. So we just allow
MSAA to be triggered often and don't worry about it.
Devices that neither support #1 nor #2 just don't get DMSAA for now.
Bug: skia:11396
Change-Id: I53ad840216ea6d88ae69eece6f7a062f9e82dad7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421019
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The GpuTess bot is enough to keep this codepath tested.
Bug: skia:10419
Change-Id: I596e141ea3af26375443f0717d6b9413beb5959b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421216
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Rewrites tessellation atlases as normal render tasks instead of
"onFlush" tasks. These tasks get inserted into the DAG upfront, lay
out their atlases as dependent tasks get built and reference them, and
finally add their ops to render themselves during onMakeClosed. Doing it
this way allows us to pause the flush and re-render the atlas whenever
it runs out of room.
Bug: b/188794626
Bug: chromium:928984
Change-Id: Id59a5527924c63d5ff7c5bce46a88368e79fc3ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420556
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
The tessellation atlas task will need a recording context in order to
record its ops during onMakeClosed.
Bug: b/188794626
Bug: chromium:928984
Change-Id: Ie8719a514899a5748c52ae78a6ecd997b1439ab7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420879
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The tessellation atlas needs this to call visitProxies.
Bug: b/188794626
Bug: chromium:928984
Change-Id: I5bfb2559abcaf5c7602393e96adb846bcfbce971
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420878
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: I16301e6fb7193ba67b9fea292f931fda480c8ac3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420956
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I87defa005fab8b1be92a700bf38c91b92c0ab8a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420616
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: chromium:1203652
Change-Id: Id83ac81c40eda2653e97a7c8ae9326c273f0f00b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420537
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:11844
Change-Id: I8a5fdd6b074ba070022b6da3e31d8642b2f35181
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420896
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I015cc2401c9f4a87fa7a02a93890bcf0a6704a91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420901
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This reverts commit 3366efd581.
Reason for revert: Perf regression root cause fixed.
Original change's description:
> Revert "Replace GrColorMatrixFragmentProcessor with a runtime FP"
>
> Triggered a perf regression, somehow.
>
> This reverts commit 311010405e.
>
> Change-Id: Ic468d34c8ccd28aaaed2d3028ce9559115860844
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420816
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
# Not skipping CQ checks because this is a reland.
Change-Id: Iea53fba22ef08b0ed97220b9cd2a9a0d054ecf57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420900
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We were checking the flags for each uniform, but never advancing the
uniform iterator. As a result, for each uniform that was specialized,
we'd just fold in another copy of the *first* uniform's data.
This led to a nasty performance regression (extra shader compiles) in
certain scenarios. (And it was a correctness issue, as well).
Change-Id: Iaac878a7b9eb37e98815f56dc55a58d1f8e85c22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420820
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This unifies various chunks of error handling code and makes the DSL
more gracefully handle failed object construction.
Change-Id: I4edc581c9eba276ce2ee2a17125ea7bd6057134a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420237
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Adding ovals reveals the clipping failure. The "actual" results with the
oval clips are currently incorrect.
Bug: skia:11837
Change-Id: I0789d5f758457425250ff6cecc0a5bb44f6e82ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420637
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Triggered a perf regression, somehow.
This reverts commit 311010405e.
Change-Id: Ic468d34c8ccd28aaaed2d3028ce9559115860844
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420816
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Id1c0375d78c7b481e60aeeda53e3f89acf543c9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420636
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Change-Id: I9dcfc0dd559fe1596019f0d8051f665f69a6960d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419163
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This array isn't used anywhere outside of a single function; we don't
need it to exist at global scope.
Change-Id: I66d65dcb92d5c7bbcfbd067ef6b6908e4dfd3dd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420617
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This involves a significant number of overloads, as optionals can be
compared against other optionals, or nullopt, or a value; either side
can mix and match as desired.
Change-Id: I26b8420e417300d32569fc76a55bcfd8e01eb322
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420576
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:11837
Change-Id: I76e1cfdf7d2f7ca649612c8155571425684cf2d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420236
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: I07c7b3e3b55be8b0340a012e965bd23b92d27e1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420218
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This reverts commit 8cb7c3be75.
Just leave Win7 Golo tasks on python 2.
Change-Id: Idf1d6cc6d303107afd8e74cdec94e7a9ec91399e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416316
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>