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

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

Issue 1783023002: Re-enable MSVC warning 4800 for compiling with chromium_code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove cast change on security_handler file Created 4 years, 9 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 | « core/src/fxcrt/fx_basic_wstring.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.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/src/fxge/agg/fx_agg_driver.h" 7 #include "core/src/fxge/agg/fx_agg_driver.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 if (!m_pBitmap->GetBuffer()) { 1792 if (!m_pBitmap->GetBuffer()) {
1793 return; 1793 return;
1794 } 1794 }
1795 delete (CFX_ImageRenderer*)pHandle; 1795 delete (CFX_ImageRenderer*)pHandle;
1796 } 1796 }
1797 1797
1798 CFX_FxgeDevice::CFX_FxgeDevice() { 1798 CFX_FxgeDevice::CFX_FxgeDevice() {
1799 m_bOwnedBitmap = FALSE; 1799 m_bOwnedBitmap = FALSE;
1800 } 1800 }
1801 1801
1802 FX_BOOL CFX_FxgeDevice::Attach(CFX_DIBitmap* pBitmap, 1802 bool CFX_FxgeDevice::Attach(CFX_DIBitmap* pBitmap,
1803 int dither_bits, 1803 int dither_bits,
1804 FX_BOOL bRgbByteOrder, 1804 bool bRgbByteOrder,
1805 CFX_DIBitmap* pOriDevice, 1805 CFX_DIBitmap* pOriDevice,
1806 FX_BOOL bGroupKnockout) { 1806 bool bGroupKnockout) {
1807 if (!pBitmap) { 1807 if (!pBitmap) {
1808 return FALSE; 1808 return false;
1809 } 1809 }
1810 SetBitmap(pBitmap); 1810 SetBitmap(pBitmap);
1811 IFX_RenderDeviceDriver* pDriver = new CFX_AggDeviceDriver( 1811 IFX_RenderDeviceDriver* pDriver = new CFX_AggDeviceDriver(
1812 pBitmap, dither_bits, bRgbByteOrder, pOriDevice, bGroupKnockout); 1812 pBitmap, dither_bits, bRgbByteOrder, pOriDevice, bGroupKnockout);
1813 SetDeviceDriver(pDriver); 1813 SetDeviceDriver(pDriver);
1814 return TRUE; 1814 return true;
1815 } 1815 }
1816 1816
1817 FX_BOOL CFX_FxgeDevice::Create(int width, 1817 bool CFX_FxgeDevice::Create(int width,
1818 int height, 1818 int height,
1819 FXDIB_Format format, 1819 FXDIB_Format format,
1820 int dither_bits, 1820 int dither_bits,
1821 CFX_DIBitmap* pOriDevice) { 1821 CFX_DIBitmap* pOriDevice) {
1822 m_bOwnedBitmap = TRUE; 1822 m_bOwnedBitmap = true;
1823 CFX_DIBitmap* pBitmap = new CFX_DIBitmap; 1823 CFX_DIBitmap* pBitmap = new CFX_DIBitmap;
1824 if (!pBitmap->Create(width, height, format)) { 1824 if (!pBitmap->Create(width, height, format)) {
1825 delete pBitmap; 1825 delete pBitmap;
1826 return FALSE; 1826 return false;
1827 } 1827 }
1828 SetBitmap(pBitmap); 1828 SetBitmap(pBitmap);
1829 IFX_RenderDeviceDriver* pDriver = 1829 IFX_RenderDeviceDriver* pDriver =
1830 new CFX_AggDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE); 1830 new CFX_AggDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE);
1831 SetDeviceDriver(pDriver); 1831 SetDeviceDriver(pDriver);
1832 return TRUE; 1832 return true;
1833 } 1833 }
1834 1834
1835 CFX_FxgeDevice::~CFX_FxgeDevice() { 1835 CFX_FxgeDevice::~CFX_FxgeDevice() {
1836 if (m_bOwnedBitmap) { 1836 if (m_bOwnedBitmap) {
1837 delete GetBitmap(); 1837 delete GetBitmap();
1838 } 1838 }
1839 } 1839 }
OLDNEW
« no previous file with comments | « core/src/fxcrt/fx_basic_wstring.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698