diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-08-10 15:13:19 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-10 15:13:33 +0000 |
commit | 7e805d1a6f3bf7ddd04b2c1ce857a2cf6d9ff873 (patch) | |
tree | 0aab30fc879ea390d3f3351dafc5511e16ddedc0 /fpdfsdk/fpdfeditpath.cpp | |
parent | e6c67cd64a80bd67c587ad3ffb380fe1b7574d1f (diff) | |
download | pdfium-7e805d1a6f3bf7ddd04b2c1ce857a2cf6d9ff873.tar.xz |
Revert "Add a build target and a proper export header for shared library builds."
This reverts commit 00334675c18a0203f313cceb670c970a77280f49.
Reason for revert: Breaking the deps roller - https://chromium-review.googlesource.com/c/609307
Original change's description:
> Add a build target and a proper export header for shared library builds.
>
> This CL adds support for Chromium's component build feature to pdfium.
>
> The export header stub in fpdfview.h is expanded to match Chromium's
> export mechanisms and patterns (fixes pdfium:825).
>
> A component/shared library build can be triggered by adding
>
> is_component_build = true
>
> as a gn argument. Please note that setting this will also affect some
> of pdfiums dependencies like v8, which will be build as components
> too.
>
> Additionally, this CL provides a "pdf_source_set" template which
> dynamically enables the use of "source_set" when building a complete
> static library or a shared library to reduce build time.
>
> When testing this it is recommended to only build the pdfium target as
> most of pdfiums test rely on non-public functions which aren't exported
> by the shared library.
>
> Bug: pdfium:825,pdfium:826
> Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752
> Reviewed-on: https://pdfium-review.googlesource.com/8970
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: dsinclair <dsinclair@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org,brucedawson@chromium.org,dsinclair@google.com,dsinclair@chromium.org,licorn@gmail.com
Change-Id: Ib02af2298932481293f50d362ae87bfedf284821
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:825, pdfium:826
Reviewed-on: https://pdfium-review.googlesource.com/10550
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfeditpath.cpp')
-rw-r--r-- | fpdfsdk/fpdfeditpath.cpp | 98 |
1 files changed, 47 insertions, 51 deletions
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp index 19d47e6a44..2181df8406 100644 --- a/fpdfsdk/fpdfeditpath.cpp +++ b/fpdfsdk/fpdfeditpath.cpp @@ -26,30 +26,28 @@ static_assert(CFX_GraphStateData::LineJoinRound == FPDF_LINEJOIN_ROUND, static_assert(CFX_GraphStateData::LineJoinBevel == FPDF_LINEJOIN_BEVEL, "CFX_GraphStateData::LineJoinBevel value mismatch"); -FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPageObj_CreateNewPath(float x, - float y) { +DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewPath(float x, float y) { auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>(); pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::MoveTo, false); pPathObj->DefaultStates(); return pPathObj.release(); // Caller takes ownership. } -FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPageObj_CreateNewRect(float x, - float y, - float w, - float h) { +DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewRect(float x, + float y, + float w, + float h) { auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>(); pPathObj->m_Path.AppendRect(x, y, x + w, y + h); pPathObj->DefaultStates(); return pPathObj.release(); // Caller takes ownership. } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV -FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path, - unsigned int R, - unsigned int G, - unsigned int B, - unsigned int A) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path, + unsigned int R, + unsigned int G, + unsigned int B, + unsigned int A) { if (!path || R > 255 || G > 255 || B > 255 || A > 255) return false; @@ -62,12 +60,11 @@ FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path, return true; } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV -FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path, - unsigned int* R, - unsigned int* G, - unsigned int* B, - unsigned int* A) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path, + unsigned int* R, + unsigned int* G, + unsigned int* B, + unsigned int* A) { if (!path || !R || !G || !B || !A) return false; @@ -81,8 +78,8 @@ FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path, return true; } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV -FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, + float width) { if (!path || width < 0.0f) return false; @@ -92,19 +89,19 @@ FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) { return true; } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetFillColor(FPDF_PAGEOBJECT path, - unsigned int R, - unsigned int G, - unsigned int B, - unsigned int A) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetFillColor(FPDF_PAGEOBJECT path, + unsigned int R, + unsigned int G, + unsigned int B, + unsigned int A) { return FPDFPageObj_SetFillColor(path, R, G, B, A); } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path, - unsigned int* R, - unsigned int* G, - unsigned int* B, - unsigned int* A) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetFillColor(FPDF_PAGEOBJECT path, + unsigned int* R, + unsigned int* G, + unsigned int* B, + unsigned int* A) { if (!path || !R || !G || !B || !A) return false; @@ -118,9 +115,9 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path, return true; } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_MoveTo(FPDF_PAGEOBJECT path, - float x, - float y) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_MoveTo(FPDF_PAGEOBJECT path, + float x, + float y) { if (!path) return false; @@ -130,9 +127,9 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_MoveTo(FPDF_PAGEOBJECT path, return true; } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_LineTo(FPDF_PAGEOBJECT path, - float x, - float y) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_LineTo(FPDF_PAGEOBJECT path, + float x, + float y) { if (!path) return false; @@ -142,13 +139,13 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_LineTo(FPDF_PAGEOBJECT path, return true; } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_BezierTo(FPDF_PAGEOBJECT path, - float x1, - float y1, - float x2, - float y2, - float x3, - float y3) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_BezierTo(FPDF_PAGEOBJECT path, + float x1, + float y1, + float x2, + float y2, + float x3, + float y3) { if (!path) return false; @@ -160,7 +157,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_BezierTo(FPDF_PAGEOBJECT path, return true; } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_Close(FPDF_PAGEOBJECT path) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_Close(FPDF_PAGEOBJECT path) { if (!path) return false; @@ -173,9 +170,9 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_Close(FPDF_PAGEOBJECT path) { return true; } -FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path, - int fillmode, - FPDF_BOOL stroke) { +DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path, + int fillmode, + FPDF_BOOL stroke) { if (!path) return false; @@ -192,8 +189,8 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path, return true; } -FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path, - int line_join) { +DLLEXPORT void STDCALL FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path, + int line_join) { if (!path) return; if (line_join < @@ -209,8 +206,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path, pPathObj->SetDirty(true); } -FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineCap(FPDF_PAGEOBJECT path, - int line_cap) { +DLLEXPORT void STDCALL FPDFPath_SetLineCap(FPDF_PAGEOBJECT path, int line_cap) { if (!path) return; if (line_cap < static_cast<int>(CFX_GraphStateData::LineCap::LineCapButt) || |