summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rw-r--r--core/include/fpdfapi/fpdf_render.h13
-rw-r--r--core/include/fxcodec/DEPS3
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp1
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp7
-rw-r--r--fpdfsdk/DEPS2
-rw-r--r--fpdfsdk/src/fpdf_progressive.cpp11
-rw-r--r--public/DEPS8
-rw-r--r--samples/DEPS2
-rw-r--r--testing/DEPS2
-rw-r--r--third_party/DEPS7
-rw-r--r--third_party/agg23/agg_rasterizer_scanline_aa.cpp1
-rw-r--r--third_party/agg23/agg_rasterizer_scanline_aa.h3
13 files changed, 44 insertions, 18 deletions
diff --git a/DEPS b/DEPS
index 56d303c626..bf1e65b4fb 100644
--- a/DEPS
+++ b/DEPS
@@ -34,6 +34,8 @@ deps_os = {
}
include_rules = [
+ # Basic stuff that everyone can use.
+ # Note: public is not here because core cannot depend on public.
'+testing',
'+third_party/base',
]
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index 3c1d95aa8a..bda5d6d805 100644
--- a/core/include/fpdfapi/fpdf_render.h
+++ b/core/include/fpdfapi/fpdf_render.h
@@ -8,7 +8,6 @@
#define CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
#include "../../../third_party/base/nonstd_unique_ptr.h"
-#include "../../../public/fpdf_progressive.h"
#include "../fxge/fx_ge.h"
#include "fpdf_page.h"
@@ -134,12 +133,14 @@ class CPDF_RenderContext {
class CPDF_ProgressiveRenderer {
public:
- // Must match FDF_RENDER_* definitions in fpdf_progressive.h.
+ // Must match FDF_RENDER_* definitions in public/fpdf_progressive.h, but
+ // cannot #include that header. fpdfsdk/src/fpdf_progressive.cpp has
+ // static_asserts to make sure the two sets of values match.
enum Status {
- Ready = FPDF_RENDER_READER,
- ToBeContinued = FPDF_RENDER_TOBECOUNTINUED,
- Done = FPDF_RENDER_DONE,
- Failed = FPDF_RENDER_FAILED
+ Ready, // FPDF_RENDER_READER,
+ ToBeContinued, // FPDF_RENDER_TOBECOUNTINUED,
+ Done, // FPDF_RENDER_DONE,
+ Failed, // FPDF_RENDER_FAILED
};
static int ToFPDFStatus(Status status) { return static_cast<int>(status); }
diff --git a/core/include/fxcodec/DEPS b/core/include/fxcodec/DEPS
new file mode 100644
index 0000000000..548eb61a3b
--- /dev/null
+++ b/core/include/fxcodec/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ '+third_party/zlib_v128/zlib.h',
+]
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp
index 3da522da4e..bcade63831 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp
@@ -5,7 +5,6 @@
#include <cstring>
#include <string>
-#include "../../../../public/fpdfview.h"
#include "../../../../testing/fx_string_testhelpers.h"
#include "../../../include/fpdfapi/fpdf_parser.h"
#include "../../../include/fxcrt/fx_basic.h"
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index 2aea614226..f6a2158c53 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -2675,18 +2675,13 @@ class CPDF_DataAvail final : public IPDF_DataAvail {
CPDF_DataAvail(IFX_FileAvail* pFileAvail, IFX_FileRead* pFileRead);
~CPDF_DataAvail() override;
+ // IPDF_DataAvail:
FX_BOOL IsDocAvail(IFX_DownloadHints* pHints) override;
-
void SetDocument(CPDF_Document* pDoc) override;
-
FX_BOOL IsPageAvail(int iPage, IFX_DownloadHints* pHints) override;
-
int32_t IsFormAvail(IFX_DownloadHints* pHints) override;
-
int32_t IsLinearizedPDF() override;
-
FX_BOOL IsLinearized() override { return m_bLinearized; }
-
void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos, FX_DWORD* pSize) override;
protected:
diff --git a/fpdfsdk/DEPS b/fpdfsdk/DEPS
index 44beeca888..488a3963c1 100644
--- a/fpdfsdk/DEPS
+++ b/fpdfsdk/DEPS
@@ -1,6 +1,6 @@
include_rules = [
'+core/include',
- '+javascript',
+ '+javascript/IJavaScript.h',
'+public',
'+v8',
'+xfa/include',
diff --git a/fpdfsdk/src/fpdf_progressive.cpp b/fpdfsdk/src/fpdf_progressive.cpp
index b7bed3902c..b125b1cffe 100644
--- a/fpdfsdk/src/fpdf_progressive.cpp
+++ b/fpdfsdk/src/fpdf_progressive.cpp
@@ -9,6 +9,17 @@
#include "../include/fsdk_define.h"
#include "../include/fsdk_rendercontext.h"
+// These checks are here because core/ and public/ cannot depend on each other.
+static_assert(CPDF_ProgressiveRenderer::Ready == FPDF_RENDER_READER,
+ "CPDF_ProgressiveRenderer::Ready value mismatch");
+static_assert(CPDF_ProgressiveRenderer::ToBeContinued ==
+ FPDF_RENDER_TOBECOUNTINUED,
+ "CPDF_ProgressiveRenderer::ToBeContinued value mismatch");
+static_assert(CPDF_ProgressiveRenderer::Done == FPDF_RENDER_DONE,
+ "CPDF_ProgressiveRenderer::Done value mismatch");
+static_assert(CPDF_ProgressiveRenderer::Failed == FPDF_RENDER_FAILED,
+ "CPDF_ProgressiveRenderer::Failed value mismatch");
+
DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap,
FPDF_PAGE page,
int start_x,
diff --git a/public/DEPS b/public/DEPS
new file mode 100644
index 0000000000..d0005cacd6
--- /dev/null
+++ b/public/DEPS
@@ -0,0 +1,8 @@
+include_rules = [
+ # public/ needs to be standalone. Explicitly disallow everything.
+ '-core',
+ '-fpdfsdk',
+ '-testing',
+ '-third_party',
+ '-v8',
+]
diff --git a/samples/DEPS b/samples/DEPS
index bbe39d0293..7bd794e6ef 100644
--- a/samples/DEPS
+++ b/samples/DEPS
@@ -3,4 +3,4 @@ include_rules = [
'+public',
'+third_party/zlib_v128',
'+v8',
-] \ No newline at end of file
+]
diff --git a/testing/DEPS b/testing/DEPS
index 76f3117de1..949e92821f 100644
--- a/testing/DEPS
+++ b/testing/DEPS
@@ -3,4 +3,4 @@ include_rules = [
'+fpdfsdk/include',
'+public',
'+v8',
-] \ No newline at end of file
+]
diff --git a/third_party/DEPS b/third_party/DEPS
new file mode 100644
index 0000000000..0b1a28f808
--- /dev/null
+++ b/third_party/DEPS
@@ -0,0 +1,7 @@
+include_rules = [
+ # A lot of third_party code has been modified to use fxcrt.
+ '+core/include/fxcrt/fx_basic.h',
+ '+core/include/fxcrt/fx_coordinates.h',
+ '+core/include/fxcrt/fx_memory.h',
+ '+core/include/fxcrt/fx_system.h',
+]
diff --git a/third_party/agg23/agg_rasterizer_scanline_aa.cpp b/third_party/agg23/agg_rasterizer_scanline_aa.cpp
index 8216e60221..46379f6dfd 100644
--- a/third_party/agg23/agg_rasterizer_scanline_aa.cpp
+++ b/third_party/agg23/agg_rasterizer_scanline_aa.cpp
@@ -46,7 +46,6 @@
// All other code is very different from the original.
//
//----------------------------------------------------------------------------
-#include "../../core/include/fxcrt/fx_ext.h"
#include <limits.h>
#include "agg_rasterizer_scanline_aa.h"
namespace agg
diff --git a/third_party/agg23/agg_rasterizer_scanline_aa.h b/third_party/agg23/agg_rasterizer_scanline_aa.h
index da1900d0dd..af31e0f2af 100644
--- a/third_party/agg23/agg_rasterizer_scanline_aa.h
+++ b/third_party/agg23/agg_rasterizer_scanline_aa.h
@@ -29,7 +29,8 @@
//----------------------------------------------------------------------------
#ifndef AGG_RASTERIZER_SCANLINE_AA_INCLUDED
#define AGG_RASTERIZER_SCANLINE_AA_INCLUDED
-#include "../../core/include/fxge/fx_ge.h"
+#include "../../core/include/fxcrt/fx_coordinates.h"
+#include "../../core/include/fxcrt/fx_memory.h"
#include "agg_basics.h"
#include "agg_math.h"
#include "agg_array.h"