Move headers used by headers in include/ to include/private.
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h
used by (public) SkPictureRecorder.h.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/a89f55198bdc58f0b6f6196907ab25a6afc1a661
Review URL: https://codereview.chromium.org/1217293004
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 5599c31..04ed2e0 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -279,8 +279,10 @@
affected_file_path = affected_file.LocalPath()
file_path, file_ext = os.path.splitext(affected_file_path)
# We only care about files that end in .h and are under the top-level
- # include dir.
- if file_ext == '.h' and 'include' == file_path.split(os.path.sep)[0]:
+ # include dir, but not include/private.
+ if (file_ext == '.h' and
+ 'include' == file_path.split(os.path.sep)[0] and
+ 'private' not in file_path):
requires_owner_check = True
if not requires_owner_check:
@@ -328,8 +330,12 @@
if not lgtm_from_owner:
results.append(
output_api.PresubmitError(
- 'Since the CL is editing public API, you must have an LGTM from '
- 'one of: %s' % str(PUBLIC_API_OWNERS)))
+ "If this CL adds to or changes Skia's public API, you need an LGTM "
+ "from any of %s. If this CL only removes from or doesn't change "
+ "Skia's public API, please add a short note to your CL saying so "
+ "and add one of those reviewers on a TBR= line. If you don't know "
+ "this CL affects Skia's public API, please treat it like it does."
+ % str(PUBLIC_API_OWNERS)))
return results
diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp
index 7ccda93..d0c0876 100644
--- a/gyp/SampleApp.gyp
+++ b/gyp/SampleApp.gyp
@@ -16,6 +16,7 @@
'target_name': 'SampleApp',
'type': 'executable',
'include_dirs' : [
+ '../include/private',
'../src/core',
'../src/effects', #needed for BlurMask.h
'../src/gpu', # needed by SkLua.cpp
diff --git a/gyp/bench.gypi b/gyp/bench.gypi
index a637202..e102a97 100644
--- a/gyp/bench.gypi
+++ b/gyp/bench.gypi
@@ -6,6 +6,7 @@
'include_dirs': [
'../bench/subset',
'../bench',
+ '../include/private',
'../src/core',
'../src/effects',
'../src/gpu',
diff --git a/gyp/core.gyp b/gyp/core.gyp
index ebf8786..2569a94 100644
--- a/gyp/core.gyp
+++ b/gyp/core.gyp
@@ -23,6 +23,7 @@
'../include/pathops',
'../include/pipe',
'../include/ports',
+ '../include/private',
'../include/utils',
'../include/images',
'../src/core',
diff --git a/gyp/debugger.gyp b/gyp/debugger.gyp
index e913390..83bbbf0 100644
--- a/gyp/debugger.gyp
+++ b/gyp/debugger.gyp
@@ -82,6 +82,7 @@
'/Library/Frameworks',
],
'include_dirs' : [
+ '../include/private',
'../src/core',
'../src/utils/debugger',
'../debugger', # To pull SkDebugger.h
diff --git a/gyp/dm.gypi b/gyp/dm.gypi
index 03a5ad3..9dd3228 100644
--- a/gyp/dm.gypi
+++ b/gyp/dm.gypi
@@ -7,6 +7,7 @@
'include_dirs': [
'../dm',
'../gm',
+ '../include/private',
'../src/core',
'../src/effects',
'../src/images',
diff --git a/gyp/effects.gyp b/gyp/effects.gyp
index 154e567..fa1bf53 100644
--- a/gyp/effects.gyp
+++ b/gyp/effects.gyp
@@ -20,6 +20,7 @@
],
'include_dirs': [
'../include/effects',
+ '../include/private',
'../src/effects',
'../src/opts',
'../src/core',
diff --git a/gyp/example.gyp b/gyp/example.gyp
index a01717e..769e730 100644
--- a/gyp/example.gyp
+++ b/gyp/example.gyp
@@ -12,6 +12,7 @@
'target_name': 'HelloWorld',
'type': 'executable',
'include_dirs' : [
+ '../include/private',
'../include/gpu',
],
'sources': [
diff --git a/gyp/gpu.gyp b/gyp/gpu.gyp
index e49f706..bfd9d38 100644
--- a/gyp/gpu.gyp
+++ b/gyp/gpu.gyp
@@ -94,6 +94,7 @@
],
'include_dirs': [
'../include/gpu',
+ '../include/private',
'../src/core',
'../src/gpu',
'../src/image/',
diff --git a/gyp/gputest.gyp b/gyp/gputest.gyp
index 868bc34..6100363 100644
--- a/gyp/gputest.gyp
+++ b/gyp/gputest.gyp
@@ -14,6 +14,7 @@
],
'include_dirs': [
'../include/gpu',
+ '../include/private',
'../include/utils',
'../src/core',
'../src/gpu',
diff --git a/gyp/pdf.gyp b/gyp/pdf.gyp
index 270cce5..7efbb5c 100644
--- a/gyp/pdf.gyp
+++ b/gyp/pdf.gyp
@@ -19,6 +19,7 @@
'pdf.gypi',
],
'include_dirs': [
+ '../include/private',
'../src/core', # needed to get SkGlyphCache.h and SkTextFormatParams.h
'../src/pdf',
'../src/utils', # needed to get SkBitSet.h
diff --git a/gyp/ports.gyp b/gyp/ports.gyp
index a0cfbd6..bfbd01c 100644
--- a/gyp/ports.gyp
+++ b/gyp/ports.gyp
@@ -17,6 +17,7 @@
'../include/effects',
'../include/images',
'../include/ports',
+ '../include/private',
'../include/utils',
'../include/utils/win',
'../src/core',
diff --git a/gyp/svg.gyp b/gyp/svg.gyp
index df0c45c..ddcbb93 100644
--- a/gyp/svg.gyp
+++ b/gyp/svg.gyp
@@ -14,6 +14,7 @@
'xml.gyp:*',
],
'include_dirs': [
+ '../include/private',
'../include/svg',
'../src/core',
],
diff --git a/gyp/tools.gyp b/gyp/tools.gyp
index 855bfd7..9b772be 100644
--- a/gyp/tools.gyp
+++ b/gyp/tools.gyp
@@ -269,6 +269,7 @@
'../tools/skpinfo.cpp',
],
'include_dirs': [
+ '../include/private',
'../src/core/',
],
'dependencies': [
@@ -417,6 +418,7 @@
'../tools/LazyDecodeBitmap.cpp',
],
'include_dirs': [
+ '../include/private',
'../src/core/',
'../src/images',
'../src/lazy',
@@ -576,6 +578,7 @@
'target_name': 'filter',
'type': 'executable',
'include_dirs' : [
+ '../include/private',
'../src/core',
'../src/utils/debugger',
],
diff --git a/gyp/utils.gyp b/gyp/utils.gyp
index 3171d36..4299846 100644
--- a/gyp/utils.gyp
+++ b/gyp/utils.gyp
@@ -22,6 +22,7 @@
'../include/images',
'../include/pathops',
'../include/pipe',
+ '../include/private',
'../include/utils',
'../include/utils/mac',
'../include/utils/unix',
diff --git a/gyp/utils.gypi b/gyp/utils.gypi
index 22f8652..50f8ed6 100644
--- a/gyp/utils.gypi
+++ b/gyp/utils.gypi
@@ -101,7 +101,6 @@
'<(skia_src_path)/utils/SkThreadUtils_win.cpp',
'<(skia_src_path)/utils/SkThreadUtils_win.h',
'<(skia_src_path)/utils/SkTFitsIn.h',
- '<(skia_src_path)/utils/SkTLogic.h',
#mac
'<(skia_include_path)/utils/mac/SkCGUtils.h',
diff --git a/gyp/views.gyp b/gyp/views.gyp
index e7abc54..83ce377 100644
--- a/gyp/views.gyp
+++ b/gyp/views.gyp
@@ -20,6 +20,7 @@
'xml.gyp:xml',
],
'include_dirs': [
+ '../include/private',
'../include/views',
'../include/views/unix',
'../src/gpu',
diff --git a/gyp/visualbench.gyp b/gyp/visualbench.gyp
index 4bf559a..4900826 100644
--- a/gyp/visualbench.gyp
+++ b/gyp/visualbench.gyp
@@ -17,6 +17,7 @@
'include_dirs' : [
'../bench',
'../include/gpu',
+ '../include/private',
'../src/core',
'../src/effects',
'../src/images',
@@ -38,7 +39,7 @@
'dependencies': [
'etc1.gyp:libetc1',
'flags.gyp:flags',
- 'gputest.gyp:skgputest',
+ 'gputest.gyp:skgputest',
'skia_lib.gyp:skia_lib',
'tools.gyp:proc_stats',
'tools.gyp:sk_tool_utils',
@@ -57,7 +58,7 @@
'-lGLESv2',
'-lEGL',
],
- },
+ },
}],
],
},
diff --git a/gyp/xps.gyp b/gyp/xps.gyp
index 454e065..d69880a 100644
--- a/gyp/xps.gyp
+++ b/gyp/xps.gyp
@@ -16,6 +16,7 @@
'skia_lib.gyp:skia_lib',
],
'include_dirs': [
+ '../include/private',
'../include/device/xps',
'../include/utils/win',
'../src/core', # needed to get SkGlyphCache.h
diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h
index 811d02a..2ac8388 100644
--- a/include/core/SkPictureRecorder.h
+++ b/include/core/SkPictureRecorder.h
@@ -8,7 +8,7 @@
#ifndef SkPictureRecorder_DEFINED
#define SkPictureRecorder_DEFINED
-#include "../../src/core/SkMiniRecorder.h"
+#include "../private/SkMiniRecorder.h"
#include "SkBBHFactory.h"
#include "SkPicture.h"
#include "SkRefCnt.h"
diff --git a/include/gpu/GrBlend.h b/include/gpu/GrBlend.h
index c8b931d..52a0300 100644
--- a/include/gpu/GrBlend.h
+++ b/include/gpu/GrBlend.h
@@ -7,7 +7,7 @@
*/
#include "GrTypes.h"
-#include "../../src/utils/SkTLogic.h"
+#include "../private/SkTLogic.h"
#ifndef GrBlend_DEFINED
#define GrBlend_DEFINED
diff --git a/include/gpu/gl/SkGLContext.h b/include/gpu/gl/SkGLContext.h
index 3d232e5..f9b3227 100644
--- a/include/gpu/gl/SkGLContext.h
+++ b/include/gpu/gl/SkGLContext.h
@@ -9,7 +9,7 @@
#define SkGLContext_DEFINED
#include "GrGLInterface.h"
-#include "../../src/gpu/SkGpuFenceSync.h"
+#include "../../private/SkGpuFenceSync.h"
/**
* Create an offscreen opengl context with an RGBA8 / 8bit stencil FBO.
@@ -18,7 +18,7 @@
class SK_API SkGLContext : public SkRefCnt {
public:
-
+
~SkGLContext() override;
diff --git a/src/core/SkChecksum.h b/include/private/SkChecksum.h
similarity index 100%
rename from src/core/SkChecksum.h
rename to include/private/SkChecksum.h
diff --git a/src/core/SkFunction.h b/include/private/SkFunction.h
similarity index 100%
rename from src/core/SkFunction.h
rename to include/private/SkFunction.h
diff --git a/src/gpu/SkGpuFenceSync.h b/include/private/SkGpuFenceSync.h
similarity index 100%
rename from src/gpu/SkGpuFenceSync.h
rename to include/private/SkGpuFenceSync.h
diff --git a/src/core/SkMiniRecorder.h b/include/private/SkMiniRecorder.h
similarity index 100%
rename from src/core/SkMiniRecorder.h
rename to include/private/SkMiniRecorder.h
diff --git a/src/core/SkPathPriv.h b/include/private/SkPathPriv.h
similarity index 100%
rename from src/core/SkPathPriv.h
rename to include/private/SkPathPriv.h
diff --git a/src/core/SkRecords.h b/include/private/SkRecords.h
similarity index 100%
rename from src/core/SkRecords.h
rename to include/private/SkRecords.h
diff --git a/src/core/SkTHash.h b/include/private/SkTHash.h
similarity index 100%
rename from src/core/SkTHash.h
rename to include/private/SkTHash.h
diff --git a/src/utils/SkTLogic.h b/include/private/SkTLogic.h
similarity index 100%
rename from src/utils/SkTLogic.h
rename to include/private/SkTLogic.h
diff --git a/include/views/SkOSWindow_Win.h b/include/views/SkOSWindow_Win.h
index e7bba18..c917438 100644
--- a/include/views/SkOSWindow_Win.h
+++ b/include/views/SkOSWindow_Win.h
@@ -11,8 +11,8 @@
#define SkOSWindow_Win_DEFINED
#include "SkWindow.h"
-#include "../../src/core/SkFunction.h"
-#include "../../src/core/SkTHash.h"
+#include "../private/SkFunction.h"
+#include "../private/SkTHash.h"
#if SK_ANGLE
#include "EGL/egl.h"