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

Issue 4083045: [PDF] Honor srcRect in drawBitmap. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 10 months ago by Steve VanDeBogart
Modified:
13 years, 10 months ago
Reviewers:
reed1
CC:
skia-review_googlegroups.com, James Hawkins, Chris Guillory
Base URL:
http://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

[PDF] Honor srcRect in drawBitmap. Committed: http://code.google.com/p/skia/source/detail?r=745

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -57 lines) Patch
M include/pdf/SkPDFDevice.h View 1 chunk +1 line, -1 line 0 comments Download
M include/pdf/SkPDFImage.h View 2 chunks +3 lines, -1 line 0 comments Download
M src/pdf/SkPDFDevice.cpp View 3 chunks +10 lines, -7 lines 0 comments Download
M src/pdf/SkPDFImage.cpp View 4 chunks +53 lines, -48 lines 0 comments Download

Messages

Total messages: 3
Steve VanDeBogart
13 years, 10 months ago (2011-01-28 01:56:31 UTC) #1
reed1
Your change to SkPDFImage.cpp could perhaps be smaller. You can use the helper method extractSubset(). ...
13 years, 10 months ago (2011-01-28 19:09:28 UTC) #2
Steve VanDeBogart
13 years, 10 months ago (2011-01-28 21:27:09 UTC) #3
On 2011/01/28 19:09:28, reed1 wrote:
> Your change to SkPDFImage.cpp could perhaps be smaller. You can use the helper
> method extractSubset().
> 
> SkBitmap src, dst;
> SkIRect dst;
> 
> src.extractSubset(&dst, rect). This guy doesn't allocate new pixels, but will
> point dst to the subset of src specified by rect. After this call, you can
pass
> dst wherever you would have passed src+rect.

I also cleaned up the code along with this change... making it more consistent
and logical.  Using extractSubset on top of that cleanup doesn't really reduce
the diff much.  Locally I updated it to use extractSubset and I like the version
in this CL better because extractSubset doesn't support kA1_Config (to come
shortly) and doesn't support kRLE_Index8_Config without copying.  Always dealing
with srcRect directly makes the code more consistent.
Sign in to reply to this message.

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