Also:
* clean up PolyUtils checks to be correct and consistent.
* fix some bugs discovered by the unit tests.
Bug: skia:
Change-Id: I1a8e07d13cb44fecc67344154dc1002f3f910f5d
Reviewed-on: https://skia-review.googlesource.com/138592
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Use this to fill concave shadows.
Bug: skia:7971
Change-Id: I63dc1ed845f9fa3fcd86f1ad13b03da23cae0313
Reviewed-on: https://skia-review.googlesource.com/135200
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 059a9ab4bc.
Reason for revert: Fix landed in Fuchsia
Original change's description:
> Revert "Make GrVkBackendContext no longer derive from SkRefCnt."
>
> This reverts commit 93ae233773.
>
> Reason for revert: <INSERT REASONING HERE>
>
> Original change's description:
> > Make GrVkBackendContext no longer derive from SkRefCnt.
> >
> > Also moves the helper Create functions to VkTestUtils since no clients
> > are using them anymore.
> >
> > Bug: skia:
> > Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> > Reviewed-on: https://skia-review.googlesource.com/135323
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:
> Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
> Reviewed-on: https://skia-review.googlesource.com/137903
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: Ia4b7c0bb2c7b5dba809d85c69f0b41b473140526
Reviewed-on: https://skia-review.googlesource.com/138181
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 93ae233773.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Make GrVkBackendContext no longer derive from SkRefCnt.
>
> Also moves the helper Create functions to VkTestUtils since no clients
> are using them anymore.
>
> Bug: skia:
> Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> Reviewed-on: https://skia-review.googlesource.com/135323
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
Reviewed-on: https://skia-review.googlesource.com/137903
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 45c9dab4c3.
Reason for revert: fucshia uses GrVkBackendContext. Need to revert earlier changes
Original change's description:
> Let client pass in full extension to GrVkBackendContext.
>
> Bug: skia:
> Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
> Reviewed-on: https://skia-review.googlesource.com/131880
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
Change-Id: I1a765ff406c83cb234c3614b804fbed677d5a382
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/137901
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:
Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
Reviewed-on: https://skia-review.googlesource.com/131880
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Check that the re-generation could actually run ninja.
Specify the gn_deps by absolute path names.
Depend on the gn_to_cmake.py generator.
Change-Id: I5f93031d35f0b239b899fe1716fb1f6a4c67f77e
Reviewed-on: https://skia-review.googlesource.com/137397
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Also moves the helper Create functions to VkTestUtils since no clients
are using them anymore.
Bug: skia:
Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
Reviewed-on: https://skia-review.googlesource.com/135323
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:
Change-Id: I305ca837d5ed35df4b519e7283201f0a0f87b1c3
Reviewed-on: https://skia-review.googlesource.com/136636
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
Create FontMgrFontConfigTest.cpp file to test the above function.
Change-Id: I7716355f702af3d6f25574305914f0b82a4147ce
Reviewed-on: https://skia-review.googlesource.com/137133
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: Idad3c8b6961bb617afedb8e353060b9044edaee3
Reviewed-on: https://skia-review.googlesource.com/136066
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Bug: skia:
Change-Id: I70be1dc6b29db9a9152e008293a7d0a276384011
Reviewed-on: https://skia-review.googlesource.com/135867
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Nothing public was including this and it was included unnecessarily in many places.
Change-Id: Iee960b3e67981ab41af7442cc43391f2f57eb551
Reviewed-on: https://skia-review.googlesource.com/135787
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
improved third_party template to include headers as system headers for non-Windows machines
Bug: skia:
Change-Id: Id2fa74fc31b49f9b07cc83e7f60477c7ab4f8d83
Reviewed-on: https://skia-review.googlesource.com/135450
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
It's a tiny, core-ish component -- might as well treat as such to
simplify dependencies.
Change-Id: I6f31ce2d151f9a629d88bfc7f15d64891d5150c0
Reviewed-on: https://skia-review.googlesource.com/135780
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
We expect .BAT and .EXE to be on PATHEXT. Also, although Python
CreateProcess doesn't honor PATHEXT, it will try .EXE. This allows most
commands to be platform-independent, and also resolves the issue with
the cpython package not including python.bat.
No-Tree-Checks: true
Docs-Preview: https://skia.org/?cl=135626
Bug: chromium:852581
Change-Id: Iab4189407df44ff4ad4d37da07ff52414229d397
Reviewed-on: https://skia-review.googlesource.com/135626
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Use std::swap instead. It does not appear that any external user
specializes SkTSwap, but some may still use it. This removes all use in
Skia so that SkTSwap can later be removed in a smaller CL. After that
the <utility> include can be removed from SkTypes.h.
Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753
Reviewed-on: https://skia-review.googlesource.com/135578
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: I0181ddfd7b75cd7ffb7002b7038a99419ea876f2
Reviewed-on: https://skia-review.googlesource.com/135562
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Convert all uses to GrColorSpaceXformEffect
Change-Id: Icc9d093a00450001c1b915db7a8676c9c66073b1
Reviewed-on: https://skia-review.googlesource.com/132090
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Implement caching as follows:
1) Instead of deleting the mainline ccpr atlas when finished, stash it
away from flush to flush.
2) On subsequent flushes, check the stashed atlas to see if we can
reuse any of its cachable paths. Copy reusable paths into 8-bit
literal coverage atlases and store them in the resource cache.
3) Recycle the stashed atlas texture for the remaining paths in the
flush.
Bug: skia:
Change-Id: I9b20fbea708646df1df3a5f9c044e2299706b989
Reviewed-on: https://skia-review.googlesource.com/134703
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Added some helper functions and put the booleans in a nested struct
(this is motivated by upcoming changes). Added a unit test of steps
against skcms, with round-tripping in both combinations.
Change-Id: Iea3d60cd52edb5259b5576b1422ed6f856cde815
Reviewed-on: https://skia-review.googlesource.com/134660
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
There is no good way to split the monster CL up. This breaks out
the GrContext plumbing but doesn't use it.
Change-Id: I90856d428d372bcec3f8821e6364667b367927d4
Reviewed-on: https://skia-review.googlesource.com/133382
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Module-related functionality is not required in dm/bench at this point.
Let's disable module deps flattening for now. As an immediate benefit
we can reduce the deps visibility for some internal skjson targets.
Bug: skia:8061
Change-Id: I0e09208964ca94b519121207ba1b6225059ef573
Reviewed-on: https://skia-review.googlesource.com/133822
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Lots of completely unused bits and bobs removed.
I've decided SK_SUPPORT_UNITTEST and its single use are not
very compelling.
tests/CPlusPlusEleven was the only user of Sk32ToBool(),
and no longer generally needed.
Change-Id: I3ee75560f1e1e1cf5ad89ee7df8d7694b5dffdb3
Reviewed-on: https://skia-review.googlesource.com/133622
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I98d0a2295c4853e0c07d84e781c8b0236561d307
Reviewed-on: https://skia-review.googlesource.com/133584
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
All GrOp-derived classes are going to have allocate their memory in a GrMemoryPool.
Change-Id: Ifa410b05eecd9b68c39dcc15dd4298d617204c13
Reviewed-on: https://skia-review.googlesource.com/132828
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 74b390d6b1.
Reason for revert: reverting to add patch for valgrind
Original change's description:
> Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device"
>
> This reverts commit 4225b3220e.
>
> Reason for revert: made valgrind unhappy.
>
> Original change's description:
> > Have draw(Text|PosText|PosTextH) use a single entry on the device
> >
> > Handle the positioning of drawText at the canvas layer. Simplify
> > the code by removing similar implementations.
> >
> > Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
> > Reviewed-on: https://skia-review.googlesource.com/127131
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
>
> TBR=jvanverth@google.com,bungeman@google.com,herb@google.com
>
> Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/132403
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com
Change-Id: I9bbb73aac447b51eb8215ac42331759fa4c9fa45
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/132580
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
No test tests, ok? Gotta draw the line somewhere.
Change-Id: I52284272f74a72a858910a143ecd4ad68fe3f1de
Reviewed-on: https://skia-review.googlesource.com/132410
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 4225b3220e.
Reason for revert: made valgrind unhappy.
Original change's description:
> Have draw(Text|PosText|PosTextH) use a single entry on the device
>
> Handle the positioning of drawText at the canvas layer. Simplify
> the code by removing similar implementations.
>
> Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
> Reviewed-on: https://skia-review.googlesource.com/127131
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=jvanverth@google.com,bungeman@google.com,herb@google.com
Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/132403
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Handle the positioning of drawText at the canvas layer. Simplify
the code by removing similar implementations.
Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
Reviewed-on: https://skia-review.googlesource.com/127131
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
When we updated the script that generates skia.h to look at GN
dependencies, we lost some headers. Here are two that we have
noticed are missing.
~/skia (headers|✚2…) $ git diff --no-index before.h out/gen/skia.h
diff --git a/before.h b/out/gen/skia.h
index 1d59746af1..915fffb293 100644
--- a/before.h
+++ b/out/gen/skia.h
@@ -38,6 +38,7 @@
#include "SkColorMatrix.h"
#include "SkColorMatrixFilter.h"
#include "SkColorPriv.h"
+#include "SkColorSpaceXform.h"
#include "SkCornerPathEffect.h"
#include "SkDashPathEffect.h"
#include "SkData.h"
@@ -65,6 +66,7 @@
#include "SkImageInfo.h"
#include "SkImageSource.h"
#include "SkInterpolator.h"
+#include "SkJpegEncoder.h"
#include "SkLayerDrawLooper.h"
#include "SkLightingImageFilter.h"
#include "SkLumaColorFilter.h"
Bug: skia:8039
Change-Id: If59a421a7852dc19123b851798b194a4666c59a3
Reviewed-on: https://skia-review.googlesource.com/132262
Auto-Submit: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I4bbf3e5e6d9d4e11e968a0bc88ce43444047a382
Reviewed-on: https://skia-review.googlesource.com/130903
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
I know SkRasterPipelineBlitter will add back offsets
to the mask pointer to make these fMaskPtr.pixels safe.
SkImageInfo wasn't making out-of-bounds pointers, but was moving
between two in-bounds pointers by subtracting large (negative)
size_t. Switching to explicit negate and add quiets this down.
Bug: chromium:836282
Change-Id: Ia65e380ec41dbfedce0659106830fbacb1a5cf4a
Reviewed-on: https://skia-review.googlesource.com/131147
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This doesn't show up in the solution explorer (so there are two entries
for "samples"), but they are both present, and all files are there.
Decorating the names in the explorer is going to be much harder, as we
have to change the actual filename of the generated vcxproj, as well as
the reference to those files in the sln. For now, this works well
enough.
Change-Id: I5b864268a4c56001edbf2c43dbe5563445d5435f
Reviewed-on: https://skia-review.googlesource.com/131580
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We need to handle the bounds for transformed color emoji the same
way we handle the bounds for distance field text. Without this
bounds correction, the glyphs were being clipped out.
Also adds a sample to test this case.
Bug: 848616
Change-Id: I39dedbe2fd19331ad67978c95519f5c9d46f59fc
Reviewed-on: https://skia-review.googlesource.com/131523
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>