Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Issue 1473973003: Obtain conic weights for GrPath cache keys from SkPathRef

Created:
5 years ago by Kimmo Kinnunen
Modified:
5 years ago
Reviewers:
f(malita), bsalomon, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@path-cache-fix-conic-weights
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Obtain conic weights for GrPath cache keys from SkPathRef Obtain conic data for GrPath cache kSimpleVolatilePathDomain keys directly from SkPathRef. Makes GrPath a friend of SkPath to for accessing SkPathRef. BUG=skia:4580

Patch Set 1 #

Total comments: 4

Patch Set 2 : remove runtime consistency checks of internal values #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -22 lines) Patch
M include/core/SkPath.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrPath.cpp View 1 5 chunks +10 lines, -22 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Kimmo Kinnunen
fmalita@ for the implementation reed@ for the SkPath API change
5 years ago (2015-11-26 09:54:20 UTC) #2
reed1
https://chromiumcodereview.appspot.com/1473973003/diff/1/src/gpu/GrPath.cpp File src/gpu/GrPath.cpp (right): https://chromiumcodereview.appspot.com/1473973003/diff/1/src/gpu/GrPath.cpp#newcode77 src/gpu/GrPath.cpp:77: if (pointCnt < 0) { Same question here: why ...
5 years ago (2015-11-30 15:36:39 UTC) #3
Kimmo Kinnunen
https://chromiumcodereview.appspot.com/1473973003/diff/1/src/gpu/GrPath.cpp File src/gpu/GrPath.cpp (right): https://chromiumcodereview.appspot.com/1473973003/diff/1/src/gpu/GrPath.cpp#newcode83 src/gpu/GrPath.cpp:83: if (conicWeightCnt < 0) { On 2015/11/30 15:36:39, reed1 ...
5 years ago (2015-12-01 06:35:14 UTC) #4
reed1
https://chromiumcodereview.appspot.com/1473973003/diff/1/src/gpu/GrPath.cpp File src/gpu/GrPath.cpp (right): https://chromiumcodereview.appspot.com/1473973003/diff/1/src/gpu/GrPath.cpp#newcode83 src/gpu/GrPath.cpp:83: if (conicWeightCnt < 0) { On 2015/12/01 06:35:14, Kimmo ...
5 years ago (2015-12-01 14:37:21 UTC) #6
Kimmo Kinnunen
5 years ago (2015-12-01 16:42:07 UTC) #7
On 2015/12/01 14:37:21, reed1 wrote:
> https://chromiumcodereview.appspot.com/1473973003/diff/1/src/gpu/GrPath.cpp
> File src/gpu/GrPath.cpp (right):
> 
>
https://chromiumcodereview.appspot.com/1473973003/diff/1/src/gpu/GrPath.cpp#n...
> src/gpu/GrPath.cpp:83: if (conicWeightCnt < 0) {
> On 2015/12/01 06:35:14, Kimmo Kinnunen wrote:
> > On 2015/11/30 15:36:39, reed1 wrote:
> > > Why this check?
> > 
> > Because it's an int and used as a thing below that would overflow a buffer
if
> > the int would be negative?
> 
> Yes, but can it ever be negative? This is an internal value, and typically we
> don't spend runtime checking internal structures for self-consistency.

Sure, I removed the check. How about now?

> Is there a scenario where this can happen?

(I thought the use of signedness was due to reserving the possibility for such a
scenario.)

Powered by Google App Engine
This is Rietveld 408576698