Move a bunch of gpu files out of include/private and into src/gpu.
In GrRecordingContext I moved the auditTrail onto the heap and only there
when compiling for tests. This allowed us to move a lot of files out of
include private.
Change-Id: Ib76ac211c0c6fd10bacaccf0c5f93f21a59f35d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221344
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp
index 100cd99..8f17716 100644
--- a/tests/ClearTest.cpp
+++ b/tests/ClearTest.cpp
@@ -18,10 +18,10 @@
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrContext.h"
#include "include/gpu/GrContextOptions.h"
-#include "include/private/GrColor.h"
#include "include/private/GrTypesPriv.h"
#include "include/private/SkColorData.h"
#include "src/gpu/GrCaps.h"
+#include "src/gpu/GrColor.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrRenderTargetContext.h"
#include "tests/Test.h"
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index 3fbe40b..3ebd44d 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -24,7 +24,6 @@
#include "include/gpu/GrContext.h"
#include "include/gpu/GrTexture.h"
#include "include/private/GrResourceKey.h"
-#include "include/private/GrTextureProxy.h"
#include "include/private/SkTemplates.h"
#include "include/utils/SkRandom.h"
#include "src/core/SkClipOpPriv.h"
@@ -35,6 +34,7 @@
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrReducedClip.h"
#include "src/gpu/GrResourceCache.h"
+#include "src/gpu/GrTextureProxy.h"
#include "tests/Test.h"
#include "tools/gpu/GrContextFactory.h"
diff --git a/tests/CopySurfaceTest.cpp b/tests/CopySurfaceTest.cpp
index 3c9e48c..1be4732 100644
--- a/tests/CopySurfaceTest.cpp
+++ b/tests/CopySurfaceTest.cpp
@@ -12,8 +12,6 @@
#include "include/core/SkTypes.h"
#include "include/gpu/GrContext.h"
#include "include/gpu/GrTypes.h"
-#include "include/private/GrSurfaceProxy.h"
-#include "include/private/GrTextureProxy.h"
#include "include/private/GrTypesPriv.h"
#include "include/private/SkTemplates.h"
#include "src/core/SkUtils.h"
@@ -21,6 +19,8 @@
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/GrSurfaceContext.h"
+#include "src/gpu/GrSurfaceProxy.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/SkGr.h"
#include "tests/Test.h"
#include "tools/gpu/GrContextFactory.h"
diff --git a/tests/DeferredDisplayListTest.cpp b/tests/DeferredDisplayListTest.cpp
index f128f6c..683e5c3 100644
--- a/tests/DeferredDisplayListTest.cpp
+++ b/tests/DeferredDisplayListTest.cpp
@@ -25,8 +25,6 @@
#include "include/gpu/GrContextThreadSafeProxy.h"
#include "include/gpu/GrTypes.h"
#include "include/gpu/gl/GrGLTypes.h"
-#include "include/private/GrRenderTargetProxy.h"
-#include "include/private/GrTextureProxy.h"
#include "include/private/GrTypesPriv.h"
#include "include/private/SkDeferredDisplayList.h"
#include "src/core/SkDeferredDisplayListPriv.h"
@@ -34,6 +32,8 @@
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrGpu.h"
#include "src/gpu/GrRenderTargetContext.h"
+#include "src/gpu/GrRenderTargetProxy.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/SkGpuDevice.h"
#include "src/gpu/gl/GrGLDefines.h"
#include "src/image/SkImage_GpuBase.h"
diff --git a/tests/DetermineDomainModeTest.cpp b/tests/DetermineDomainModeTest.cpp
index c7d350e..53dd93e 100644
--- a/tests/DetermineDomainModeTest.cpp
+++ b/tests/DetermineDomainModeTest.cpp
@@ -13,12 +13,12 @@
#include "include/gpu/GrContext.h"
#include "include/gpu/GrSamplerState.h"
#include "include/gpu/GrTypes.h"
-#include "include/private/GrTextureProxy.h"
#include "include/private/GrTypesPriv.h"
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrTextureProducer.h"
+#include "src/gpu/GrTextureProxy.h"
#include "tests/Test.h"
#include "tools/gpu/GrContextFactory.h"
diff --git a/tests/DrawOpAtlasTest.cpp b/tests/DrawOpAtlasTest.cpp
index e7e2e45..996ef0a 100644
--- a/tests/DrawOpAtlasTest.cpp
+++ b/tests/DrawOpAtlasTest.cpp
@@ -18,7 +18,6 @@
#include "include/core/SkTypes.h"
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrContext.h"
-#include "include/private/GrTextureProxy.h"
#include "include/private/GrTypesPriv.h"
#include "src/core/SkIPoint16.h"
#include "src/gpu/GrCaps.h"
@@ -30,6 +29,7 @@
#include "src/gpu/GrOnFlushResourceProvider.h"
#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrRenderTargetContext.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/GrXferProcessor.h"
#include "src/gpu/ops/GrDrawOp.h"
#include "src/gpu/ops/GrOp.h"
diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp
index e5e041f..944ec21 100644
--- a/tests/FloatingPointTextureTest.cpp
+++ b/tests/FloatingPointTextureTest.cpp
@@ -15,10 +15,10 @@
#include "tests/Test.h"
#include "include/gpu/GrContext.h"
-#include "include/private/GrTextureProxy.h"
#include "include/private/SkHalf.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
+#include "src/gpu/GrTextureProxy.h"
#include "tools/gpu/ProxyUtils.h"
#include <float.h>
diff --git a/tests/GLBackendSurfaceTest.cpp b/tests/GLBackendSurfaceTest.cpp
index c5e360c..ace8a1f 100644
--- a/tests/GLBackendSurfaceTest.cpp
+++ b/tests/GLBackendSurfaceTest.cpp
@@ -17,8 +17,8 @@
#include "include/gpu/GrTexture.h"
#include "include/gpu/gl/GrGLTypes.h"
#include "include/private/GrGLTypesPriv.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/gl/GrGLCaps.h"
#include "src/gpu/gl/GrGLTexture.h"
#include "src/image/SkImage_Base.h"
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp
index ef0ef66..d0e8d5c 100644
--- a/tests/GrMipMappedTest.cpp
+++ b/tests/GrMipMappedTest.cpp
@@ -12,7 +12,6 @@
#include "include/core/SkSurface.h"
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrContext.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrBackendTextureImageGenerator.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrGpu.h"
@@ -20,6 +19,7 @@
#include "src/gpu/GrSemaphore.h"
#include "src/gpu/GrSurfaceProxyPriv.h"
#include "src/gpu/GrTexturePriv.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/SkGpuDevice.h"
#include "src/image/SkImage_Base.h"
#include "src/image/SkSurface_Gpu.h"
diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp
index e01d98c..fc3f8f9 100644
--- a/tests/GrPipelineDynamicStateTest.cpp
+++ b/tests/GrPipelineDynamicStateTest.cpp
@@ -9,9 +9,9 @@
#include "tests/Test.h"
#include "include/gpu/GrContext.h"
-#include "include/private/GrColor.h"
#include "include/private/GrRecordingContext.h"
#include "src/core/SkMakeUnique.h"
+#include "src/gpu/GrColor.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrGeometryProcessor.h"
#include "src/gpu/GrGpuCommandBuffer.h"
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index b655053..f3713a3 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -164,8 +164,8 @@
}
}
-#include "include/private/GrSurfaceProxy.h"
#include "src/gpu/GrDrawingManager.h"
+#include "src/gpu/GrSurfaceProxy.h"
#include "src/gpu/GrTextureContext.h"
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(InitialTextureClear, reporter, context_info) {
diff --git a/tests/GrUploadPixelsTests.cpp b/tests/GrUploadPixelsTests.cpp
index c3b8250..7da3e12 100644
--- a/tests/GrUploadPixelsTests.cpp
+++ b/tests/GrUploadPixelsTests.cpp
@@ -9,8 +9,8 @@
#include "include/core/SkTypes.h"
-#include "include/private/GrSurfaceProxy.h"
#include "src/gpu/GrContextPriv.h"
+#include "src/gpu/GrSurfaceProxy.h"
#include "src/gpu/SkGr.h"
#include "tests/Test.h"
#include "tests/TestUtils.h"
diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp
index d4fa9f7..e806fe4 100644
--- a/tests/ImageFilterCacheTest.cpp
+++ b/tests/ImageFilterCacheTest.cpp
@@ -193,11 +193,11 @@
#include "include/gpu/GrContext.h"
#include "include/gpu/GrTexture.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/GrSurfaceProxyPriv.h"
+#include "src/gpu/GrTextureProxy.h"
static sk_sp<GrTextureProxy> create_proxy(GrProxyProvider* proxyProvider) {
SkBitmap srcBM = create_bm();
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index 8343c8d..e42e79d 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -9,8 +9,6 @@
#include "include/gpu/GrTexture.h"
#include "include/gpu/mock/GrMockTypes.h"
-#include "include/private/GrSurfaceProxy.h"
-#include "include/private/GrTextureProxy.h"
#include "src/core/SkExchange.h"
#include "src/core/SkMakeUnique.h"
#include "src/core/SkRectPriv.h"
@@ -22,7 +20,9 @@
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/GrRenderTargetContextPriv.h"
+#include "src/gpu/GrSurfaceProxy.h"
#include "src/gpu/GrSurfaceProxyPriv.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/GrTextureProxyPriv.h"
#include "src/gpu/mock/GrMockGpu.h"
diff --git a/tests/PackedConfigsTextureTest.cpp b/tests/PackedConfigsTextureTest.cpp
index 4e8a49e..e450d2e 100644
--- a/tests/PackedConfigsTextureTest.cpp
+++ b/tests/PackedConfigsTextureTest.cpp
@@ -14,9 +14,9 @@
#include "tests/Test.h"
#include "include/gpu/GrContext.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
+#include "src/gpu/GrTextureProxy.h"
#include "tools/gpu/ProxyUtils.h"
static const int DEV_W = 10, DEV_H = 10;
diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp
index 3573d19..091fe4f 100644
--- a/tests/ProxyConversionTest.cpp
+++ b/tests/ProxyConversionTest.cpp
@@ -12,12 +12,12 @@
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrRenderTarget.h"
#include "include/gpu/GrTexture.h"
-#include "include/private/GrRenderTargetProxy.h"
-#include "include/private/GrSurfaceProxy.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrGpu.h"
#include "src/gpu/GrProxyProvider.h"
+#include "src/gpu/GrRenderTargetProxy.h"
+#include "src/gpu/GrSurfaceProxy.h"
+#include "src/gpu/GrTextureProxy.h"
static sk_sp<GrSurfaceProxy> make_wrapped_rt(GrProxyProvider* provider,
GrGpu* gpu,
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp
index b24a123..2a5ecb4 100644
--- a/tests/ProxyRefTest.cpp
+++ b/tests/ProxyRefTest.cpp
@@ -10,13 +10,13 @@
#include "tests/Test.h"
#include "include/gpu/GrTexture.h"
-#include "include/private/GrRenderTargetProxy.h"
-#include "include/private/GrSurfaceProxy.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrPendingIOResource.h"
#include "src/gpu/GrProxyProvider.h"
+#include "src/gpu/GrRenderTargetProxy.h"
#include "src/gpu/GrResourceProvider.h"
+#include "src/gpu/GrSurfaceProxy.h"
+#include "src/gpu/GrTextureProxy.h"
int32_t GrIORefProxy::getBackingRefCnt_TestOnly() const {
if (fTarget) {
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index cdc4421..4c7dc4a 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -11,14 +11,14 @@
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrTexture.h"
-#include "include/private/GrRenderTargetProxy.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrRenderTargetPriv.h"
+#include "src/gpu/GrRenderTargetProxy.h"
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/GrSurfacePriv.h"
#include "src/gpu/GrSurfaceProxyPriv.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/SkGr.h"
#include "src/gpu/gl/GrGLDefines.h"
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp
index 06f8457..7fa5028 100644
--- a/tests/ReadWriteAlphaTest.cpp
+++ b/tests/ReadWriteAlphaTest.cpp
@@ -11,13 +11,13 @@
#include "include/core/SkCanvas.h"
#include "include/core/SkSurface.h"
#include "include/gpu/GrContext.h"
-#include "include/private/GrSurfaceProxy.h"
-#include "include/private/GrTextureProxy.h"
#include "include/private/SkTo.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/GrSurfaceContext.h"
+#include "src/gpu/GrSurfaceProxy.h"
+#include "src/gpu/GrTextureProxy.h"
#include "tools/gpu/ProxyUtils.h"
// This was made indivisible by 4 to ensure we test setting GL_PACK_ALIGNMENT properly.
diff --git a/tests/RenderTargetContextTest.cpp b/tests/RenderTargetContextTest.cpp
index 1f0ed4b..dff1b44 100644
--- a/tests/RenderTargetContextTest.cpp
+++ b/tests/RenderTargetContextTest.cpp
@@ -13,8 +13,8 @@
// mixes this test up. Re-enable once backing GPU resources are distributed by MDB at flush time.
#if 0
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrRenderTargetContext.h"
+#include "src/gpu/GrTextureProxy.h"
static const int kSize = 64;
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp
index 5bbb63c..aa344c2 100644
--- a/tests/ResourceAllocatorTest.cpp
+++ b/tests/ResourceAllocatorTest.cpp
@@ -10,7 +10,6 @@
#include "tests/Test.h"
#include "include/gpu/GrTexture.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrDeinstantiateProxyTracker.h"
#include "src/gpu/GrGpu.h"
@@ -18,6 +17,7 @@
#include "src/gpu/GrResourceAllocator.h"
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/GrSurfaceProxyPriv.h"
+#include "src/gpu/GrTextureProxy.h"
#include "include/core/SkSurface.h"
diff --git a/tests/SkParagraphTest.cpp b/tests/SkParagraphTest.cpp
index 9f4b385..960951d 100644
--- a/tests/SkParagraphTest.cpp
+++ b/tests/SkParagraphTest.cpp
@@ -1,11 +1,11 @@
// Copyright 2019 Google LLC.
#include <sstream>
-#include "Test.h"
#include "modules/skparagraph/src/ParagraphBuilderImpl.h"
#include "modules/skparagraph/src/ParagraphImpl.h"
#include "modules/skparagraph/src/TypefaceFontProvider.h"
#include "src/core/SkOSFile.h"
#include "src/utils/SkShaperJSONWriter.h"
+#include "tests/Test.h"
#include "tools/Resources.h"
#define VeryLongCanvasWidth 1000000
diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp
index d22534d..5e1a292 100644
--- a/tests/SpecialImageTest.cpp
+++ b/tests/SpecialImageTest.cpp
@@ -17,10 +17,10 @@
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrContext.h"
-#include "include/private/GrSurfaceProxy.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
+#include "src/gpu/GrSurfaceProxy.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/SkGr.h"
diff --git a/tests/TestUtils.cpp b/tests/TestUtils.cpp
index 1a6236f..93c1734 100644
--- a/tests/TestUtils.cpp
+++ b/tests/TestUtils.cpp
@@ -8,15 +8,15 @@
#include "tests/TestUtils.h"
#include "include/encode/SkPngEncoder.h"
-#include "include/private/GrSurfaceProxy.h"
-#include "include/private/GrTextureProxy.h"
#include "include/utils/SkBase64.h"
#include "src/core/SkUtils.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrDrawingManager.h"
#include "src/gpu/GrGpu.h"
#include "src/gpu/GrSurfaceContext.h"
+#include "src/gpu/GrSurfaceProxy.h"
#include "src/gpu/GrTextureContext.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/SkGr.h"
void test_read_pixels(skiatest::Reporter* reporter,
diff --git a/tests/TextureProxyTest.cpp b/tests/TextureProxyTest.cpp
index cc22e8e..fbf8f27 100644
--- a/tests/TextureProxyTest.cpp
+++ b/tests/TextureProxyTest.cpp
@@ -11,11 +11,11 @@
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrTexture.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrResourceCache.h"
#include "src/gpu/GrResourceProvider.h"
+#include "src/gpu/GrTextureProxy.h"
#include "include/core/SkImage.h"
#include "src/gpu/SkGr.h"
diff --git a/tests/TransferPixelsTest.cpp b/tests/TransferPixelsTest.cpp
index ed36a14..0da2096 100644
--- a/tests/TransferPixelsTest.cpp
+++ b/tests/TransferPixelsTest.cpp
@@ -11,10 +11,10 @@
#include "include/core/SkSurface.h"
#include "include/gpu/GrTexture.h"
-#include "include/private/GrSurfaceProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrGpu.h"
#include "src/gpu/GrResourceProvider.h"
+#include "src/gpu/GrSurfaceProxy.h"
#include "src/gpu/SkGr.h"
#include "tests/Test.h"
#include "tools/gpu/GrContextFactory.h"
diff --git a/tests/VkBackendSurfaceTest.cpp b/tests/VkBackendSurfaceTest.cpp
index ced9f88..9f77029 100644
--- a/tests/VkBackendSurfaceTest.cpp
+++ b/tests/VkBackendSurfaceTest.cpp
@@ -19,9 +19,9 @@
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrTexture.h"
#include "include/gpu/vk/GrVkTypes.h"
-#include "include/private/GrTextureProxy.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrRenderTargetContext.h"
+#include "src/gpu/GrTextureProxy.h"
#include "src/gpu/SkGpuDevice.h"
#include "src/gpu/vk/GrVkGpu.h"
#include "src/gpu/vk/GrVkImageLayout.h"