PDFium interface changed, hence adjust the adapter jni code.
Bug: 27564090
Change-Id: I983398a90438062ecc9c7ebc0ad325777fa8aaff
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index c6db0ed..b82ac0a 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -197,9 +197,9 @@
$(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 \
diff --git a/core/jni/android/graphics/pdf/PdfEditor.cpp b/core/jni/android/graphics/pdf/PdfEditor.cpp
index 0177635..2c840bd 100644
--- a/core/jni/android/graphics/pdf/PdfEditor.cpp
+++ b/core/jni/android/graphics/pdf/PdfEditor.cpp
@@ -196,7 +196,7 @@
return;
}
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
SkMatrix* skTransform = reinterpret_cast<SkMatrix*>(transformPtr);
diff --git a/core/jni/android/graphics/pdf/PdfRenderer.cpp b/core/jni/android/graphics/pdf/PdfRenderer.cpp
index 6ddfacf..27f3493 100644
--- a/core/jni/android/graphics/pdf/PdfRenderer.cpp
+++ b/core/jni/android/graphics/pdf/PdfRenderer.cpp
@@ -205,11 +205,10 @@
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 @@
}
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();