summaryrefslogtreecommitdiff
path: root/core/src/fxge/dib/fx_dib_composite.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-22 15:14:14 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-22 15:14:14 -0700
commit3c012fef2bb72c8ec1faa73e11ee35539b2559d6 (patch)
treeb88cb30a45a615b89cdb380f1f62d270ce540fb9 /core/src/fxge/dib/fx_dib_composite.cpp
parent4eb4d7f6c707cc2c23c806aa540d055c8832b55d (diff)
downloadpdfium-3c012fef2bb72c8ec1faa73e11ee35539b2559d6.tar.xz
Re-land else-after-returns
Revert "Revert "Fix else-after-returns throughout pdfium."" This reverts commit 4eb4d7f6c707cc2c23c806aa540d055c8832b55d. Fix one naming conflict. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1243953004 .
Diffstat (limited to 'core/src/fxge/dib/fx_dib_composite.cpp')
-rw-r--r--core/src/fxge/dib/fx_dib_composite.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp
index 19a870ade3..cb99a37ff4 100644
--- a/core/src/fxge/dib/fx_dib_composite.cpp
+++ b/core/src/fxge/dib/fx_dib_composite.cpp
@@ -3938,7 +3938,8 @@ void CFX_ScanlineCompositor::CompositePalBitmapLine(uint8_t* dest_scan, const ui
if (m_SrcFormat == FXDIB_1bppRgb) {
if (m_DestFormat == FXDIB_8bppRgb) {
return;
- } else if(m_DestFormat == FXDIB_Argb) {
+ }
+ if(m_DestFormat == FXDIB_Argb) {
_CompositeRow_1bppRgb2Argb_NoBlend_RgbByteOrder(dest_scan, src_scan, src_left, width, m_pSrcPalette, clip_scan);
} else {
_CompositeRow_1bppRgb2Rgb_NoBlend_RgbByteOrder(dest_scan, src_scan, src_left, m_pSrcPalette, width, (m_DestFormat & 0xff) >> 3, clip_scan);
@@ -3946,7 +3947,8 @@ void CFX_ScanlineCompositor::CompositePalBitmapLine(uint8_t* dest_scan, const ui
} else {
if (m_DestFormat == FXDIB_8bppRgb) {
return;
- } else if (m_DestFormat == FXDIB_Argb) {
+ }
+ if (m_DestFormat == FXDIB_Argb) {
_CompositeRow_8bppRgb2Argb_NoBlend_RgbByteOrder(dest_scan, src_scan, width, m_pSrcPalette, clip_scan);
} else {
_CompositeRow_8bppRgb2Rgb_NoBlend_RgbByteOrder(dest_scan, src_scan, m_pSrcPalette, width, (m_DestFormat & 0xff) >> 3, clip_scan);
@@ -3957,7 +3959,8 @@ void CFX_ScanlineCompositor::CompositePalBitmapLine(uint8_t* dest_scan, const ui
if (m_DestFormat == FXDIB_8bppMask) {
_CompositeRow_Rgb2Mask(dest_scan, src_scan, width, clip_scan);
return;
- } else if ((m_DestFormat & 0xff) == 8) {
+ }
+ if ((m_DestFormat & 0xff) == 8) {
if (m_Transparency & 8) {
if (m_DestFormat & 0x0200) {
_CompositeRow_1bppPal2Graya(dest_scan, src_scan, src_left, (const uint8_t*)m_pSrcPalette, width, m_BlendType, clip_scan, dst_extra_alpha);
@@ -4208,7 +4211,8 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
}
}
return TRUE;
- } else if (m_bpp == 1) {
+ }
+ if (m_bpp == 1) {
ASSERT(!IsCmykImage() && (uint8_t)(alpha_flag >> 8) == 0);
int left_shift = rect.left % 8;
int right_shift = rect.right % 8;