Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2400)

Side by Side Diff: core/fxge/agg/fx_agg_driver.cpp

Issue 1968273002: Clean up CFX_ImageStretcher. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: More Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | core/fxge/dib/fx_dib_engine.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxge/agg/fx_agg_driver.h" 7 #include "core/fxge/agg/fx_agg_driver.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 FX_RECT dest_rect(dest_left, dest_top, dest_left + dest_width, 1747 FX_RECT dest_rect(dest_left, dest_top, dest_left + dest_width,
1748 dest_top + dest_height); 1748 dest_top + dest_height);
1749 dest_rect.Normalize(); 1749 dest_rect.Normalize();
1750 FX_RECT dest_clip = dest_rect; 1750 FX_RECT dest_clip = dest_rect;
1751 dest_clip.Intersect(*pClipRect); 1751 dest_clip.Intersect(*pClipRect);
1752 CFX_BitmapComposer composer; 1752 CFX_BitmapComposer composer;
1753 composer.Compose(m_pBitmap, m_pClipRgn, 255, argb, dest_clip, FALSE, FALSE, 1753 composer.Compose(m_pBitmap, m_pClipRgn, 255, argb, dest_clip, FALSE, FALSE,
1754 FALSE, m_bRgbByteOrder, alpha_flag, pIccTransform, 1754 FALSE, m_bRgbByteOrder, alpha_flag, pIccTransform,
1755 blend_type); 1755 blend_type);
1756 dest_clip.Offset(-dest_rect.left, -dest_rect.top); 1756 dest_clip.Offset(-dest_rect.left, -dest_rect.top);
1757 CFX_ImageStretcher stretcher; 1757 CFX_ImageStretcher stretcher(&composer, pSource, dest_width, dest_height,
1758 if (stretcher.Start(&composer, pSource, dest_width, dest_height, dest_clip, 1758 dest_clip, flags);
1759 flags)) { 1759 if (stretcher.Start())
1760 stretcher.Continue(NULL); 1760 stretcher.Continue(nullptr);
1761 }
1762 return TRUE; 1761 return TRUE;
1763 } 1762 }
1764 1763
1765 FX_BOOL CFX_AggDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, 1764 FX_BOOL CFX_AggDeviceDriver::StartDIBits(const CFX_DIBSource* pSource,
1766 int bitmap_alpha, 1765 int bitmap_alpha,
1767 uint32_t argb, 1766 uint32_t argb,
1768 const CFX_Matrix* pMatrix, 1767 const CFX_Matrix* pMatrix,
1769 uint32_t render_flags, 1768 uint32_t render_flags,
1770 void*& handle, 1769 void*& handle,
1771 int alpha_flag, 1770 int alpha_flag,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 new CFX_AggDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE); 1829 new CFX_AggDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE);
1831 SetDeviceDriver(pDriver); 1830 SetDeviceDriver(pDriver);
1832 return true; 1831 return true;
1833 } 1832 }
1834 1833
1835 CFX_FxgeDevice::~CFX_FxgeDevice() { 1834 CFX_FxgeDevice::~CFX_FxgeDevice() {
1836 if (m_bOwnedBitmap) { 1835 if (m_bOwnedBitmap) {
1837 delete GetBitmap(); 1836 delete GetBitmap();
1838 } 1837 }
1839 } 1838 }
OLDNEW
« no previous file with comments | « no previous file | core/fxge/dib/fx_dib_engine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698