This does not actually add any additional functionality to the generators.
Once this lands I will enable the generators one at a time to more easily
monitor the effects of each one.
Bug: skia:
Change-Id: I382a1acfaebcbf9ad44c9873b87cdbbe02a13602
Reviewed-on: https://skia-review.googlesource.com/57083
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.
Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Also add a presubmit so they don't get added to source code.
Change-Id: I6a85c6a934b1068a63646a0dcc0d3a08baa96ced
Reviewed-on: https://skia-review.googlesource.com/57110
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: skia:6173
Change-Id: I21042d484d9a7b3eee04aa3301d9793d00ad6908
Reviewed-on: https://skia-review.googlesource.com/48183
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 49f1f34438.
Reason for revert: broke win-chrome
../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): error C2228: left of '.release' must have class/struct/union
../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: type is 'SkStreamAsset *'
../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: did you intend to use '->' instead?
Original change's description:
> use unique_ptr for stream api
>
> Bug: skia:6888
> Change-Id: I3459b4913982a7cae1c0061697c82cc65ad9a2d8
> Reviewed-on: https://skia-review.googlesource.com/26740
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=mtklein@chromium.org,mtklein@google.com,bungeman@google.com,reed@google.com
Change-Id: Ic1e4af557317abd06b7f6b7f5056645df7e469f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6888
Reviewed-on: https://skia-review.googlesource.com/47440
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Bug: skia:6888
Change-Id: I3459b4913982a7cae1c0061697c82cc65ad9a2d8
Reviewed-on: https://skia-review.googlesource.com/26740
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
created new file src/core/SkColorData.h for
internal consumption. Note that many of the
functions there are unused as well.
Bug: skia: 6898
R: reed@google.com
Change-Id: I25bfd5a9c21f53558c4ca65a77eb5d322d897c6d
Reviewed-on: https://skia-review.googlesource.com/46848
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
There is a perf regression (mainly on the Nexus5) for the https://skia-review.googlesource.com/c/skia/+/46200 (Add method to iterate over a GrOp's GrSurfaceProxies)
This is one candidate.
Change-Id: I995d3a88bad2a914f24b49512abbf01aeaf579c8
Reviewed-on: https://skia-review.googlesource.com/46586
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: Ib6a289553ecd15c722599b7dc0d347a7800801cb
Reviewed-on: https://skia-review.googlesource.com/46284
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The extra generality of having a std::function is for MDB reordering. In the current MDB reordering world there is one pass through the surfaceProxies at creation time and a second pass after flush to create the usage intervals.
Change-Id: I3f548417eddc1dad7503d919241301e404255ffe
Reviewed-on: https://skia-review.googlesource.com/46200
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
All of the published coefficients assume math is being done on bytes, and
that 128 is the encoding of 0 (in the biased Cb and Cr values). When
sampling an A8 texture, though, GPUs typically decode as byte/255. Thus,
128 ends up slightly larger than 0.5. To fix this, just adjust the bias
terms to be scaled by 128/255, rather than 0.5.
I also changed some of the other coefficients to be higher precision,
based on the values in ITU-T T.871.
This originally surfaced as a Chromium bug where an all-black JPG decoded
to (1/255, 0, 1/255) on GPU. I've added a GM that encodes a color cube to
JPG, then draws from the encoded data. GPU and CPU (libjpeg) still
disagree in many cases, but the newer version performs much better
(diffing gl and 8888 configs):
Previously: 95.2% of pixels differ, max diff of 2, avg diff of 1
Now : 65.4% of pixels differ, max diff of 1, avg diff of 0
Bug: skia:7038 chromium:763605
Change-Id: I4801db9f6e2fc4d4109eb5e27c9499f214084d38
Reviewed-on: https://skia-review.googlesource.com/45842
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Just let the general three-stop shader handle all three-stop gradients.
Also, pre-compute values derived from the middle stop to remove all
division (and actually convert computation to FMA form).
Bug: skia:
Change-Id: I1aae069d929d1a942c38aa2e2f3fd5fb7d9b2f10
Reviewed-on: https://skia-review.googlesource.com/45800
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This fixes an Android rendering bug where radial gradients were being used
for "clipping" (via DstIn blend mode). The gradient stops were placed at
(0, 0.999, 1), which caused our table quantization to drop the last stop.
kThree_ColorType now means "0, any t, 1". The old (special-case)
kThree_ColorType is now called kSymmetricThree_ColorType.
Bug: skia:
Change-Id: I96a0b9e679f2d537862a3e097f7e3446474914ea
Reviewed-on: https://skia-review.googlesource.com/45260
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic.
Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3
Reviewed-on: https://skia-review.googlesource.com/43200
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:
Change-Id: I35bc08ad72fb94d8e47fe342d314c4496b954226
Reviewed-on: https://skia-review.googlesource.com/40881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This was created by looking at warnings produced by clang's
-Wzero-as-null-pointer-constant. This updates most issues in
Skia code. However, there are places where GL and Vulkan want
pointer values which are explicitly 0, external headers which
use NULL directly, and possibly more uses in un-compiled
sources (for other platforms).
Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345
Reviewed-on: https://skia-review.googlesource.com/39521
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Set doConsumeDegenerates to false when calling SkPath::Iter::next() for
all paths which are not in screen space. These lines are not degenerate
for world space paths.
Note: this change fixes only GrTessellatingPathRenderer and
GrDefaultPathRenderer. GrMSAAPathRenderer still exhibits the bug.
Bug: skia:6987
Change-Id: Ie3d494703211925c77052c68513948484e341486
Reviewed-on: https://skia-review.googlesource.com/37522
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This reverts commit 267641a90c.
Reason for revert: Seems to be turning the bots red
Original change's description:
> Fix artifacts on tiny stroked paths scaled up a lot.
>
> Set doConsumeDegenerates to false when calling SkPath::Iter::next() for
> all paths which are not in screen space. These lines are not degenerate
> for world space paths.
>
> Bug: skia:6987
> Change-Id: I411faf594bf8a15891bfff08691e86679b7741ac
> Reviewed-on: https://skia-review.googlesource.com/36881
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Stephen White <senorblanco@chromium.org>
TBR=bsalomon@google.com,senorblanco@chromium.org
Change-Id: I0d5a14670126ab3e0d99083a500ec8d3d0ef9961
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6987
Reviewed-on: https://skia-review.googlesource.com/37440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Set doConsumeDegenerates to false when calling SkPath::Iter::next() for
all paths which are not in screen space. These lines are not degenerate
for world space paths.
Bug: skia:6987
Change-Id: I411faf594bf8a15891bfff08691e86679b7741ac
Reviewed-on: https://skia-review.googlesource.com/36881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically
changes uses of SkFAIL to SK_ABORT in preparation for its removal. The
related sk_throw macro will be changed independently, due to needing to
actually clean up its users.
Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb
Reviewed-on: https://skia-review.googlesource.com/35284
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
BUG=chromium:745290
Change-Id: I78cabf988115598e14a7ce39faf96e3a697a1a8f
Reviewed-on: https://skia-review.googlesource.com/34382
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Also makes paint clones use cloned fragment processors.
Change-Id: I60efcfc6a46a4f8430a72f4d1ec79c7d99fbe593
Reviewed-on: https://skia-review.googlesource.com/33084
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
rm gm that appears to have been there solely for pdf, but we don't use
it for that now.
Bug: skia:
Change-Id: I3cf88db923c2445b7c95dda14da679a594117643
Reviewed-on: https://skia-review.googlesource.com/31760
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Without this fix, the newly added GM draws incorrectly.
Change-Id: Ic159ab3201c10369ad5f8151186245d8d076cc25
Reviewed-on: https://skia-review.googlesource.com/30484
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Expand the existing GM with a column "stretching" the [0,1] color stop
domain onto something much wider than [0,360].
Change-Id: Ica4c4b40c2cad20fec12b7d2871354e119a7bcf2
Reviewed-on: https://skia-review.googlesource.com/29880
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Expand the sweep gradient definition to include a color stop angular range ([0, 360] by default).
Color stop positions in [0,1] are mapped to this range, and drawing outside is controlled by a
tile mode param.
This is closer to the CSS gradients spec and allows us to use fewer color stops in Blink conic
gradients.
Impl-wise, the remapping is effected after t calculation, and before tiling.
Change-Id: I5d71be01d134404d6eb9d7e2a904ec636b39f855
Reviewed-on: https://skia-review.googlesource.com/27704
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
https://skia-review.googlesource.com/c/26363 (Remove origin field from GrSurface) is
already too large. This pulls some of the cosmetic changes out for separate review.
Change-Id: I1d8b95522144b2f4cbd916ef38faa3dde6f78087
Reviewed-on: https://skia-review.googlesource.com/27840
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I71cf04b12be95a54b7fb47d048ba1f8672ed9a8f
Reviewed-on: https://skia-review.googlesource.com/27760
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Our new srgb_color_filter (in gm/srgb_color_filter.cpp) is awfully
similar to the existing srgb_colorfilter (in gm/srgb.cpp).
Let's rename the new one.
Change-Id: I8c7816c377cc4342388be51632353882a1bc5241
Reviewed-on: https://skia-review.googlesource.com/26525
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>