Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6689)

Issue 6033047: [PDF] Handle failures of matrix inversion. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by Steve VanDeBogart
Modified:
12 years, 8 months ago
Reviewers:
bungeman
CC:
skia-review_googlegroups.com, thakis
Base URL:
https://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

[PDF] Handle failures of matrix inversion. Committed: https://code.google.com/p/skia/source/detail?r=3711

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -12 lines) Patch
M src/pdf/SkPDFDevice.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M src/pdf/SkPDFFormXObject.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M src/pdf/SkPDFShader.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/pdf/SkPDFShader.cpp View 7 chunks +24 lines, -11 lines 0 comments Download

Messages

Total messages: 4
Steve VanDeBogart
12 years, 8 months ago (2012-04-13 23:56:40 UTC) #1
bungeman
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
Steve VanDeBogart
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
bungeman
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.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b