summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-25 17:30:58 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-25 17:30:58 +0000
commit86a7af323dcdc0fd40e89f9c54371b17e0482ede (patch)
tree8fd5d861677542ad4723759f003201ec60337173 /core
parentecf14f7caac3b5d79a3cc36b30d7bb97aabbb062 (diff)
downloadpdfium-86a7af323dcdc0fd40e89f9c54371b17e0482ede.tar.xz
Initialize SkiaState members where declared.
Change-Id: I7bd85d2559bf30ccae3c8595cc37e613d4d4a2a2 Reviewed-on: https://pdfium-review.googlesource.com/c/44550 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp53
1 files changed, 16 insertions, 37 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 6e90c29f99..ce9bb4240c 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -687,28 +687,7 @@ class SkiaState {
};
// mark all cached state as uninitialized
- explicit SkiaState(CFX_SkiaDeviceDriver* pDriver)
- : m_pDriver(pDriver),
- m_pTypeFace(nullptr),
- m_fontSize(0),
- m_scaleX(0),
- m_fillColor(0),
- m_strokeColor(0),
- m_blendType(0),
- m_commandIndex(0),
- m_drawIndex(INT_MAX),
- m_clipIndex(0),
- m_type(Accumulator::kNone),
- m_fillFullCover(false),
- m_fillPath(false),
- m_groupKnockout(false),
- m_debugDisable(false)
-#if SHOW_SKIA_PATH
- ,
- m_debugSaveCounter(0)
-#endif
- {
- }
+ explicit SkiaState(CFX_SkiaDeviceDriver* pDriver) : m_pDriver(pDriver) {}
bool DrawPath(const CFX_PathData* pPathData,
const CFX_Matrix* pMatrix,
@@ -1406,24 +1385,24 @@ class SkiaState {
CFX_GraphStateData m_clipState;
CFX_GraphStateData m_drawState;
CFX_Matrix m_clipMatrix;
- UnownedPtr<CFX_SkiaDeviceDriver> m_pDriver;
+ UnownedPtr<CFX_SkiaDeviceDriver> const m_pDriver;
UnownedPtr<CFX_TypeFace> m_pTypeFace;
- float m_fontSize;
- float m_scaleX;
- uint32_t m_fillColor;
- uint32_t m_strokeColor;
- int m_blendType;
- int m_commandIndex; // active position in clip command stack
- int m_drawIndex; // position of the pending path or text draw
- int m_clipIndex; // position reflecting depth of canvas clip stacck
- Accumulator m_type; // type of pending draw
- bool m_fillFullCover;
- bool m_fillPath;
- bool m_groupKnockout;
- bool m_debugDisable; // turn off cache for debugging
+ float m_fontSize = 0;
+ float m_scaleX = 0;
+ uint32_t m_fillColor = 0;
+ uint32_t m_strokeColor = 0;
+ int m_blendType = FXDIB_BLEND_NORMAL;
+ int m_commandIndex = 0; // active position in clip command stack
+ int m_drawIndex = INT_MAX; // position of the pending path or text draw
+ int m_clipIndex = 0; // position reflecting depth of canvas clip stacck
+ Accumulator m_type = Accumulator::kNone; // type of pending draw
+ bool m_fillFullCover = false;
+ bool m_fillPath = false;
+ bool m_groupKnockout = false;
+ bool m_debugDisable = false; // turn off cache for debugging
#if SHOW_SKIA_PATH
public:
- mutable int m_debugSaveCounter;
+ mutable int m_debugSaveCounter = 0;
static int m_debugInitCounter;
#endif
};