Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Issue 1870463002: flesh out gradient shaders (Closed)

Created:
4 years, 8 months ago by caryclark
Modified:
4 years, 7 months ago
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

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 Committed: https://pdfium.googlesource.com/pdfium/+/f9924422a4cd1d1b6d2d4240c83b5c1082da3629

Patch Set 1 #

Patch Set 2 : wip; more work on linear gradients #

Patch Set 3 : wip; add radial gradients #

Patch Set 4 : wip; fix radial clipping #

Patch Set 5 : add radial gradient support #

Patch Set 6 : add comment #

Total comments: 6

Patch Set 7 : rebase #

Patch Set 8 : address comments #

Patch Set 9 : address comments #

Total comments: 36

Patch Set 10 : add unit test #

Patch Set 11 : fix unittest gyp #

Patch Set 12 : fix linux-detected error #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+385 lines, -86 lines) Patch
M core/fpdfapi/fpdf_page/fpdf_page_func.cpp View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +33 lines, -53 lines 0 comments Download
M core/fpdfapi/fpdf_page/pageint.h View 1 2 3 4 5 6 7 8 9 2 chunks +28 lines, -0 lines 0 comments Download
M core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M core/fxge/include/fx_ge.h View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M core/fxge/skia/fx_skia_device.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M core/fxge/skia/fx_skia_device.cpp View 1 2 3 4 5 6 7 8 9 7 chunks +275 lines, -26 lines 0 comments Download
A core/fxge/skia/fx_skia_device_unittest.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +31 lines, -0 lines 0 comments Download
M pdfium.gyp View 1 2 3 4 5 6 7 8 9 10 2 chunks +10 lines, -1 line 1 comment Download

Messages

Total messages: 42 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870463002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870463002/100001
4 years, 8 months ago (2016-04-11 14:15:05 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_xfa on master.tryserver.client.pdfium (JOB_FAILED, https://build.chromium.org/p/tryserver.client.pdfium/builders/linux_xfa/builds/168)
4 years, 8 months ago (2016-04-11 14:19:58 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870463002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870463002/120001
4 years, 8 months ago (2016-04-11 14:25:14 UTC) #8
dsinclair
https://codereview.chromium.org/1870463002/diff/100001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp File core/fpdfapi/fpdf_page/fpdf_page_func.cpp (right): https://codereview.chromium.org/1870463002/diff/100001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp#newcode638 core/fpdfapi/fpdf_page/fpdf_page_func.cpp:638: class CPDF_PSFunc : public CPDF_Function { Can this be ...
4 years, 8 months ago (2016-04-11 14:29:28 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-11 14:39:47 UTC) #11
caryclark
4 years, 8 months ago (2016-04-11 14:44:06 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870463002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870463002/160001
4 years, 8 months ago (2016-04-11 15:01:49 UTC) #14
caryclark
https://codereview.chromium.org/1870463002/diff/100001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp File core/fpdfapi/fpdf_page/fpdf_page_func.cpp (right): https://codereview.chromium.org/1870463002/diff/100001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp#newcode638 core/fpdfapi/fpdf_page/fpdf_page_func.cpp:638: class CPDF_PSFunc : public CPDF_Function { On 2016/04/11 14:29:28, ...
4 years, 8 months ago (2016-04-11 15:01:50 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-11 15:13:31 UTC) #17
dsinclair
https://codereview.chromium.org/1870463002/diff/160001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp File core/fpdfapi/fpdf_page/fpdf_page_func.cpp (right): https://codereview.chromium.org/1870463002/diff/160001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp#newcode524 core/fpdfapi/fpdf_page/fpdf_page_func.cpp:524: } // namespace Hm, did this make the namespace ...
4 years, 8 months ago (2016-04-11 16:17:45 UTC) #18
caryclark
https://codereview.chromium.org/1870463002/diff/160001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp File core/fpdfapi/fpdf_page/fpdf_page_func.cpp (right): https://codereview.chromium.org/1870463002/diff/160001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp#newcode524 core/fpdfapi/fpdf_page/fpdf_page_func.cpp:524: } // namespace On 2016/04/11 16:17:45, dsinclair wrote: > ...
4 years, 8 months ago (2016-04-11 16:26:33 UTC) #19
Tom Sepez
https://codereview.chromium.org/1870463002/diff/160001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp File core/fpdfapi/fpdf_page/fpdf_page_func.cpp (right): https://codereview.chromium.org/1870463002/diff/160001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp#newcode498 core/fpdfapi/fpdf_page/fpdf_page_func.cpp:498: CPDF_PSFunc() : CPDF_Function(Type::kType4PostScript) {} nit: ctor should come before ...
4 years, 8 months ago (2016-04-11 16:41:50 UTC) #20
caryclark
https://codereview.chromium.org/1870463002/diff/160001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp File core/fpdfapi/fpdf_page/fpdf_page_func.cpp (right): https://codereview.chromium.org/1870463002/diff/160001/core/fpdfapi/fpdf_page/fpdf_page_func.cpp#newcode498 core/fpdfapi/fpdf_page/fpdf_page_func.cpp:498: CPDF_PSFunc() : CPDF_Function(Type::kType4PostScript) {} On 2016/04/11 16:41:49, Tom Sepez ...
4 years, 8 months ago (2016-04-11 20:41:52 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870463002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870463002/180001
4 years, 8 months ago (2016-04-11 20:43:26 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_no_v8 on master.tryserver.client.pdfium (JOB_FAILED, https://build.chromium.org/p/tryserver.client.pdfium/builders/mac_no_v8/builds/181) win on ...
4 years, 8 months ago (2016-04-11 20:50:37 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870463002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870463002/200001
4 years, 8 months ago (2016-04-11 20:56:16 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux on master.tryserver.client.pdfium (JOB_FAILED, https://build.chromium.org/p/tryserver.client.pdfium/builders/linux/builds/181)
4 years, 8 months ago (2016-04-11 21:18:26 UTC) #29
Tom Sepez
LGTM once the compilation on linux is fixed. Thanks.
4 years, 8 months ago (2016-04-12 00:34:03 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870463002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870463002/220001
4 years, 8 months ago (2016-04-12 11:39:35 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-12 11:51:06 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870463002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870463002/220001
4 years, 8 months ago (2016-04-12 12:08:02 UTC) #38
commit-bot: I haz the power
Committed patchset #12 (id:220001) as https://pdfium.googlesource.com/pdfium/+/f9924422a4cd1d1b6d2d4240c83b5c1082da3629
4 years, 8 months ago (2016-04-12 12:08:23 UTC) #40
Lei Zhang
4 years, 7 months ago (2016-05-20 00:26:37 UTC) #42
Message was sent while issue was closed.
https://codereview.chromium.org/1870463002/diff/220001/pdfium.gyp
File pdfium.gyp (right):

https://codereview.chromium.org/1870463002/diff/220001/pdfium.gyp#newcode958
pdfium.gyp:958: ['pdf_use_skia==1', {
BTW, this CL forgot to update BUILD.gn:

+  if (pdf_use_skia) {
+    sources += [ "core/fxge/skia/fx_skia_device_unittest.cpp" ]
+    deps += [ "//skia" ]
+  }

Powered by Google App Engine
This is Rietveld 408576698