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

Issue 1806843002: fix paths and remove dead code (Closed)

Created:
4 years, 9 months ago by caryclark
Modified:
4 years, 9 months ago
Reviewers:
Tom Sepez, dsinclair
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

fix paths and remove dead code More Skia driver cleanup. Fix the GN build for Skia. Remove unused functions from header. Remove agg setup that is not required. Change path construction to use the SkCanvas matrix to position the path rather than converting the points directly. Draw stroked paths using Skia rather than generated the filled path. Pin the minimum stroke width to 1 px in device space to mimic PDF's stroke dropout control. Factor out flipped and non-flipped matrices. Add some debugging code. Set the bitmap filter quality to high. This helps a lot with 1 bit sources. R=dsinclair@chromium.org, dsinclair, tsepez Committed: https://pdfium.googlesource.com/pdfium/+/59b3a481fee140ed2508916e02addb8f3959ec7b

Patch Set 1 #

Patch Set 2 : fix skia paths and remove dead code #

Total comments: 2

Patch Set 3 : address comment #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -70 lines) Patch
M BUILD.gn View 1 1 chunk +1 line, -1 line 0 comments Download
M core/fxge/skia/fx_skia_device.h View 1 3 chunks +2 lines, -15 lines 2 comments Download
M core/fxge/skia/fx_skia_device.cpp View 1 2 14 chunks +52 lines, -54 lines 10 comments Download

Messages

Total messages: 10 (4 generated)
caryclark
4 years, 9 months ago (2016-03-17 14:25:21 UTC) #4
dsinclair
lgtm w/ nit https://codereview.chromium.org/1806843002/diff/20001/core/fxge/skia/fx_skia_device.cpp File core/fxge/skia/fx_skia_device.cpp (right): https://codereview.chromium.org/1806843002/diff/20001/core/fxge/skia/fx_skia_device.cpp#newcode131 core/fxge/skia/fx_skia_device.cpp:131: } nit: no {}'s on single ...
4 years, 9 months ago (2016-03-17 14:39:31 UTC) #5
caryclark
https://codereview.chromium.org/1806843002/diff/20001/core/fxge/skia/fx_skia_device.cpp File core/fxge/skia/fx_skia_device.cpp (right): https://codereview.chromium.org/1806843002/diff/20001/core/fxge/skia/fx_skia_device.cpp#newcode131 core/fxge/skia/fx_skia_device.cpp:131: } On 2016/03/17 14:39:31, dsinclair wrote: > nit: no ...
4 years, 9 months ago (2016-03-17 15:52:51 UTC) #6
caryclark
Committed patchset #3 (id:40001) manually as 59b3a481fee140ed2508916e02addb8f3959ec7b (presubmit successful).
4 years, 9 months ago (2016-03-17 16:00:44 UTC) #8
Tom Sepez
lgtm https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_device.cpp File core/fxge/skia/fx_skia_device.cpp (right): https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_device.cpp#newcode40 core/fxge/skia/fx_skia_device.cpp:40: printf("(%g,%g,%g) (%g,%g,%g) (%g,%g,%g)\n", m[0], m[1], m[2], m[3], m[4], ...
4 years, 9 months ago (2016-03-17 16:05:51 UTC) #9
caryclark
4 years, 9 months ago (2016-03-18 18:22:13 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_...
File core/fxge/skia/fx_skia_device.cpp (right):

https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_...
core/fxge/skia/fx_skia_device.cpp:40: printf("(%g,%g,%g) (%g,%g,%g)
(%g,%g,%g)\n", m[0], m[1], m[2], m[3], m[4], m[5], m[6],
On 2016/03/17 16:05:50, Tom Sepez wrote:
> nit: 80 cols.

Done.

https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_...
core/fxge/skia/fx_skia_device.cpp:136: SkTMin(deviceUnits[0].length(),
deviceUnits[1].length()));
On 2016/03/17 16:05:50, Tom Sepez wrote:
> nit: ditto.  git cl format should have fixed these for us?

Done.

https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_...
core/fxge/skia/fx_skia_device.cpp:206: static SkMatrix ToSkMatrix(const
CFX_Matrix& m) {
On 2016/03/17 16:05:50, Tom Sepez wrote:
> nit:  an we put these up top in the file with the other statics?

Done.

https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_...
core/fxge/skia/fx_skia_device.cpp:208: skMatrix.setAll(m.a, m.b, m.e, m.c, m.d,
m.f, 0, 0, 1);
On 2016/03/17 16:05:50, Tom Sepez wrote:
> nit: Pity SkMatrix doesn't have a constructor of this form, writing the
function
> body as the one-liner
>   return SkMatrix(m.a, m.b, m.e, m.c, m.d, m.f, 0, 0, 1);
> would then be possible. 

Would you like a bug filed to request this feature? Or, are you asking for
something else?

https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_...
core/fxge/skia/fx_skia_device.cpp:303: SkMatrix skMatrix =
ToSkMatrix(*pObject2Device);
On 2016/03/17 16:05:50, Tom Sepez wrote:
> nit: local not needed.

While that's strictly true, it is easier to debug if stepping over this line
sets the matrix allowing inline examination of the values. Is this is a
performance concern, or a readability concern?

https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_...
File core/fxge/skia/fx_skia_device.h (right):

https://codereview.chromium.org/1806843002/diff/40001/core/fxge/skia/fx_skia_...
core/fxge/skia/fx_skia_device.h:132: void PaintStroke(SkPaint* spaint, const
CFX_GraphStateData* pGraphState, const SkMatrix& matrix);
On 2016/03/17 16:05:50, Tom Sepez wrote:
> nit: 80 cols.

Done.

Powered by Google App Engine
This is Rietveld 408576698