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

Side by Side Diff: core/src/fxge/win32/fx_win32_gdipext.cpp

Issue 1239313005: Merge to XFA - else after returns. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix issues. Created 5 years, 5 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/fxge/win32/fx_win32_dwrite.cpp ('k') | core/src/fxge/win32/fx_win32_print.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 "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
9 #include <windows.h> 9 #include <windows.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 CFX_ByteTextBuf m_InterStream; 1006 CFX_ByteTextBuf m_InterStream;
1007 public: 1007 public:
1008 GpStream() 1008 GpStream()
1009 { 1009 {
1010 m_RefCount = 1; 1010 m_RefCount = 1;
1011 m_ReadPos = 0; 1011 m_ReadPos = 0;
1012 } 1012 }
1013 virtual HRESULT STDMETHODCALLTYPE 1013 virtual HRESULT STDMETHODCALLTYPE
1014 QueryInterface(REFIID iid, void ** ppvObject) 1014 QueryInterface(REFIID iid, void ** ppvObject)
1015 { 1015 {
1016 if (iid == __uuidof(IUnknown) || iid == __uuidof(IStream) || 1016 if (iid == __uuidof(IUnknown) ||
1017 iid == __uuidof(ISequentialStream))» { 1017 iid == __uuidof(IStream) ||
1018 iid == __uuidof(ISequentialStream))»{
1018 *ppvObject = static_cast<IStream*>(this); 1019 *ppvObject = static_cast<IStream*>(this);
1019 AddRef(); 1020 AddRef();
1020 return S_OK; 1021 return S_OK;
1021 } else {
1022 return E_NOINTERFACE;
1023 } 1022 }
1023 return E_NOINTERFACE;
1024 } 1024 }
1025 virtual ULONG STDMETHODCALLTYPE AddRef(void) 1025 virtual ULONG STDMETHODCALLTYPE AddRef(void)
1026 { 1026 {
1027 return (ULONG)InterlockedIncrement(&m_RefCount); 1027 return (ULONG)InterlockedIncrement(&m_RefCount);
1028 } 1028 }
1029 virtual ULONG STDMETHODCALLTYPE Release(void) 1029 virtual ULONG STDMETHODCALLTYPE Release(void)
1030 { 1030 {
1031 ULONG res = (ULONG) InterlockedDecrement(&m_RefCount); 1031 ULONG res = (ULONG) InterlockedDecrement(&m_RefCount);
1032 if (res == 0) { 1032 if (res == 0) {
1033 delete this; 1033 delete this;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 for (int i = 0; i < height; i ++) { 1252 for (int i = 0; i < height; i ++) {
1253 FXSYS_memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i, dest_pitch); 1253 FXSYS_memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i, dest_pitch);
1254 } 1254 }
1255 } 1255 }
1256 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf(pInfo->pbmi, pData, pIn fo->pbmi->bmiHeader.biBitCount == 32); 1256 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf(pInfo->pbmi, pData, pIn fo->pbmi->bmiHeader.biBitCount == 32);
1257 FX_Free(pData); 1257 FX_Free(pData);
1258 FreeDIBitmap(pInfo); 1258 FreeDIBitmap(pInfo);
1259 return pDIBitmap; 1259 return pDIBitmap;
1260 } 1260 }
1261 #endif 1261 #endif
OLDNEW
« no previous file with comments | « core/src/fxge/win32/fx_win32_dwrite.cpp ('k') | core/src/fxge/win32/fx_win32_print.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698