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

Issue 4750045: [PDF] Make color shaders work correctly. (Closed)

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

Description

[PDF] Make color shaders work correctly. Make SkPDFShader correctly bail out for color shaders. Fix the bail out handling code. Committed: http://code.google.com/p/skia/source/detail?r=1886

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -29 lines) Patch
M include/pdf/SkPDFShader.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 1 2 chunks +14 lines, -15 lines 0 comments Download
M src/pdf/SkPDFShader.cpp View 1 5 chunks +13 lines, -12 lines 0 comments Download

Messages

Total messages: 7
Steve VanDeBogart
RE: http://codereview.appspot.com/4674048 I guess this path was never tested... Chris for review unless Brian wants ...
13 years, 2 months ago (2011-07-18 15:11:29 UTC) #1
reed1
Does bail out mean we now correctly handle colorshaders, or that we ignore them, or ...
13 years, 2 months ago (2011-07-18 15:24:25 UTC) #2
Steve VanDeBogart
On 2011/07/18 15:24:25, reed1 wrote: > Does bail out mean we now correctly handle colorshaders, ...
13 years, 2 months ago (2011-07-18 15:34:21 UTC) #3
reed1
LGTM Some general questions/comments: 1. canonicalShaders and canonicalShadersMutex should be initial capitalized, since they are ...
13 years, 2 months ago (2011-07-18 15:46:46 UTC) #4
Chris Guillory
LGTM http://codereview.appspot.com/4750045/diff/1/src/pdf/SkPDFDevice.cpp File src/pdf/SkPDFDevice.cpp (right): http://codereview.appspot.com/4750045/diff/1/src/pdf/SkPDFDevice.cpp#newcode1412 src/pdf/SkPDFDevice.cpp:1412: if (pdfShader) { Optional: pdfShader.get()? That's the usage ...
13 years, 2 months ago (2011-07-18 17:13:21 UTC) #5
bsalomon
I defer to the PDF code experts :) On Mon, Jul 18, 2011 at 1:13 ...
13 years, 2 months ago (2011-07-18 17:22:06 UTC) #6
Steve VanDeBogart
13 years, 2 months ago (2011-07-18 18:39:41 UTC) #7
On 2011/07/18 15:46:46, reed1 wrote:
> LGTM
> 
> Some general questions/comments:
> 
> 1. canonicalShaders and canonicalShadersMutex should be initial capitalized,

Done.

> since they are static methods. Alternatively, they could just be static/local
> functions inside the cpp, since that is the only place they are used. That is
a
> little nicer, since they are basically an implementation detail.

While, I think that's feasible, I think they make more sense where they are. 
Logically, these are class static fields, but Chrome doesn't like static
initializers, so I made them static methods with static variables.

> 2. I don't understand how a set of global objects can be used and mutated,
given

They can't - they aren't mutated. 

> that they're shared between threads. If thread A finds one and uses it, and
> thread B does the same, are we not at risk of corrupting the object? I realize
> that the lookup functionality is mutex protected, but I can't see that
accessing
> the found instance is, though I may just be missing that.

http://codereview.appspot.com/4750045/diff/1/src/pdf/SkPDFDevice.cpp
File src/pdf/SkPDFDevice.cpp (right):

http://codereview.appspot.com/4750045/diff/1/src/pdf/SkPDFDevice.cpp#newcode1412
src/pdf/SkPDFDevice.cpp:1412: if (pdfShader) {
On 2011/07/18 17:13:22, Chris Guillory wrote:
> Optional: pdfShader.get()? That's the usage pattern you have in your change to
> SkPDFCatalog.cpp.

Done.
Sign in to reply to this message.

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