Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79bd8d48 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

PDFium interface changed, hence adjust the adapter jni code.

Bug: 27564090
Change-Id: I983398a90438062ecc9c7ebc0ad325777fa8aaff
parent ef5577a1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 \
+1 −1
Original line number Diff line number Diff line
@@ -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);

+4 −5
Original line number Diff line number Diff line
@@ -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();