From f9924422a4cd1d1b6d2d4240c83b5c1082da3629 Mon Sep 17 00:00:00 2001 From: caryclark Date: Tue, 12 Apr 2016 05:08:17 -0700 Subject: flesh out gradient shaders Using these webpages as guides http://www.globelegislators.org/pdfjs/test/pdfs/alphatrans.pdf http://www.antennahouse.com/antenna1/wp-content/uploads/2015/07/background-image-gradient-1.pdf flesh out the gradient shaders to include the PostScript Type 0 sampling function and to include radial gradients. This CL makes rendering these pages agree with Adobe Reader output. Some of these examples use an Extend array to clip the gradient. Skia does not currently support this natively, so construct the clip manually for now. Other PDF pages may construct gradients using alternate mechanisms -- this code will continue to be refactored as those come to light. In particular, this CL sets up the clip and matrix differently for axial gradients and radial gradients -- while it makes sense to do it one way only, I prefer to defer until I have more examples to work with. R=dsinclair@chromium.org,tsepez@chromium.org Review URL: https://codereview.chromium.org/1870463002 --- pdfium.gyp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pdfium.gyp') diff --git a/pdfium.gyp b/pdfium.gyp index 17384309cb..6fe4adf1f9 100644 --- a/pdfium.gyp +++ b/pdfium.gyp @@ -258,7 +258,7 @@ 'core/fpdfdoc/include/cpvt_wordplace.h', 'core/fpdfdoc/include/cpvt_wordprops.h', 'core/fpdfdoc/include/cpvt_wordrange.h', - 'core/fpdfdoc/ipvt_fontmap.h', + 'core/fpdfdoc/include/ipvt_fontmap.h', 'core/fpdfdoc/pdf_vt.h', 'core/fpdfdoc/tagged_int.h', ], @@ -955,6 +955,15 @@ 'fpdfsdk/javascript/public_methods_unittest.cpp', ], }], + ['pdf_use_skia==1', { + 'defines': ['PDF_ENABLE_SKIA'], + 'dependencies': [ + '<(DEPTH)/skia/skia.gyp:skia', + ], + 'sources': [ + 'core/fxge/skia/fx_skia_device_unittest.cpp', + ], + }], ], }, { -- cgit v1.2.3