summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.cpp
AgeCommit message (Collapse)Author
2017-02-14Reland Cleanup CPDF_MeshStreamDan Sinclair
This CL fixes up the bits of the CPDF_MeshStream CL that depended on the Origin CL and integrates the fixes for the Skia bots. Change-Id: I470e49c35b809f00fecbaeb303de15c0db3fe590 Reviewed-on: https://pdfium-review.googlesource.com/2698 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-02-14Revert "Convert Origins to points"Dan Sinclair
This reverts commit da83d3a5cc09c4056310b3cf299dbbccd5c70d11. Reason for revert: Reverting chain to see if fixes Chrome roll. Original change's description: > Convert Origins to points > > This CL converts various OriginX, OriginY pairs into CFX_PointF objects. > > Change-Id: I9141f7fc713c710b2014d4fdcdec7dc93501f844 > Reviewed-on: https://pdfium-review.googlesource.com/2575 > Commit-Queue: dsinclair <dsinclair@chromium.org> > Reviewed-by: Nicolás Peña <npm@chromium.org> > TBR=tsepez@chromium.org,dsinclair@chromium.org,npm@chromium.org,pdfium-reviews@googlegroups.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Change-Id: I949fb4ec712e2587e7d0ef0191c34db198b61dcc Reviewed-on: https://pdfium-review.googlesource.com/2696 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-02-14Revert "Cleanup CPDF_MeshStream"dsinclair
This reverts commit 9787a7441a905e582b10d9ffc425098b3233d36c. Reason for revert: Reverting chain to see if fixes Chrome roll. Original change's description: > Cleanup CPDF_MeshStream > > This CL converts the MeshVertex to a point and the TransformPoint to the > CFX_PointF override. > > Change-Id: I3faa5c14cedcf5af6aafca1c566acbc68577cca7 > Reviewed-on: https://pdfium-review.googlesource.com/2610 > Commit-Queue: dsinclair <dsinclair@chromium.org> > Reviewed-by: Nicolás Peña <npm@chromium.org> > TBR=tsepez@chromium.org,dsinclair@chromium.org,npm@chromium.org,caryclark@google.com,pdfium-reviews@googlegroups.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ie1b1dae3ede7581128a81cf7cd86a348c651233b Reviewed-on: https://pdfium-review.googlesource.com/2695 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-02-13Clean up CPDF_TextObject a bitNicolas Pena
Modernizing CPDF_TextObject a little bit, in preparation for the addition of APIs for adding text to PDFs. m_pCharCodes, m_pCharPos are now vectors, this caused some propagation to other classes. Also m_Pos is now a point. Note that GetItemInfo is being changed in another CL, so did minimal changes there. Change-Id: I6e5f19b5d45872e3e714a7cb587c81c92e640ea3 Reviewed-on: https://pdfium-review.googlesource.com/2614 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-02-13Cleanup CPDF_MeshStreamDan Sinclair
This CL converts the MeshVertex to a point and the TransformPoint to the CFX_PointF override. Change-Id: I3faa5c14cedcf5af6aafca1c566acbc68577cca7 Reviewed-on: https://pdfium-review.googlesource.com/2610 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-02-13Convert Origins to pointsDan Sinclair
This CL converts various OriginX, OriginY pairs into CFX_PointF objects. Change-Id: I9141f7fc713c710b2014d4fdcdec7dc93501f844 Reviewed-on: https://pdfium-review.googlesource.com/2575 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-02-09Cleanup CFX_Matrix related methodsDan Sinclair
This CL removes unused CFX_Matrix methods and cleans up the implementaion of others. Change-Id: I72d1d10d4a45cc9341a980054df5225e52a0c4f2 Reviewed-on: https://pdfium-review.googlesource.com/2574 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-02-09Remove Transform in favour of TransformPointDan Sinclair
This CL removes the two Transform() overrides from CFX_Matrix and calls the TransformPoint methods directly. In the case of the 4 param version the values were assigned to the out values before calling. Change-Id: Id633826caec75b848774dcda6cfdcef2dbf5a7db Reviewed-on: https://pdfium-review.googlesource.com/2573 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-02-09Replace rect.Transform(matrix) with matrix.TransformRect(rect)Dan Sinclair
This Cl removes the rect based transform method which internally just called the matrix tranform method. The callers have been reversed to make it clearer the matrix is transforming the rect. Change-Id: I8ef57ccc2311e4e853b8180a6ff475f8eda2138e Reviewed-on: https://pdfium-review.googlesource.com/2572 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-02-09Convert Get methods to return instead of using out params.Dan Sinclair
This Cl changes several Get methods to return their values instead of using out parameters. Change-Id: Ie9a930a5c2d0e809f2d7181ca033d801945c1cf9 Reviewed-on: https://pdfium-review.googlesource.com/2556 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-02-08Rename x,y to width,height for Size typesdan sinclair
This Cl fixes the naming of the size types to match their purpose. This makes the code clearer. Change-Id: I37a41ab0fe01782f4749054f1f8ab29ddf8d2790 Reviewed-on: https://pdfium-review.googlesource.com/2551 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-02-08Update to use CFX_Rect{F} and CFX_Matrix constructors.Dan Sinclair
This Cl updates the code to use the constructors instead of creating an empty object and calling Set(). It also removes the various memsets of the CFX_Rect{F} classes. Change-Id: I6e20cec00866a38372858dcba5a30d31103172e4 Reviewed-on: https://pdfium-review.googlesource.com/2550 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-02-07Use enum class for PathPoint types.Nicolas Pena
This hopefully makes it less confusing what the description of a point is. Currently we have defines for the types, which is confusing because a point can only be one of the three. And it is mixed up with whether the point is closing a figure or not. Change-Id: Icd71355d69c77b3d52ca78e03bc379081ff87753 Reviewed-on: https://pdfium-review.googlesource.com/2552 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-09Remove CFX_ArrayTemplate from fpdfapitsepez
Review-Url: https://codereview.chromium.org/2611413002
2017-01-04Kill render_int.hchromium/2973chromium/2972Nicolas Pena
CPDF_DIBSource was already in its own file, but files needed renaming. Change-Id: Ib3ac787a0bb33d3f78ecdcdfcdbc938867857a14 Reviewed-on: https://pdfium-review.googlesource.com/2152 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2016-12-14Avoid the ptr.reset(new XXX()) anti-patterntsepez
Be suspicious of |new|. This removes some of the easy cases. Review-Url: https://codereview.chromium.org/2571913002
2016-12-06re-enable skia cachingchromium/2944caryclark
This permits consecutive path drawing or text drawing to combine if their graphics state matches. This speeds up rendering considerably when PDFium draws in many small parts. It also allows discarding changes to the clip state that have no effect from draw to draw. All corpus tests draw equivalently with caching enabled or disabled. Change the member order in CPDF_PageRenderContext so the device is flushed before the referencing annotation is deleted. Add more printf style debugging for test draws. R=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2546803003
2016-12-06Return unique_ptrs from CFX_DIBitmap::Clone().tsepez
Because that's what clone does. Perform immediate release in some spots to avoid disrupting too much at once. Review-Url: https://codereview.chromium.org/2534953004
2016-12-01Remove fpdf_render.cppNicolas Pena
Split the remaining code into files per class. Change-Id: Idb959dbf807223a509e16c76f9626e61856a886b Reviewed-on: https://pdfium-review.googlesource.com/2094 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2016-11-28Add some methods in CPDF_ImageRenderernpm
Made a member private and added some methods to reduce code duplication Review-Url: https://codereview.chromium.org/2531643002
2016-11-23Remove some .release() calls in cpdf_renderstatustsepez
Propagates unique_ptr's back to callers. Review-Url: https://codereview.chromium.org/2518333003
2016-11-23Move CPDF_ImageRenderer from render_intnpm
Review-Url: https://codereview.chromium.org/2525833002
2016-11-22handle antialiased rendering as premultipliedcaryclark
Transparencies and bitmap patterns need to be unpremultiplied after Skia renders them so that PDFium can use its own compositing. Also added some linear (i.e. axial) gradient support, although its unclear if any of the test corpus uses this feature. R=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2520073003
2016-11-21Split fwl/core class pt II.dsinclair
Split classes in FWL to be single class per file. In the case of data providers which added no new methods, removed and used the IFWL_Widget::DataProvider directly. Review-Url: https://codereview.chromium.org/2520063002
2016-11-21Continue splitting up render_intnpm
Moved CPDF_ImageLoader, CPDF_ImageLoaderHandle, and CPDF_TransferFunc Review-Url: https://codereview.chromium.org/2518553002
2016-11-17fix corpus testscaryclark
All corpus tests draw reasonably well. There are pixel differences, but no missing features or large scale errors. This was verified by running run_corpus_tests.py on skiapaths and agg build dirs, then running the skdiff tool to generate a report of the pixel difference. For example, after running $ ninja -C out/skia skdiff $ ./out/skia/skdiff /repo/pdfium/out/agg/gen/pdfium/testing/corpus/ /repo/pdfium/out/skiapaths/gen/pdfium/testing/corpus/ ~/aggskiadiffs view the report in a browser at ~/aggskiadiffs/index.html R=dsinclair@chromium.org BUG=skia:5973 Review-Url: https://codereview.chromium.org/2504863003
2016-11-17Move CPDF_RenderStatus from render_intnpm
Moved CPDF_RenderStatus to its own class and removed unused methods. I only added some spaces and removed some {}s in cpdf_renderstatus.cpp. Will do cleanup of the file as a followup because it would be too hard to keep track of what's changed in this CL. Review-Url: https://codereview.chromium.org/2513693002