|
|
|
Created:
12 years, 11 months ago by edisonn Modified:
12 years, 11 months ago Reviewers:
Steve VanDeBogart CC:
skia-review_googlegroups.com Base URL:
http://skia.googlecode.com/svn/trunk/ Visibility:
Public. |
Custom implementation of SkPDFDevice::drawBitmapRect
Patch Set 1 #Patch Set 2 : #
Total comments: 5
Patch Set 3 : #
Total messages: 5
|
edisonn
|
12 years, 11 months ago (2013年02月11日 17:12:16 UTC) #1 | ||||||||||||||||||||||
https://codereview.appspot.com/7306082/diff/3001/src/pdf/SkPDFDevice.cpp File src/pdf/SkPDFDevice.cpp (right): https://codereview.appspot.com/7306082/diff/3001/src/pdf/SkPDFDevice.cpp#newc... src/pdf/SkPDFDevice.cpp:893: dstPtr = &tmpDst; dstPtr doesn't seem to be used after this... is dstPtr needed? https://codereview.appspot.com/7306082/diff/3001/src/pdf/SkPDFDevice.cpp#newc... src/pdf/SkPDFDevice.cpp:896: // since we may need to clamp to the borders of the src rect within Shouldn't the drawBitmap code already handle this? It should handle srcRect correctly. So all we should need to do here is calculate the correct matrix, right?
https://codereview.appspot.com/7306082/diff/3001/src/pdf/SkPDFDevice.cpp File src/pdf/SkPDFDevice.cpp (right): https://codereview.appspot.com/7306082/diff/3001/src/pdf/SkPDFDevice.cpp#newc... src/pdf/SkPDFDevice.cpp:893: dstPtr = &tmpDst; On 2013年02月11日 20:59:34, Steve VanDeBogart wrote: > dstPtr doesn't seem to be used after this... is dstPtr needed? Done. https://codereview.appspot.com/7306082/diff/3001/src/pdf/SkPDFDevice.cpp#newc... src/pdf/SkPDFDevice.cpp:896: // since we may need to clamp to the borders of the src rect within If I do this now, I am doing more than a simple port from SkDevice:: to SkPdfDevice/VectorPlatformDeviceEmf, and I might introduce new issues. I would rather preserve 100% compatibility with the old code. On 2013年02月11日 20:59:34, Steve VanDeBogart wrote: > Shouldn't the drawBitmap code already handle this? It should handle srcRect > correctly. So all we should need to do here is calculate the correct matrix, > right?
LGTM https://codereview.appspot.com/7306082/diff/3001/src/pdf/SkPDFDevice.cpp File src/pdf/SkPDFDevice.cpp (right): https://codereview.appspot.com/7306082/diff/3001/src/pdf/SkPDFDevice.cpp#newc... src/pdf/SkPDFDevice.cpp:896: // since we may need to clamp to the borders of the src rect within On 2013年02月11日 21:56:38, edisonn wrote: > If I do this now, I am doing more than a simple port from SkDevice:: to > SkPdfDevice/VectorPlatformDeviceEmf, and I might introduce new issues. I would > rather preserve 100% compatibility with the old code. Ok, minimal change for now. SG. Do you want to add a TODO for optimizing? > > On 2013年02月11日 20:59:34, Steve VanDeBogart wrote: > > Shouldn't the drawBitmap code already handle this? It should handle srcRect > > correctly. So all we should need to do here is calculate the correct matrix, > > right? >