[PDF] Add support for xfermodes / blend modes.
authorvandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 8 Feb 2011 19:28:07 +0000 (19:28 +0000)
committervandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 8 Feb 2011 19:28:07 +0000 (19:28 +0000)
commit48543277728fdf66b993f17421f65fba532a23a2
tree0b102b16486415cfb43f79aeb02054213ea1f26f
parent79ac4fd6eb52512094ab762d2ec785390000cdd2
[PDF] Add support for xfermodes / blend modes.

- Change SkGraphicState to track and set the blend mode (xfermode) for modes built in to PDF (non porter duff modes + src over).
- Add SkXfermode::asMode() to retrieve xfermode as an enum for non porter duff modes.
- Move SkXfermode.cpp around a bit to support asMode() -- Generally move utility functions toward the top of the file.
- Make SkPDFFormXObject an isolated transparency group, as it used for saveLayer, which draws on transparent, not the device background.
- Set the graphic state in drawDevice and drawBitmap in order to get the right xfermode and alpha.

Review URL: http://codereview.appspot.com/4131043

git-svn-id: http://skia.googlecode.com/svn/trunk@774 2bbb7eff-a529-9590-31e7-b0007b416f81
include/core/SkXfermode.h
src/core/SkXfermode.cpp
src/pdf/SkPDFDevice.cpp
src/pdf/SkPDFFormXObject.cpp
src/pdf/SkPDFGraphicState.cpp
tests/XfermodeTest.cpp [new file with mode: 0644]
tests/tests_files.mk