PDFium interface changed, hence adjust the adapter jni code.

Bug: 27564090
Change-Id: I983398a90438062ecc9c7ebc0ad325777fa8aaff
This commit is contained in:
Philip P. Moltmann
2016-03-07 09:19:45 -08:00
parent ef5577a15d
commit 79bd8d48ad
3 changed files with 6 additions and 7 deletions

View File

@@ -197,9 +197,9 @@ LOCAL_C_INCLUDES += \
$(TOP)/system/media/camera/include \
$(TOP)/system/netd/include \
external/pdfium/core/include/fpdfapi \
external/pdfium/core/include/fpdfdoc \
external/pdfium/fpdfsdk/include \
external/pdfium/public \
external/pdfium \
external/skia/include/private \
external/skia/src/core \
external/skia/src/effects \

View File

@@ -196,7 +196,7 @@ static void nativeSetTransformAndClip(JNIEnv* env, jclass thiz, jlong documentPt
return;
}
CFX_AffineMatrix matrix;
CFX_Matrix matrix;
SkMatrix* skTransform = reinterpret_cast<SkMatrix*>(transformPtr);

View File

@@ -205,11 +205,10 @@ static void renderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int destLeft, i
clip.bottom = destBottom;
fxgeDevice->SetClip_Rect(&clip);
CPDF_RenderContext* pageContext = new CPDF_RenderContext;
CPDF_RenderContext* pageContext = new CPDF_RenderContext(pPage);
pContext->m_pContext = pageContext;
pageContext->Create(pPage);
CFX_AffineMatrix matrix;
CFX_Matrix matrix;
if (!transform) {
pPage->GetDisplayMatrix(matrix, destLeft, destTop, destRight - destLeft,
destBottom - destTop, 0);
@@ -232,8 +231,8 @@ static void renderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int destLeft, i
}
pageContext->AppendObjectList(pPage, &matrix);
pContext->m_pRenderer = new CPDF_ProgressiveRenderer;
pContext->m_pRenderer->Start(pageContext, fxgeDevice, renderOptions, NULL);
pContext->m_pRenderer = new CPDF_ProgressiveRenderer(pageContext, fxgeDevice, renderOptions);
pContext->m_pRenderer->Start(NULL);
fxgeDevice->RestoreState();