On 2012/04/13 23:56:40, Steve VanDeBogart wrote: LGTM The only reservation I have is with the ...
12 years, 8 months ago
(2012-04-16 13:32:16 UTC)
#2
On 2012/04/13 23:56:40, Steve VanDeBogart wrote:
LGTM
The only reservation I have is with the shader. When the matrix is singular we
know that there is no fill area, so shading the interior should never need a
shader, since there will be no area to fill. Except, of course with inverse
fills, since we're then shading the outside. In theory, we should be shading the
world with the value at infinity for the shader (gradient ends and such) but our
shaders don't always have a point at infinity to spread the color of. I'm not
sure how the raster case handles this.
I would just propose that shaders extend to INF-1. Then this change (to PDF) is
good, and it makes things easier in general.
On 2012/04/16 13:32:16, bungeman wrote: > On 2012/04/13 23:56:40, Steve VanDeBogart wrote: > > LGTM ...
12 years, 8 months ago
(2012-04-16 18:36:20 UTC)
#3
On 2012/04/16 13:32:16, bungeman wrote:
> On 2012/04/13 23:56:40, Steve VanDeBogart wrote:
>
> LGTM
>
> The only reservation I have is with the shader. When the matrix is singular we
> know that there is no fill area, so shading the interior should never need a
> shader, since there will be no area to fill. Except, of course with inverse
> fills, since we're then shading the outside. In theory, we should be shading
the
> world with the value at infinity for the shader (gradient ends and such) but
our
> shaders don't always have a point at infinity to spread the color of. I'm not
> sure how the raster case handles this.
The matrix is only singular if the canvas or shader matrix is singular. In the
former case, it's not clear to me if there is a clear notion of
interior/exterior. In the later case it seems reasonable not to draw anything
because the requested shader is invalid. Do you agree?
> I would just propose that shaders extend to INF-1. Then this change (to PDF)
is
> good, and it makes things easier in general.
The PDF shader needs representable values for the bounding box. They may be
ints or floats, so I guess I could use the max float. I'm hesitant to do that
though as it may cause dumber renderers to waste a lot of time rendering the
shader where it won't be visible. Additionally, having the bounding box match
the clip has made it easier to catch bugs in the transforms for the shader
because they manifest as the shader stopping before it should.
On 2012/04/16 18:36:20, Steve VanDeBogart wrote: > On 2012/04/16 13:32:16, bungeman wrote: > > On ...
12 years, 8 months ago
(2012-04-17 17:41:23 UTC)
#4
On 2012/04/16 18:36:20, Steve VanDeBogart wrote:
> On 2012/04/16 13:32:16, bungeman wrote:
> > On 2012/04/13 23:56:40, Steve VanDeBogart wrote:
> >
> > LGTM
> >
> > The only reservation I have is with the shader. When the matrix is singular
we
> > know that there is no fill area, so shading the interior should never need a
> > shader, since there will be no area to fill. Except, of course with inverse
> > fills, since we're then shading the outside. In theory, we should be shading
> the
> > world with the value at infinity for the shader (gradient ends and such) but
> our
> > shaders don't always have a point at infinity to spread the color of. I'm
not
> > sure how the raster case handles this.
>
> The matrix is only singular if the canvas or shader matrix is singular. In
the
> former case, it's not clear to me if there is a clear notion of
> interior/exterior. In the later case it seems reasonable not to draw anything
> because the requested shader is invalid. Do you agree?
>
> > I would just propose that shaders extend to INF-1. Then this change (to PDF)
> is
> > good, and it makes things easier in general.
>
> The PDF shader needs representable values for the bounding box. They may be
> ints or floats, so I guess I could use the max float. I'm hesitant to do that
> though as it may cause dumber renderers to waste a lot of time rendering the
> shader where it won't be visible. Additionally, having the bounding box match
> the clip has made it easier to catch bugs in the transforms for the shader
> because they manifest as the shader stopping before it should.
I talked to Reed about this. We agreed that shaders should have a homogeneous
point at infinity which is treated as never drawn. (This is what I meant by
shaders extending to INF-1.) So yes, draw nothing is the right thing to do.
The change still LGTM.
Issue 6033047: [PDF] Handle failures of matrix inversion.
(Closed)
Created 12 years, 8 months ago by Steve VanDeBogart
Modified 12 years, 8 months ago
Reviewers: bungeman
Base URL: https://skia.googlecode.com/svn/trunk
Comments: 0