diff options
author | tsepez <tsepez@chromium.org> | 2016-08-30 10:32:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-30 10:32:36 -0700 |
commit | fbda17d61de1e02799f5d77dceb23df3688b764e (patch) | |
tree | ad15940f6c9bf31ca390a711636981ecd0e52ff6 /core/fxge/ge/cfx_cliprgn.cpp | |
parent | f7252a074ed013e2ad3cc11e08eba90502262ce0 (diff) | |
download | pdfium-fbda17d61de1e02799f5d77dceb23df3688b764e.tar.xz |
Make CPDF_TextState have a CPDF_TextStateData rather than inheriting one.
Review-Url: https://codereview.chromium.org/2287313004
Diffstat (limited to 'core/fxge/ge/cfx_cliprgn.cpp')
-rw-r--r-- | core/fxge/ge/cfx_cliprgn.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/core/fxge/ge/cfx_cliprgn.cpp b/core/fxge/ge/cfx_cliprgn.cpp index 41975e4b84..ba2605aeca 100644 --- a/core/fxge/ge/cfx_cliprgn.cpp +++ b/core/fxge/ge/cfx_cliprgn.cpp @@ -49,9 +49,7 @@ void CFX_ClipRgn::IntersectMaskRect(FX_RECT rect, m_Mask = Mask; return; } - CFX_DIBitmap* new_dib = m_Mask.New(); - if (!new_dib) - return; + CFX_DIBitmap* new_dib = m_Mask.Emplace(); new_dib->Create(m_Box.Width(), m_Box.Height(), FXDIB_8bppMask); for (int row = m_Box.top; row < m_Box.bottom; row++) { uint8_t* dest_scan = @@ -82,9 +80,7 @@ void CFX_ClipRgn::IntersectMaskF(int left, int top, CFX_DIBitmapRef Mask) { return; } CFX_DIBitmapRef new_mask; - CFX_DIBitmap* new_dib = new_mask.New(); - if (!new_dib) - return; + CFX_DIBitmap* new_dib = new_mask.Emplace(); new_dib->Create(new_box.Width(), new_box.Height(), FXDIB_8bppMask); const CFX_DIBitmap* old_dib = m_Mask.GetObject(); for (int row = new_box.top; row < new_box.bottom; row++) { |