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

Side by Side Diff: fpdfsdk/fpdfview.cpp

Issue 2546803003: re-enable skia caching (Closed)
Patch Set: remove nullptr Created 4 years 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 | « fpdfsdk/fpdfformfill.cpp ('k') | no next file » | 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 "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
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
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 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfformfill.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698