Merge "Update the pdfium library - framework" into mnc-dev
This commit is contained in:
@@ -183,6 +183,7 @@ LOCAL_C_INCLUDES += \
|
|||||||
external/pdfium/core/include/fpdfapi \
|
external/pdfium/core/include/fpdfapi \
|
||||||
external/pdfium/core/include/fpdfdoc \
|
external/pdfium/core/include/fpdfdoc \
|
||||||
external/pdfium/fpdfsdk/include \
|
external/pdfium/fpdfsdk/include \
|
||||||
|
external/pdfium/public \
|
||||||
external/skia/src/core \
|
external/skia/src/core \
|
||||||
external/skia/src/effects \
|
external/skia/src/effects \
|
||||||
external/skia/src/images \
|
external/skia/src/images \
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||||
#include "fpdfview.h"
|
#include "fpdfview.h"
|
||||||
#include "fpdfedit.h"
|
#include "fpdf_edit.h"
|
||||||
#include "fpdfsave.h"
|
#include "fpdf_save.h"
|
||||||
#include "fsdk_rendercontext.h"
|
#include "fsdk_rendercontext.h"
|
||||||
#include "fpdf_transformpage.h"
|
#include "fpdf_transformpage.h"
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
@@ -58,7 +58,7 @@ static int sUnmatchedInitRequestCount = 0;
|
|||||||
static void initializeLibraryIfNeeded() {
|
static void initializeLibraryIfNeeded() {
|
||||||
Mutex::Autolock _l(sLock);
|
Mutex::Autolock _l(sLock);
|
||||||
if (sUnmatchedInitRequestCount == 0) {
|
if (sUnmatchedInitRequestCount == 0) {
|
||||||
FPDF_InitLibrary(NULL);
|
FPDF_InitLibrary();
|
||||||
}
|
}
|
||||||
sUnmatchedInitRequestCount++;
|
sUnmatchedInitRequestCount++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ static int sUnmatchedInitRequestCount = 0;
|
|||||||
static void initializeLibraryIfNeeded() {
|
static void initializeLibraryIfNeeded() {
|
||||||
Mutex::Autolock _l(sLock);
|
Mutex::Autolock _l(sLock);
|
||||||
if (sUnmatchedInitRequestCount == 0) {
|
if (sUnmatchedInitRequestCount == 0) {
|
||||||
FPDF_InitLibrary(NULL);
|
FPDF_InitLibrary();
|
||||||
}
|
}
|
||||||
sUnmatchedInitRequestCount++;
|
sUnmatchedInitRequestCount++;
|
||||||
}
|
}
|
||||||
@@ -165,12 +165,12 @@ static void renderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int destLeft, i
|
|||||||
// and FPDF_ANNOT flags. To add support for that refer to FPDF_RenderPage_Retail
|
// and FPDF_ANNOT flags. To add support for that refer to FPDF_RenderPage_Retail
|
||||||
// in fpdfview.cpp
|
// in fpdfview.cpp
|
||||||
|
|
||||||
CRenderContext* pContext = FX_NEW CRenderContext;
|
CRenderContext* pContext = new CRenderContext;
|
||||||
|
|
||||||
CPDF_Page* pPage = (CPDF_Page*) page;
|
CPDF_Page* pPage = (CPDF_Page*) page;
|
||||||
pPage->SetPrivateData((void*) 1, pContext, DropContext);
|
pPage->SetPrivateData((void*) 1, pContext, DropContext);
|
||||||
|
|
||||||
CFX_FxgeDevice* fxgeDevice = FX_NEW CFX_FxgeDevice;
|
CFX_FxgeDevice* fxgeDevice = new CFX_FxgeDevice;
|
||||||
pContext->m_pDevice = fxgeDevice;
|
pContext->m_pDevice = fxgeDevice;
|
||||||
|
|
||||||
// Reverse the bytes (last argument TRUE) since the Android
|
// Reverse the bytes (last argument TRUE) since the Android
|
||||||
@@ -180,7 +180,7 @@ static void renderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int destLeft, i
|
|||||||
CPDF_RenderOptions* renderOptions = pContext->m_pOptions;
|
CPDF_RenderOptions* renderOptions = pContext->m_pOptions;
|
||||||
|
|
||||||
if (!renderOptions) {
|
if (!renderOptions) {
|
||||||
renderOptions = FX_NEW CPDF_RenderOptions;
|
renderOptions = new CPDF_RenderOptions;
|
||||||
pContext->m_pOptions = renderOptions;
|
pContext->m_pOptions = renderOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ static void renderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int destLeft, i
|
|||||||
clip.bottom = destBottom;
|
clip.bottom = destBottom;
|
||||||
fxgeDevice->SetClip_Rect(&clip);
|
fxgeDevice->SetClip_Rect(&clip);
|
||||||
|
|
||||||
CPDF_RenderContext* pageContext = FX_NEW CPDF_RenderContext;
|
CPDF_RenderContext* pageContext = new CPDF_RenderContext;
|
||||||
pContext->m_pContext = pageContext;
|
pContext->m_pContext = pageContext;
|
||||||
pageContext->Create(pPage);
|
pageContext->Create(pPage);
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ static void renderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int destLeft, i
|
|||||||
}
|
}
|
||||||
pageContext->AppendObjectList(pPage, &matrix);
|
pageContext->AppendObjectList(pPage, &matrix);
|
||||||
|
|
||||||
pContext->m_pRenderer = FX_NEW CPDF_ProgressiveRenderer;
|
pContext->m_pRenderer = new CPDF_ProgressiveRenderer;
|
||||||
pContext->m_pRenderer->Start(pageContext, fxgeDevice, renderOptions, NULL);
|
pContext->m_pRenderer->Start(pageContext, fxgeDevice, renderOptions, NULL);
|
||||||
|
|
||||||
fxgeDevice->RestoreState();
|
fxgeDevice->RestoreState();
|
||||||
|
|||||||
Reference in New Issue
Block a user