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

Issue 1418623011: Give names to the shading types (Closed)

Created:
5 years, 1 month ago by dsinclair
Modified:
5 years, 1 month ago
Reviewers:
Lei Zhang, Tom Sepez
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Give names to the shading types Currently the shading types are referenced by number. This Cl creates and enum and updates the code to use the enum names instead of magic numbers. R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/468974316ed5f6b6f8e637ab2c7afedc7c2bfe6a

Patch Set 1 : #

Total comments: 4

Patch Set 2 : #

Total comments: 7

Patch Set 3 : #

Total comments: 7

Patch Set 4 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -40 lines) Patch
M core/include/fpdfapi/fpdf_resource.h View 1 2 3 3 chunks +21 lines, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp View 1 2 2 chunks +12 lines, -11 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp View 1 2 3 6 chunks +50 lines, -18 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp View 1 2 3 1 chunk +14 lines, -10 lines 2 comments Download

Messages

Total messages: 13 (2 generated)
dsinclair
PTAL.
5 years, 1 month ago (2015-10-27 00:04:19 UTC) #3
Tom Sepez
https://codereview.chromium.org/1418623011/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp (right): https://codereview.chromium.org/1418623011/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp#newcode1130 core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp:1130: if (pShading->m_ShadingType >= kFreeFormGouraudTriangleMeshShading) { Really dislike >= comparisions ...
5 years, 1 month ago (2015-10-27 00:43:16 UTC) #4
dsinclair
https://codereview.chromium.org/1418623011/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp (right): https://codereview.chromium.org/1418623011/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp#newcode1130 core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp:1130: if (pShading->m_ShadingType >= kFreeFormGouraudTriangleMeshShading) { On 2015/10/27 00:43:16, Tom ...
5 years, 1 month ago (2015-10-27 02:11:30 UTC) #5
Tom Sepez
https://codereview.chromium.org/1418623011/diff/40001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp (right): https://codereview.chromium.org/1418623011/diff/40001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp#newcode109 core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp:109: ASSERT(st > kInvalidShading && st < kMaxShading); We need ...
5 years, 1 month ago (2015-10-27 16:20:17 UTC) #6
dsinclair
https://codereview.chromium.org/1418623011/diff/40001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp (right): https://codereview.chromium.org/1418623011/diff/40001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp#newcode109 core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp:109: ASSERT(st > kInvalidShading && st < kMaxShading); On 2015/10/27 ...
5 years, 1 month ago (2015-10-27 17:00:37 UTC) #7
Tom Sepez
LGTM with nit. https://codereview.chromium.org/1418623011/diff/40001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp (right): https://codereview.chromium.org/1418623011/diff/40001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp#newcode275 core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp:275: FX_BOOL bGouraud = type == kFreeFormGouraudTriangleMeshShading ...
5 years, 1 month ago (2015-10-27 17:04:26 UTC) #8
Tom Sepez
https://codereview.chromium.org/1418623011/diff/60001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp (right): https://codereview.chromium.org/1418623011/diff/60001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp#newcode267 core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp:267: static int kSingleCoordinatePair = 1; nit: const int.
5 years, 1 month ago (2015-10-27 17:07:51 UTC) #9
Tom Sepez
https://codereview.chromium.org/1418623011/diff/60001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp (right): https://codereview.chromium.org/1418623011/diff/60001/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp#newcode107 core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp:107: static ShadingType ToShadingType(int type) { nit: maybe put this ...
5 years, 1 month ago (2015-10-27 17:08:57 UTC) #10
dsinclair
https://codereview.chromium.org/1418623011/diff/60001/core/include/fpdfapi/fpdf_resource.h File core/include/fpdfapi/fpdf_resource.h (right): https://codereview.chromium.org/1418623011/diff/60001/core/include/fpdfapi/fpdf_resource.h#newcode704 core/include/fpdfapi/fpdf_resource.h:704: bool IsMeshShading() { On 2015/10/27 17:04:25, Tom Sepez wrote: ...
5 years, 1 month ago (2015-10-27 17:15:17 UTC) #11
Tom Sepez
++lgtm https://codereview.chromium.org/1418623011/diff/80001/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp File core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp (right): https://codereview.chromium.org/1418623011/diff/80001/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp#newcode873 core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp:873: return; On 2015/10/27 17:15:17, dsinclair wrote: > I ...
5 years, 1 month ago (2015-10-27 17:17:13 UTC) #12
dsinclair
5 years, 1 month ago (2015-10-27 17:18:31 UTC) #13
Message was sent while issue was closed.
Committed patchset #4 (id:80001) manually as
468974316ed5f6b6f8e637ab2c7afedc7c2bfe6a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698