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

Side by Side Diff: fpdfsdk/fpdfformfill.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 | « core/fxge/skia/fx_skia_device.cpp ('k') | fpdfsdk/fpdfview.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 "public/fpdf_formfill.h" 7 #include "public/fpdf_formfill.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 options.m_pOCContext = new CPDF_OCContext(pPDFDoc, CPDF_OCContext::View); 130 options.m_pOCContext = new CPDF_OCContext(pPDFDoc, CPDF_OCContext::View);
131 if (CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true)) 131 if (CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true))
132 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip); 132 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip);
133 #else // PDF_ENABLE_XFA 133 #else // PDF_ENABLE_XFA
134 options.m_pOCContext = 134 options.m_pOCContext =
135 new CPDF_OCContext(pPage->m_pDocument, CPDF_OCContext::View); 135 new CPDF_OCContext(pPage->m_pDocument, CPDF_OCContext::View);
136 if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, pPage)) 136 if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, pPage))
137 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options); 137 pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options);
138 #endif // PDF_ENABLE_XFA 138 #endif // PDF_ENABLE_XFA
139 139
140 #ifdef _SKIA_SUPPORT_PATHS 140 pDevice->RestoreState(false);
141 #ifdef _SKIA_SUPPORT_PATHS_
142 pDevice->Flush();
141 CFXBitmapFromFPDFBitmap(bitmap)->UnPreMultiply(); 143 CFXBitmapFromFPDFBitmap(bitmap)->UnPreMultiply();
142 #endif 144 #endif
143 pDevice->RestoreState(false);
144 delete options.m_pOCContext; 145 delete options.m_pOCContext;
145 options.m_pOCContext = nullptr; 146 options.m_pOCContext = nullptr;
146 } 147 }
147 148
148 } // namespace 149 } // namespace
149 150
150 DLLEXPORT int STDCALL FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, 151 DLLEXPORT int STDCALL FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
151 FPDF_PAGE page, 152 FPDF_PAGE page,
152 double page_x, 153 double page_x,
153 double page_y) { 154 double page_y) {
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 pFormFillEnv); 746 pFormFillEnv);
746 } 747 }
747 } else { 748 } else {
748 if (aa.ActionExist(CPDF_AAction::ClosePage)) { 749 if (aa.ActionExist(CPDF_AAction::ClosePage)) {
749 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); 750 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage);
750 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, 751 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage,
751 pFormFillEnv); 752 pFormFillEnv);
752 } 753 }
753 } 754 }
754 } 755 }
OLDNEW
« no previous file with comments | « core/fxge/skia/fx_skia_device.cpp ('k') | fpdfsdk/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698