| OLD | NEW | 
|     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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1003     CFX_ByteTextBuf     m_InterStream; |  1003     CFX_ByteTextBuf     m_InterStream; | 
|  1004 public: |  1004 public: | 
|  1005     GpStream() |  1005     GpStream() | 
|  1006     { |  1006     { | 
|  1007         m_RefCount = 1; |  1007         m_RefCount = 1; | 
|  1008         m_ReadPos = 0; |  1008         m_ReadPos = 0; | 
|  1009     } |  1009     } | 
|  1010     virtual HRESULT STDMETHODCALLTYPE |  1010     virtual HRESULT STDMETHODCALLTYPE | 
|  1011     QueryInterface(REFIID iid, void ** ppvObject) |  1011     QueryInterface(REFIID iid, void ** ppvObject) | 
|  1012     { |  1012     { | 
|  1013         if (iid == __uuidof(IUnknown) || iid == __uuidof(IStream) || |  1013         if (iid == __uuidof(IUnknown) || | 
|  1014                 iid == __uuidof(ISequentialStream))»    { |  1014             iid == __uuidof(IStream) || | 
 |  1015             iid == __uuidof(ISequentialStream))»{ | 
|  1015             *ppvObject = static_cast<IStream*>(this); |  1016             *ppvObject = static_cast<IStream*>(this); | 
|  1016             AddRef(); |  1017             AddRef(); | 
|  1017             return S_OK; |  1018             return S_OK; | 
|  1018         } else { |  | 
|  1019             return E_NOINTERFACE; |  | 
|  1020         } |  1019         } | 
 |  1020         return E_NOINTERFACE; | 
|  1021     } |  1021     } | 
|  1022     virtual ULONG STDMETHODCALLTYPE AddRef(void) |  1022     virtual ULONG STDMETHODCALLTYPE AddRef(void) | 
|  1023     { |  1023     { | 
|  1024         return (ULONG)InterlockedIncrement(&m_RefCount); |  1024         return (ULONG)InterlockedIncrement(&m_RefCount); | 
|  1025     } |  1025     } | 
|  1026     virtual ULONG STDMETHODCALLTYPE Release(void) |  1026     virtual ULONG STDMETHODCALLTYPE Release(void) | 
|  1027     { |  1027     { | 
|  1028         ULONG res = (ULONG) InterlockedDecrement(&m_RefCount); |  1028         ULONG res = (ULONG) InterlockedDecrement(&m_RefCount); | 
|  1029         if (res == 0) { |  1029         if (res == 0) { | 
|  1030             delete this; |  1030             delete this; | 
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1246         for (int i = 0; i < height; i ++) { |  1246         for (int i = 0; i < height; i ++) { | 
|  1247             FXSYS_memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride *
       i, dest_pitch); |  1247             FXSYS_memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride *
       i, dest_pitch); | 
|  1248         } |  1248         } | 
|  1249     } |  1249     } | 
|  1250     CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf(pInfo->pbmi, pData, pIn
      fo->pbmi->bmiHeader.biBitCount == 32); |  1250     CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf(pInfo->pbmi, pData, pIn
      fo->pbmi->bmiHeader.biBitCount == 32); | 
|  1251     FX_Free(pData); |  1251     FX_Free(pData); | 
|  1252     FreeDIBitmap(pInfo); |  1252     FreeDIBitmap(pInfo); | 
|  1253     return pDIBitmap; |  1253     return pDIBitmap; | 
|  1254 } |  1254 } | 
|  1255 #endif |  1255 #endif | 
| OLD | NEW |