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 "public/fpdfview.h" | 7 #include "public/fpdfview.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 pPage->SetRenderContext(pdfium::WrapUnique(pContext)); | 713 pPage->SetRenderContext(pdfium::WrapUnique(pContext)); |
714 CFX_FxgeDevice* pDevice = new CFX_FxgeDevice; | 714 CFX_FxgeDevice* pDevice = new CFX_FxgeDevice; |
715 pContext->m_pDevice.reset(pDevice); | 715 pContext->m_pDevice.reset(pDevice); |
716 CFX_DIBitmap* pBitmap = CFXBitmapFromFPDFBitmap(bitmap); | 716 CFX_DIBitmap* pBitmap = CFXBitmapFromFPDFBitmap(bitmap); |
717 pDevice->Attach(pBitmap, !!(flags & FPDF_REVERSE_BYTE_ORDER), nullptr, false); | 717 pDevice->Attach(pBitmap, !!(flags & FPDF_REVERSE_BYTE_ORDER), nullptr, false); |
718 | 718 |
719 FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y, | 719 FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y, |
720 rotate, flags, true, nullptr); | 720 rotate, flags, true, nullptr); |
721 | 721 |
722 #ifdef _SKIA_SUPPORT_PATHS_ | 722 #ifdef _SKIA_SUPPORT_PATHS_ |
| 723 pDevice->Flush(); |
723 pBitmap->UnPreMultiply(); | 724 pBitmap->UnPreMultiply(); |
724 #endif | 725 #endif |
725 pPage->SetRenderContext(nullptr); | 726 pPage->SetRenderContext(nullptr); |
726 } | 727 } |
727 | 728 |
728 DLLEXPORT void STDCALL FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap, | 729 DLLEXPORT void STDCALL FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap, |
729 FPDF_PAGE page, | 730 FPDF_PAGE page, |
730 const FS_MATRIX* matrix, | 731 const FS_MATRIX* matrix, |
731 const FS_RECTF* clipping, | 732 const FS_RECTF* clipping, |
732 int flags) { | 733 int flags) { |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 if (!buffer) { | 1225 if (!buffer) { |
1225 *buflen = len; | 1226 *buflen = len; |
1226 } else if (len <= *buflen) { | 1227 } else if (len <= *buflen) { |
1227 memcpy(buffer, utf16Name.c_str(), len); | 1228 memcpy(buffer, utf16Name.c_str(), len); |
1228 *buflen = len; | 1229 *buflen = len; |
1229 } else { | 1230 } else { |
1230 *buflen = -1; | 1231 *buflen = -1; |
1231 } | 1232 } |
1232 return (FPDF_DEST)pDestObj; | 1233 return (FPDF_DEST)pDestObj; |
1233 } | 1234 } |
OLD | NEW |