summaryrefslogtreecommitdiff
path: root/core/fxge/skia
AgeCommit message (Collapse)Author
2018-01-30Use unsigned for char widthchromium/3335Nicolas Pena
Bug: 806612 Change-Id: I22bd9046dd37a1b596762c46a6b29a323d6e9fa1 Reviewed-on: https://pdfium-review.googlesource.com/24410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-01-30Remove not reachable branch in fxge code.Lei Zhang
BUG=chromium:805881 Change-Id: I5f920649f425d0cfc47c780b36ed70f23cbe1299 Reviewed-on: https://pdfium-review.googlesource.com/24191 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-18Remove more unneeded includes and code from headers.Lei Zhang
Change-Id: I0a07dbc9850bef2184ed35ff04b08385fc1bdd17 Reviewed-on: https://pdfium-review.googlesource.com/22891 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-17Remove fxge/ friend classesDan Sinclair
This CL removes friends from classes in fxge/. Change-Id: I8180004de3ebf818ed4c8d5256a01c33cd2d880e Reviewed-on: https://pdfium-review.googlesource.com/16170 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-27Move CFX_Font definition to cfx_font.hDan Sinclair
This CL moves the CFX_Font definition out of fx_font.h and into cfx_font.h to match the cfx_font.cpp implementation. Change-Id: Icc2fc7463fa4b9d0bec925e80b60a638136a83a1 Reviewed-on: https://pdfium-review.googlesource.com/14951 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2017-09-27Cleanup FX macrosDan Sinclair
This CL renames the FX_OS defines to have _OS_ in their names and drops the _DESKTOP suffix. The FXM defines have been changed to just FX. Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74 Reviewed-on: https://pdfium-review.googlesource.com/14833 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-21Move CFX_UnownedPtr to UnownedPtrDan Sinclair
This CL moves CFX_UnownedPtr to UnownedPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I6d1fa463f365e5cb3aafa8c8a7a5f7eff62ed8e0 Reviewed-on: https://pdfium-review.googlesource.com/14620 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-21Rename CFX_RetainPtr to RetainPtrDan Sinclair
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e Reviewed-on: https://pdfium-review.googlesource.com/14616 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-19Remove unneeded core/fxcodec/fx_codec.h includes.chromium/3220Lei Zhang
Change-Id: I703321108712e8c4a11a8343ecf8b1a8804c1d1a Reviewed-on: https://pdfium-review.googlesource.com/14352 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-31Remove fx_basic.hDan Sinclair
This CL removes the fx_basic.h header and fixes up includes as needed. Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040 Reviewed-on: https://pdfium-review.googlesource.com/12670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-31Split IFX_Pause out of fx_basicDan Sinclair
This CL moves IFX_Pause out to its own class from fx_basic and updates includes as needed. Change-Id: Iebdd183d8c85aa17570f190f1a7d1602c0af3c8b Reviewed-on: https://pdfium-review.googlesource.com/12491 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-21Converted DrawCosmeticLine() to take point objectsJane Liu
Converted CFX_RenderDevice::DrawCosmeticLine() and IFX_RenderDeviceDriver:: DrawCosmeticLine() to take in CFX_PointF objects instead of two coordinates per point. Bug=pdfium:769 Change-Id: I6116e4106a61487184a71e79c1dca3a85e8c7c27 Reviewed-on: https://pdfium-review.googlesource.com/11410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-07-25flush but do not release skia driverCary Clark
Most calls to the Skia Driver combine flushing the draw cache with deleting the driver itself. Progressive drawing needs to flush the cache to keep drawing in order, but the driver must remain for the next progressive draw. R=dsinclair@chromium.org, hnakashima@chromium.org Bug: pdfium:833 Change-Id: I311f80b2dc0ef6e4df9a3a0f082ae076cb7a591f Reviewed-on: https://pdfium-review.googlesource.com/8890 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-07-18colortables are unused, so remove plumbingMike Reed
Bug: Change-Id: Ic40d1fce83b6b13f638c522205a765c20f6ccd50 Reviewed-on: https://pdfium-review.googlesource.com/8090 Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Cary Clark <caryclark@google.com>
2017-07-13fix skiapaths for sparse type1 on macCary Clark
PDFium's native code reverse engineers the glyph code on Mac by taking the character code point, looking up its name in FreeType, and then finding the named glyph's index from CoreGraphics. If the FreeType glyph index and the CoreGraphics index don't match, it uses CoreGraphics' index when drawing. The IDs match except when drawing an embedded Type 1 font tha has been sparsely populated to cut down on the PDF size. R=dsinclair@chromium.org Bug: 738279 Change-Id: I16d993b611afe3b2481b36f886644524c9c351ef Reviewed-on: https://pdfium-review.googlesource.com/7650 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Cary Clark <caryclark@skia.org>
2017-07-13Index_8 no longer supported, upscale to N32Mike Reed
This should unblock the skia-roller Bug:Skia:6828 Change-Id: Id918f017ed69bea9536eb1df8c31d43eac51d680 Reviewed-on: https://pdfium-review.googlesource.com/7730 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
2017-07-12support m_bGlyph_AdjustCary Clark
Skia has no direct match for a different 2x3 matrix per glyph -- if the 2x3 is a square scale with rotation, we can do that with RSX transforms. The bug used the 2x3 to do a condensed face, which we can do with SkPaint::setTextScaleX. Otherwise, we draw a character at a time. R=dsinclair@chromium.org,npm@chromium.org Bug: 736703 Change-Id: I8f14fd63ffdaee886b63d1154b771f9de092a83f Reviewed-on: https://pdfium-review.googlesource.com/7272 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-07-10Move core/fxge/ge to core/fxge.Dan Sinclair
This brings the cpp and h files together and removes the redundant ge/ path. Change-Id: I36594b8ae719d362768ba4c2e4ce173e287363eb Reviewed-on: https://pdfium-review.googlesource.com/7452 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-07-05additional clip debuggingCary Clark
Add debugging for bounding clip boxes Add debugging to dump save count (probably not useful) Make debugging output easier to find R=dsinclair@chromium.org,npm@chromium.org Bug: Change-Id: I4b985b8810c80a3061a11401e26a065d17236604 Reviewed-on: https://pdfium-review.googlesource.com/7278 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Cary Clark <caryclark@google.com>
2017-07-05maintain ClipBoxCary Clark
GetClipBox returned wrong clip bounds Found tracing through looking for other bugs. GetClipBox is used by graphics outside of Skia so it needs to be kept up to date. R=dsinclair@chromium.org,npm@chromium.org Bug: 736703 Change-Id: I2b3fdfe91053848243e5b486a2615a233654c5a9 Reviewed-on: https://pdfium-review.googlesource.com/7274 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Cary Clark <caryclark@google.com>
2017-07-05set clip rectCary Clark
clip rect should mirror existing construction Also found tracing. Keep the clip rect in sync with its expected value for compatibility. R=dsinclair@chromium.org,npm@chromium.org Bug: 736703 Change-Id: I57bab209f5e1febb5fbcd91860b43296063f1f80 Reviewed-on: https://pdfium-review.googlesource.com/7275 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Cary Clark <caryclark@google.com>
2017-07-05show original text to aid in debuggingCary Clark
disabled by default R=dsinclair@chromium.org,npm@chromium.org Bug: Change-Id: Iab08a7120d28b2d81a5e1d4768fd95a460208ebf Reviewed-on: https://pdfium-review.googlesource.com/7277 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Cary Clark <caryclark@google.com>
2017-07-05fix fuzzer generated out of rangeCary Clark
I could not get this to reproduce. It was also reported in April, but I marked it fixed because I couldn't reproduce this then, either. I suspect that the result of LineSide() is +/-inf, causing either minBounds or maxBounds in ClipAngledGradient() to be set to -1, triggering the stack buffer misread. R=dsinclair@chromium.org,npm@chromium.org Bug: 736574 Change-Id: Id828321f8c5481b862822be43d76a41dd8e74ef0 Reviewed-on: https://pdfium-review.googlesource.com/7273 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Cary Clark <caryclark@google.com>
2017-07-05clip save off by oneCary Clark
Code around this bug was altered in April to fix the off by one bug, but somehow the loop counter fix was overlooked. R=dsinclair@chromium.org,npm@chromium.org Bug: 736195 Change-Id: I583a9f2389e6111ae1b847b961afaafd5e854810 Reviewed-on: https://pdfium-review.googlesource.com/7276 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Cary Clark <caryclark@google.com>
2017-06-29Move Start to constructor in CFX_Image(Renderer|Transformer)chromium/3145Nicolas Pena
The bool returned by Start was not being used and the method was always called right after the constructor, so it should be in the constructor. Change-Id: I98abf9f7c11fbe42b3aa15ec5e46731198aa23d5 Reviewed-on: https://pdfium-review.googlesource.com/7151 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-06-23Cleaning up fx_string_testhelpers.Henrique Nakashima
This is unused except for being a pathway for indirect deps. Change-Id: I717290235ccbc59429ad24231033382958e2a086 Reviewed-on: https://pdfium-review.googlesource.com/6910 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-05-25Mass conversion of remaining class members (non-xfa)Tom Sepez
Change-Id: I8365ba80e3395d59a3cf35dbd9d9162e86e712e3 Reviewed-on: https://pdfium-review.googlesource.com/5970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-05-25Break apart the pageint.h file.Dan Sinclair
This CL separates pageint.h and the supporting cpp files into indivudal class files. Change-Id: Idcadce41976a8cd5f0d916e6a5ebbc283fd36527 Reviewed-on: https://pdfium-review.googlesource.com/5930 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-05-23Use NOTREACHED() in more places.Lei Zhang
Change-Id: I88466943171f19259f84add69679741d44c8e123 Reviewed-on: https://pdfium-review.googlesource.com/5551 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-05-19Move CCodec_ModuleMgr ownership to CPDF_ModuleMgr.Lei Zhang
More straight forward than CFX_GEModule owning in and CPDF_ModuleMgr holding a pointer to it. Remove assumptions that the codec modules may return nullptr, and do IWYU. Change-Id: Iba7fc3c7ec223fd6d29a1ab74ed13d35689bc5d5 Reviewed-on: https://pdfium-review.googlesource.com/5654 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-05-17SkPictureRecorder.h includes less, so we have to IWYUchromium/3103Mike Reed
Bug: Change-Id: I294e765916f35ef933142789179a06ffad67fc31 Reviewed-on: https://pdfium-review.googlesource.com/5494 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
2017-05-11Rename render device classesDan Sinclair
This Cl renames the CFX_RenderDevice subclasses to make their usage clearer. Change-Id: Ie820b57df9a3743ce8c6893fb483b398a1f1bdbe Reviewed-on: https://pdfium-review.googlesource.com/5390 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-08Remove default params in CFX_DIBSourceNicolas Pena
Change-Id: I9306afed2747e3b0054adeea1d39916cac47f5c5 Reviewed-on: https://pdfium-review.googlesource.com/5091 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-04-18Clean up unneeded code in agg and skia driverNicolas Pena
- The agg driver never initializes an ICC transform and always uses an alpha_flag equal to 0 in a couple of methods. - The skia driver is not using CFX_Renderer. If it needs it later, we should move it out of fx_agg_driver.cpp into its own file, instead of duplicating the code. Change-Id: Ibd721cf1760270bea3f8f95d6e1e8edbc6ba1792 Reviewed-on: https://pdfium-review.googlesource.com/3952 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-04-12Cache TypeFace instead of FontCary Clark
Skia tracks the font passed so it can use it later to draw. In XFA's case, the font is discarded after Skia sees it, but before it draws with it. Track the TypeFace instead, which remains available across the XFA lifetime. R=dsinclair@chromium.org Bug: 705193 Change-Id: I4fc9fee4a7d96ea25f242975f6c0d10941f5c549 Reviewed-on: https://pdfium-review.googlesource.com/4058 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-04-12No gradient to draw if clip is emptyCary Clark
If a clip with bounds (0, 0, 0, 0) is used to specify the limits of a gradient, the clipping rectangle will be degenerate. Leave the clip empty in this case. R=dsinclair@chromium.org Bug: 705736 Change-Id: I4a5845459c1527f2c643563d6bef4d6dcc6781d3 Reviewed-on: https://pdfium-review.googlesource.com/4071 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Cary Clark <caryclark@google.com>
2017-04-12Clip stack management was off by one.Cary Clark
To help find future bugs, add printf and checking to see that the skia clip stack and the pdfium clip stack are in sync. Bug: 705783,795821 Change-Id: I3ed39cbe2514ab18e5bee6eb363cc2d0f042bff5 Reviewed-on: https://pdfium-review.googlesource.com/4090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-04-07Remove the ICC transform where it is never initialized.Nicolas Pena
- All callers of CFX_DIBitmap methods use nullptr as the ICC Transform. - The CFX_ScanlineCompositor is always initialized with a null ICC transform. Many of its methods call TranslateScanline from the ICC module. This method casts just uses ((CLcmsCmm*)pTransform)->m_hTransform, and this should not be done when pTransform is nullptr. Change-Id: I1b846d1f20699fa017cb9a276be3214eb8fabd4b Reviewed-on: https://pdfium-review.googlesource.com/3931 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-04-04Let CPDF_ImageRenderer own the CFX_ImageRendererNicolas Pena
This CL avoids some void* usage and removes CancelDIBits after making a CPDF_ImageRenderer own its CFX_ImageRenderer. Bug: pdfium:686 Change-Id: Ied205c57a858cc14d8e2c592db3444ed465b2796 Reviewed-on: https://pdfium-review.googlesource.com/3673 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-04-03Drop FXSYS_ from mem methodsDan Sinclair
This Cl drops the FXSYS_ from mem methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I9d5ae905997dbaaec5aa0b2ae4c07358ed9c6236 Reviewed-on: https://pdfium-review.googlesource.com/3613 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-04-03Split fx_dib part 5Nicolas Pena
Move more classes into their own files. Change-Id: Ic505be9e406eafb378235216ea19221ce172f32e Reviewed-on: https://pdfium-review.googlesource.com/3593 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-04-03Fix Skia includesNicolas Pena
Change-Id: I51bdba3e3d48533398618942669cf5ea93bb2f9a Reviewed-on: https://pdfium-review.googlesource.com/3590 Commit-Queue: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-03-28Revert "Revert "Refcount all CFX_DIBSources (and subclasses) all the time.""Tom Sepez
This reverts commit 31b08d4cdaa17d7a03f35e087096a77036af98ec. Re-landing the patch after fixing skia build issue. Change-Id: Ie7039890088b803a6ec5ce365d70f57277459b48 Reviewed-on: https://pdfium-review.googlesource.com/3245 Commit-Queue: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-03-28Revert "Refcount all CFX_DIBSources (and subclasses) all the time."dsinclair
This reverts commit 0004f29bf6ee3c6060a272c79f14993e92e053c7. Reason for revert: Breaks build with skia_paths enabled (which will break the chrome roll). ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:1858:38: error: no member named 'get' in 'CFX_RetainPtr<CFX_DIBitmap>' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:1861:42: error: no member named 'get' in 'CFX_RetainPtr<CFX_DIBitmap>' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:2987:15: error: no viable overloaded '=' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:2991:18: error: no viable overloaded '=' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:2999:17: error: no viable overloaded '=' ../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:3001:43: error: no member named 'GetObject' in 'CFX_RetainPtr<CFX_DIBitmap>' Original change's description: > Refcount all CFX_DIBSources (and subclasses) all the time. > > There are currently several ownership models for these objects, > including ad-hoc logic for sharing and deletion, and the > now-redundant CFX_DIBitmapRef externally-counted handle to the DIBs. > > Replace them all with the internal refcount scheme. > > Change-Id: I2db399dfc19219eda384f94cc989353b78ce2872 > Reviewed-on: https://pdfium-review.googlesource.com/3166 > Reviewed-by: dsinclair <dsinclair@chromium.org> > Commit-Queue: dsinclair <dsinclair@chromium.org> > TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org,pdfium-reviews@googlegroups.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I678b1fbc5e666cf7a19372ebaff3270fb115ba5e Reviewed-on: https://pdfium-review.googlesource.com/3243 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-28Refcount all CFX_DIBSources (and subclasses) all the time.Tom Sepez
There are currently several ownership models for these objects, including ad-hoc logic for sharing and deletion, and the now-redundant CFX_DIBitmapRef externally-counted handle to the DIBs. Replace them all with the internal refcount scheme. Change-Id: I2db399dfc19219eda384f94cc989353b78ce2872 Reviewed-on: https://pdfium-review.googlesource.com/3166 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-27Fix some ASAN issues in fx_skia_deviceNicolas Pena
- Flush is needed in ~CFX_FxgeDevice, otherwise it may be called after deleting the bitmap, when calling the destructor of the skia device driver. - SkDashPathEffect::Make copies the given intervals instead of owning them, so free the input to that method. - If StartDIBits creates a new CFX_ImageRenderer, then the corresponding CancelDIBits needs to delete the handle. Bug: chromium:705131 Change-Id: I22c7c51a4070e73538eb8af51a60afeaa67f8bb7 Reviewed-on: https://pdfium-review.googlesource.com/3230 Commit-Queue: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-03-27fix new tab crash in skia clip stackCary Clark
The crash on the new tab page is triggered by processing a transparency. This creates a new Skia device in CPDF_RenderStatus::LoadSMask(): // cpdf_renderstatus.cpp # 2557 if (!bitmap_device.Create(width, height, format, nullptr)) which sets the Skia clip stack to empty. It then calls RenderObjectList() RenderSingleObject() ProcessClipPath() which resets the clip stack; // cpdf_renderstatus.cpp # 1882 m_LastClipPath = ClipPath; m_pDevice->RestoreState(true); At this point m_LastClipPath contains {m_Ref={m_pObject={m_pObj=empty } } } The impelemntation in CFX_AggDeviceDriver::RestoreState() is // fx_agg_driver.cpp # 1283 if (m_StateStack.empty()) return; This hides unbalanced save/restores, but reworking PDFium to balance is nontrivial. R=dsinclair@chromium.org BUG=chromium:704442 Bug: Change-Id: Ia70d4dd7bd118e40adc5c029acbaa0b66372d3aa Reviewed-on: https://pdfium-review.googlesource.com/3191 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-03-24Fix CFX_FxgeDevice constructor and destructor in SkiaNicolas Pena
Attach and Create methods may be called without _SKIA_SUPPORT_, so the bitmap ownership code can't be if def'd to _SKIA_SUPPORT_. Bug:chromium:704835 Change-Id: If6a7da508156ca3c45898bf101d84dd8295e479f Reviewed-on: https://pdfium-review.googlesource.com/3210 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-03-23fix skia path debugCary Clark
SHOW_SKIA_PATH code had bit-rotted. R=dsinclair@chromium.org BUG= Change-Id: I8961853aa0373fb0a04f829b8e78722197e8f5af Reviewed-on: https://pdfium-review.googlesource.com/3122 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-23Handle the Clip command list being emptyDan Sinclair
If the command list is already empty when we attempt to restore the clip we will access outside the command array. BUG=chromium:704442 Change-Id: Ib7c44e14f0de175f1c10c1a538d16987aa49bf8a Reviewed-on: https://pdfium-review.googlesource.com/3159 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: dsinclair <dsinclair@chromium.org>