| Commit message (Collapse) | Author | Age |
|
|
|
| |
Review URL: https://codereview.chromium.org/1312163008
|
|
|
|
|
|
| |
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
|
|
|
|
|
|
| |
DOCS_PREVIEW= https://skia.org/?cl=1316123003
Review URL: https://codereview.chromium.org/1316123003
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached.
Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold.
In order to invalidate the cache when an SkPath is changed or deleted,
this required implementing genID change notification in SkPath. This is
modelled almost exactly on SkPixelRef::GenIDChangeListener.
However, It does not currently implement the check for unique genIDs,
so notifiers will fire when the first instance of an SkPathRef
using a given genID is destroyed.
Another caveat is that you cannot successfully add a change notifier
to an empty path, since it uses the "canonical" empty path which is
never modified or destroyed. For this reason, we prevent adding
listeners to it.
BUG=skia:4121,skia:4122, 497403
DOCS_PREVIEW= https://skia.org/?cl=1114353004
Committed: https://skia.googlesource.com/skia/+/468dfa72eb6694145487be17876804dfca3b7adb
Review URL: https://codereview.chromium.org/1114353004
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 468dfa72eb6694145487be17876804dfca3b7adb.
This CL caused signficant GM diffs.
Revert "Fix resource cache test."
This reverts commit b001c41ed37d2018d38ce787b412ed741585d75d.
Revert "Fix SkData leaks at GrResourceKey::setCustomData() call sites."
This reverts commit c369348aa596d7be05c9ce0ca5d349e5d1903789.
These CLs depend on the first one.
BUG=skia:
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/1260363007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached.
Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold.
In order to invalidate the cache when an SkPath is changed or deleted,
this required implementing genID change notification in SkPath. This is
modelled almost exactly on SkPixelRef::GenIDChangeListener.
However, It does not currently implement the check for unique genIDs,
so notifiers will fire when the first instance of an SkPathRef
using a given genID is destroyed.
Another caveat is that you cannot successfully add a change notifier
to an empty path, since it uses the "canonical" empty path which is
never modified or destroyed. For this reason, we prevent adding
listeners to it.
BUG=skia:4121,skia:4122, 497403
DOCS_PREVIEW= https://skia.org/?cl=1114353004
Review URL: https://codereview.chromium.org/1114353004
|
|
|
|
|
|
|
| |
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1262143002
|
|
|
|
|
|
|
|
|
|
| |
This is a contract change for SkPath::getBounds(), which formally was defined to return 0,0,0,0 for a 1-point path, regardless of the coordinates of that point. This seems wacky/inconsistent, and was causing other bugs (incorrect bounds) when this was unioned with other rects.
Does anyone remember why we defined it this way?
BUG=513799
Review URL: https://codereview.chromium.org/1261773002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and are treated as convex when they are not.
Allow the SkPath::Iter to leave degenerate path
segments unmolested by passing an additional exact
bool to next().
Treat any non-zero length as significant in addPt().
R=reed@google.com,robertphillips@google.com
BUG=493450
Review URL: https://codereview.chromium.org/1228383002
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- input param to addFoo (e.g. addRect), where only CW or CCW are valid)
- output param from computing functions, that sometimes return kUnknown
This CL's intent is to split these into distinct enums/features:
- Direction (public) loses kUnknown, and is only used for input
- FirstDirection (private) is used for computing the first direction we see when analyzing a contour
BUG=skia:
Review URL: https://codereview.chromium.org/1176953002
|
|
|
|
|
|
|
| |
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1156893003
|
|
|
|
|
|
|
|
|
| |
R=reed@google.com, bsalomon@google.com
Let isNested(Fill)Rect return true if drawn path describes filled
rectangles.
Review URL: https://codereview.chromium.org/1073473002
|
|
|
|
|
|
| |
BUG=389050
Review URL: https://codereview.chromium.org/975523002
|
|
|
|
|
|
|
|
|
|
| |
If a quad, cubic, or conic goes back on itself, assume it's not convex.
In a future CL, we could check to see if the curve is linear so that
linear curves are treated the same as lines.
BUG=skia:3469
Review URL: https://codereview.chromium.org/971773002
|
|
|
|
|
|
|
|
|
|
|
|
| |
last Move op
Without this patch the iterator can end up running off the end of the conic weights if there is a mixture of degenerate and non-degenerate ops
Note: we might want to suppress the generation of degenerate conics and lines in SkPath::addRRect
BUG=459897
Review URL: https://codereview.chromium.org/954453003
|
|
|
|
|
|
| |
TBR=scroggo@google.com
Review URL: https://codereview.chromium.org/934803003
|
|
|
|
| |
Review URL: https://codereview.chromium.org/926693002
|
|
|
|
|
|
| |
BUG=457128
Review URL: https://codereview.chromium.org/913743002
|
|
|
|
|
|
|
|
| |
guarded by SK_SUPPORT_LEGACY_ARCTO_QUADS
BUG=skia:
Review URL: https://codereview.chromium.org/892703002
|
|
|
|
|
|
|
| |
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/864713002
|
|
|
|
|
|
|
|
|
|
| |
AFAICT the asRect entry point is not needed.
Greg: GPU
Reed: API
Cary: Path
Review URL: https://codereview.chromium.org/833193002
|
|
|
|
| |
Review URL: https://codereview.chromium.org/832083002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Oddly enough this was fixed in:
https://codereview.chromium.org/16950021/ (add rect-output parameter to isRect, allowing us to return the correct bounds even if a rectagular path has a trailing moveTo)
but was reverted here:
https://skia.googlesource.com/skia/+/8fd160350ca5f57fbb1b2e03383c5778414a9b48
since it appeared to be crashing Chrome's trybots. I think it just fell through the cracks after that.
If this sticks I will land a follow on patch for the stroke issue reported in the original bug (crbug.com/247770).
BUG=247770,445368
Review URL: https://codereview.chromium.org/834483002
|
|
|
|
|
|
| |
BUG=skia:
Review URL: https://codereview.chromium.org/455043002
|
|
|
|
|
|
|
|
|
|
| |
radius to a bounds coordinate.
add test that triggers assert in addRRect
BUG=skia:3239
Review URL: https://codereview.chromium.org/803153003
|
|
|
|
| |
Review URL: https://codereview.chromium.org/800993002
|
|
|
|
|
|
|
|
|
|
| |
patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)
BUG=skia:
TBR=
re-landing after chrome fixes have landed
Review URL: https://codereview.chromium.org/784223007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
surface::NewRasterPMColor to N32Premul (patchset #3 id:40001 of https://codereview.chromium.org/790733003/)
Reason for revert:
need to update chrome first
Original issue's description:
> remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
>
> patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2c1605a1fbaa2e35a27399a34254fb1200ec2ae6
TBR=fmalita@google.com,fmalita@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/791763002
|
|
|
|
|
|
|
|
|
|
| |
N32Premul
patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)
BUG=skia:
Review URL: https://codereview.chromium.org/790733003
|
|
|
|
|
|
|
|
|
|
| |
PathOps relies on isConvex() only returning true for trivially
convex paths. The old logic also returns true if the paths that
contain NaNs and Infinities. Return kUnknown_Convexity instead
in those cases and in cases where the convexity logic computes
intermediaries that overflow.
Review URL: https://codereview.chromium.org/784593002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL fixes the case where a bad initial vector (i.e., nearly zero) managed to short circuit all of the convexicator's logic. The initial bad vector would become the last vector and then never get displaced.
The history of this is:
https://codereview.chromium.org/298973004/
Switched the convexicator to not advance the last vector when the cross product wasn't significant
https://codereview.chromium.org/573763002/
Fixed a bug (crbug.com/412640) wherein a zero area path was being incorrectly categorized as convex b.c. opposite but equal vectors were not signaling concavity.
BUG=433683
Review URL: https://codereview.chromium.org/727283003
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will allow us to add nonnull-attribute to the UBSAN bot.
We are in fact hitting a case where one of the arguments is null and the other
not, which seems dicey. I think the scenario is comparing the empty pathref
with another path ref that's just been COWed, without any verbs or points yet.
BUG=skia:
Review URL: https://codereview.chromium.org/732643002
|
|
|
|
|
|
| |
R=reed@google.com,bsalomon@google.com
Review URL: https://codereview.chromium.org/676803002
|
|
|
|
|
|
|
|
|
| |
BUG=crbug.com/412640
R=caryclark@google.com, bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/573763002
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This provides exact precision
to help debugging when the float
representation of a SkScalar may
introduce error.
R=reed@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/571973003
|
|
|
|
|
|
|
|
| |
R=reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/544233002
|
|
|
|
|
|
|
|
|
|
|
| |
triggers assert.
BUG=skia:1460
R=reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/517023003
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When calling cubicTo(a, b, c) and if the distance between fPrevPt and a
is too small, b is used instead of a to calculate the first tangent,
even if the distance between fPrevPt and b is too small.
In debug mode, this is causing an assertion to fail in
SkPathStroker::preJoinTo() and, in Release, the use of an
unitialized value.
The first patch set is adding a failing test.
The second one add the fix to SkPathStroker::cubicTo()
BUG=skia:2820
R=bsalomon@chromium.org, junov@chromium.org, reed@google.com, caryclark@google.com, bsalomon@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/460813002
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a unit test for SkPath::dump(). The unit test exposed a minor
bug (inconsistent CRs) and an unused parameter (title).
R=bsalomon@google.com
TBR=bsalomon
BUG=skia:1836
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/351833003
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=skia:2235
R=caryclark@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/298973004
git-svn-id: http://skia.googlecode.com/svn/trunk@14845 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by the excellent repro case for https://crbug.com/364224
patch from issue 265933010
BUG=skia:
R=bungeman@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/267003002
git-svn-id: http://skia.googlecode.com/svn/trunk@14566 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
| |
git-svn-id: http://skia.googlecode.com/svn/trunk@13418 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=261727
R=reed@google.com, caryclark@google.com, schenney@chromium.org, robertphillips@google.com
Author: junov@chromium.org
Review URL: https://codereview.chromium.org/151353006
git-svn-id: http://skia.googlecode.com/svn/trunk@13415 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
| |
SkPath::asRect
R=caryclark@google.com, reed@google.com
Author: yunchao.he@intel.com
Review URL: https://codereview.chromium.org/138703008
git-svn-id: http://skia.googlecode.com/svn/trunk@13390 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This defines yunchao's proposed interface in terms of
an existing implementation.
BUG=skia:
R=reed@google.com, yunchao.he@intel.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/140953003
git-svn-id: http://skia.googlecode.com/svn/trunk@13183 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initially this was to make sure Test.h appeared after the Sk*.h includes.
Patch generated by the following command line:
$ ~/chromium/src/tools/sort-headers.py tests/*.cpp
BUG=None
TEST=tests
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/145313004
git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=skia:
R=caryclark@google.com, yunchao.he@intel.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/139483002
git-svn-id: http://skia.googlecode.com/svn/trunk@13092 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Motivation: those macros don't make any sense without the definitions
in Test.h.
BUG=
R=mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/138563004
git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces the allocation overhead of a null picture (create, beginRecording(), endRecording) from about 18K to about 1.9K. (There's still lots more to prune.)
SkPictureFlat can exploit the fact that Writer32 is contiguous simplify its memory management. The Writer32 itself becomes the scratch buffer.
Remove lots and lots of arbitrary magic numbers that were size guesses and minimum allocation sizes. Keep your eyes open for the big obvious DUH why we save 16K per picture! (Spoiler alert. It's because that first save we issue in beginRecording() forces the old SkWriter32 to allocate 16K.)
Tests passing, DM passing.
bench --match writer: ~20% faster
null bench_record: ~30% faster
bench_record on buildbot .skps: ~3-6% slower, ranging 25% faster to 20% slower
bench_pictures on buildbot .skps: ~1-2% faster, ranging 13% faster to 28% slower
BUG=skia:1850
R=reed@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/137433003
git-svn-id: http://skia.googlecode.com/svn/trunk@13073 2bbb7eff-a529-9590-31e7-b0007b416f81
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To keep the CL (slightly) managable, this does not make any changes to
existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this
time around.
BUG=
R=bsalomon@google.com, caryclark@google.com
Review URL: https://codereview.chromium.org/117053002
git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
|