Retract GrTexture*.h & GrRenderTarget*.h from other headers
This does push some additional work (& includes) into the .cpp files.
Change-Id: I27c847e371802270d13594dcc22aae44039990bb
Reviewed-on: https://skia-review.googlesource.com/19660
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/debugger/QT/SkGLWidget.h b/debugger/QT/SkGLWidget.h
index 870b283..e7493a5 100644
--- a/debugger/QT/SkGLWidget.h
+++ b/debugger/QT/SkGLWidget.h
@@ -19,7 +19,6 @@
#include "GrContext.h"
#include "gl/GrGLInterface.h"
#include "gl/GrGLUtil.h"
-#include "GrRenderTarget.h"
class SkGLWidget : public QGLWidget {
Q_OBJECT
diff --git a/experimental/SkV8Example/SkV8Example.cpp b/experimental/SkV8Example/SkV8Example.cpp
index 388ef0e..a6a2a7e 100644
--- a/experimental/SkV8Example/SkV8Example.cpp
+++ b/experimental/SkV8Example/SkV8Example.cpp
@@ -18,7 +18,6 @@
#include "gl/GrGLUtil.h"
#include "gl/GrGLDefines.h"
#include "gl/GrGLInterface.h"
-#include "GrRenderTarget.h"
#include "GrContext.h"
#include "SkApplication.h"
#include "SkCommandLineFlags.h"
diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp
index 5f569dd..8738c3f 100644
--- a/gm/windowrectangles.cpp
+++ b/gm/windowrectangles.cpp
@@ -16,7 +16,6 @@
# include "GrRenderTargetContextPriv.h"
# include "GrFixedClip.h"
# include "GrReducedClip.h"
-# include "GrRenderTargetPriv.h"
# include "GrResourceProvider.h"
# include "effects/GrTextureDomain.h"
#endif
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 6fded02..0f9a4cf 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -43,7 +43,6 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
-#include "GrRenderTarget.h"
#include "SkGr.h"
#endif
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index cd481a1..7b5c6e0 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -18,6 +18,7 @@
#include "GrContext.h"
#include "GrCoordTransform.h"
#include "GrRenderTargetContext.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
#include "SkGr.h"
#include "effects/GrTextureDomain.h"
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index c856841..6254430 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -21,6 +21,7 @@
#include "GrFragmentProcessor.h"
#include "GrPaint.h"
#include "GrRenderTargetContext.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
#include "SkGr.h"
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 197b805..1927715 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -17,6 +17,7 @@
////////////////////////////////////////////////////////////////////////////////
#if SK_SUPPORT_GPU
#include "GrContext.h"
+#include "GrTexture.h"
#include "effects/GrProxyMove.h"
#include "effects/GrSingleTextureEffect.h"
#include "glsl/GrGLSLColorSpaceXformHelper.h"
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 689563a..57abec9 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -19,6 +19,7 @@
#include "GrContext.h"
#include "GrFixedClip.h"
#include "GrRenderTargetContext.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
#include "SkGr.h"
diff --git a/src/gpu/GrBackendTextureImageGenerator.cpp b/src/gpu/GrBackendTextureImageGenerator.cpp
index 3a3cd31..8446489 100644
--- a/src/gpu/GrBackendTextureImageGenerator.cpp
+++ b/src/gpu/GrBackendTextureImageGenerator.cpp
@@ -9,9 +9,11 @@
#include "GrContext.h"
#include "GrContextPriv.h"
+#include "GrGpu.h"
#include "GrResourceCache.h"
#include "GrResourceProvider.h"
#include "GrSemaphore.h"
+#include "GrTexture.h"
#include "SkGr.h"
#include "SkMessageBus.h"
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 17db956..a96fbce 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -10,6 +10,7 @@
#include "GrContextOptions.h"
#include "GrContextPriv.h"
#include "GrDrawingManager.h"
+#include "GrGpu.h"
#include "GrRenderTargetContext.h"
#include "GrRenderTargetProxy.h"
#include "GrResourceCache.h"
@@ -19,6 +20,7 @@
#include "GrSurfaceContext.h"
#include "GrSurfacePriv.h"
#include "GrSurfaceProxyPriv.h"
+#include "GrTexture.h"
#include "GrTextureContext.h"
#include "SkConvertPixels.h"
#include "SkGr.h"
diff --git a/src/gpu/GrCoordTransform.h b/src/gpu/GrCoordTransform.h
index 325dbbd..a791213 100644
--- a/src/gpu/GrCoordTransform.h
+++ b/src/gpu/GrCoordTransform.h
@@ -10,10 +10,10 @@
#include "SkMatrix.h"
#include "GrSurfaceProxyPriv.h"
-#include "GrTexture.h"
#include "GrTextureProxy.h"
class GrResourceProvider;
+class GrTexture;
/**
* A class representing a linear transformation of local coordinates. GrFragnentProcessors
diff --git a/src/gpu/GrDrawOpAtlas.cpp b/src/gpu/GrDrawOpAtlas.cpp
index 78f6ba4..37bad65 100644
--- a/src/gpu/GrDrawOpAtlas.cpp
+++ b/src/gpu/GrDrawOpAtlas.cpp
@@ -11,6 +11,7 @@
#include "GrOpFlushState.h"
#include "GrRectanizer.h"
#include "GrResourceProvider.h"
+#include "GrTexture.h"
#include "GrTracing.h"
std::unique_ptr<GrDrawOpAtlas> GrDrawOpAtlas::Make(GrContext* ctx, GrPixelConfig config,
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 67b5e8f..cb052ef 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -8,6 +8,7 @@
#include "GrDrawingManager.h"
#include "GrContext.h"
+#include "GrGpu.h"
#include "GrRenderTargetContext.h"
#include "GrPathRenderingRenderTargetContext.h"
#include "GrRenderTargetProxy.h"
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 6cec477..54bb3a7 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -163,6 +163,20 @@
return tex;
}
+sk_sp<GrTexture> GrGpu::createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted) {
+ return this->createTexture(desc, budgeted, SkTArray<GrMipLevel>());
+}
+
+sk_sp<GrTexture> GrGpu::createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted,
+ const void* level0Data,
+ size_t rowBytes) {
+ SkASSERT(level0Data);
+ GrMipLevel level = { level0Data, rowBytes };
+ SkSTArray<1, GrMipLevel> array;
+ array.push_back() = level;
+ return this->createTexture(desc, budgeted, array);
+}
+
sk_sp<GrTexture> GrGpu::wrapBackendTexture(const GrBackendTexture& backendTex,
GrSurfaceOrigin origin,
GrBackendTextureFlags flags,
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 8b8c7b3..3c400a8 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -111,20 +111,12 @@
/**
* Simplified createTexture() interface for when there is no initial texel data to upload.
*/
- sk_sp<GrTexture> createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted) {
- return this->createTexture(desc, budgeted, SkTArray<GrMipLevel>());
- }
+ sk_sp<GrTexture> createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted);
/** Simplified createTexture() interface for when there is only a base level */
sk_sp<GrTexture> createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted,
const void* level0Data,
- size_t rowBytes) {
- SkASSERT(level0Data);
- GrMipLevel level = { level0Data, rowBytes };
- SkSTArray<1, GrMipLevel> array;
- array.push_back() = level;
- return this->createTexture(desc, budgeted, array);
- }
+ size_t rowBytes);
/**
* Implements GrResourceProvider::wrapBackendTexture
diff --git a/src/gpu/GrOpFlushState.cpp b/src/gpu/GrOpFlushState.cpp
index 72deabe..b8166f0 100644
--- a/src/gpu/GrOpFlushState.cpp
+++ b/src/gpu/GrOpFlushState.cpp
@@ -8,7 +8,9 @@
#include "GrOpFlushState.h"
#include "GrDrawOpAtlas.h"
+#include "GrGpu.h"
#include "GrResourceProvider.h"
+#include "GrTexture.h"
GrOpFlushState::GrOpFlushState(GrGpu* gpu, GrResourceProvider* resourceProvider)
: fGpu(gpu)
@@ -20,6 +22,10 @@
, fLastFlushedToken(0)
, fOpArgs(nullptr) {}
+const GrCaps& GrOpFlushState::caps() const {
+ return *fGpu->caps();
+}
+
void* GrOpFlushState::makeVertexSpace(size_t vertexSize, int vertexCount,
const GrBuffer** buffer, int* startVertex) {
return fVertexPool.makeSpace(vertexSize, vertexCount, buffer, startVertex);
diff --git a/src/gpu/GrOpFlushState.h b/src/gpu/GrOpFlushState.h
index 402bac5..3a2fe32 100644
--- a/src/gpu/GrOpFlushState.h
+++ b/src/gpu/GrOpFlushState.h
@@ -9,10 +9,10 @@
#define GrOpFlushState_DEFINED
#include "GrBufferAllocPool.h"
-#include "GrGpu.h"
#include "SkArenaAlloc.h"
#include "ops/GrMeshDrawOp.h"
+class GrGpu;
class GrGpuCommandBuffer;
class GrResourceProvider;
@@ -29,7 +29,7 @@
fAsapUploads.emplace_back(std::move(upload));
}
- const GrCaps& caps() const { return *fGpu->caps(); }
+ const GrCaps& caps() const;
GrResourceProvider* resourceProvider() const { return fResourceProvider; }
/** Has the token been flushed to the backend 3D API. */
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index 2f08f43..fb9c384 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -13,6 +13,7 @@
#include "GrPaint.h"
#include "GrResourceProvider.h"
#include "GrShape.h"
+#include "GrUserStencilSettings.h"
#include "SkDrawProcs.h"
#include "SkTArray.h"
diff --git a/src/gpu/GrPathRendering.cpp b/src/gpu/GrPathRendering.cpp
index ad60726..15ae6c1 100644
--- a/src/gpu/GrPathRendering.cpp
+++ b/src/gpu/GrPathRendering.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "GrGpu.h"
#include "GrPathRendering.h"
#include "SkDescriptor.h"
#include "SkGlyph.h"
@@ -97,10 +98,48 @@
genericDesc->init();
genericDesc->addEntry(kRec_SkDescriptorTag, sizeof(rec), &rec);
genericDesc->computeChecksum();
-
+
// No effects, so we make a dummy struct
SkScalerContextEffects noEffects;
sk_sp<GlyphGenerator> generator(new GlyphGenerator(*typeface, noEffects, *genericDesc));
return this->createPathRange(generator.get(), style);
}
+
+void GrPathRendering::stencilPath(const StencilPathArgs& args, const GrPath* path) {
+ fGpu->handleDirtyContext();
+ this->onStencilPath(args, path);
+}
+
+void GrPathRendering::drawPath(const GrPipeline& pipeline,
+ const GrPrimitiveProcessor& primProc,
+ // Cover pass settings in pipeline.
+ const GrStencilSettings& stencilPassSettings,
+ const GrPath* path) {
+ fGpu->handleDirtyContext();
+ if (GrXferBarrierType barrierType = pipeline.xferBarrierType(*fGpu->caps())) {
+ fGpu->xferBarrier(pipeline.getRenderTarget(), barrierType);
+ }
+ this->onDrawPath(pipeline, primProc, stencilPassSettings, path);
+}
+
+void GrPathRendering::drawPaths(const GrPipeline& pipeline,
+ const GrPrimitiveProcessor& primProc,
+ // Cover pass settings in pipeline.
+ const GrStencilSettings& stencilPassSettings,
+ const GrPathRange* pathRange,
+ const void* indices,
+ PathIndexType indexType,
+ const float transformValues[],
+ PathTransformType transformType,
+ int count) {
+ fGpu->handleDirtyContext();
+ if (GrXferBarrierType barrierType = pipeline.xferBarrierType(*fGpu->caps())) {
+ fGpu->xferBarrier(pipeline.getRenderTarget(), barrierType);
+ }
+#ifdef SK_DEBUG
+ pathRange->assertPathsLoaded(indices, indexType, count);
+#endif
+ this->onDrawPaths(pipeline, primProc, stencilPassSettings, pathRange, indices, indexType,
+ transformValues, transformType, count);
+}
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h
index 23c731f..bcd2cfa 100644
--- a/src/gpu/GrPathRendering.h
+++ b/src/gpu/GrPathRendering.h
@@ -9,12 +9,12 @@
#define GrPathRendering_DEFINED
#include "SkPath.h"
-#include "GrGpu.h"
#include "GrPathRange.h"
#include "GrPipeline.h"
class SkDescriptor;
class SkTypeface;
+class GrGpu;
class GrPath;
class GrStencilSettings;
class GrStyle;
@@ -149,21 +149,12 @@
const GrStencilSettings* fStencil;
};
- void stencilPath(const StencilPathArgs& args, const GrPath* path) {
- fGpu->handleDirtyContext();
- this->onStencilPath(args, path);
- }
+ void stencilPath(const StencilPathArgs& args, const GrPath* path);
void drawPath(const GrPipeline& pipeline,
const GrPrimitiveProcessor& primProc,
const GrStencilSettings& stencilPassSettings, // Cover pass settings in pipeline.
- const GrPath* path) {
- fGpu->handleDirtyContext();
- if (GrXferBarrierType barrierType = pipeline.xferBarrierType(*fGpu->caps())) {
- fGpu->xferBarrier(pipeline.getRenderTarget(), barrierType);
- }
- this->onDrawPath(pipeline, primProc, stencilPassSettings, path);
- }
+ const GrPath* path);
void drawPaths(const GrPipeline& pipeline,
const GrPrimitiveProcessor& primProc,
@@ -173,22 +164,11 @@
PathIndexType indexType,
const float transformValues[],
PathTransformType transformType,
- int count) {
- fGpu->handleDirtyContext();
- if (GrXferBarrierType barrierType = pipeline.xferBarrierType(*fGpu->caps())) {
- fGpu->xferBarrier(pipeline.getRenderTarget(), barrierType);
- }
-#ifdef SK_DEBUG
- pathRange->assertPathsLoaded(indices, indexType, count);
-#endif
- this->onDrawPaths(pipeline, primProc, stencilPassSettings, pathRange, indices, indexType,
- transformValues, transformType, count);
- }
+ int count);
protected:
- GrPathRendering(GrGpu* gpu)
- : fGpu(gpu) {
- }
+ GrPathRendering(GrGpu* gpu) : fGpu(gpu) { }
+
virtual void onStencilPath(const StencilPathArgs&, const GrPath*) = 0;
virtual void onDrawPath(const GrPipeline&,
const GrPrimitiveProcessor&,
diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h
index 9bb2c49..aedc07c 100644
--- a/src/gpu/GrPipelineBuilder.h
+++ b/src/gpu/GrPipelineBuilder.h
@@ -11,7 +11,6 @@
#include "GrGpuResourceRef.h"
#include "GrPipeline.h"
#include "GrProcessorSet.h"
-#include "GrRenderTarget.h"
#include "GrUserStencilSettings.h"
#include "GrXferProcessor.h"
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 8480ffa..7fcd7fa 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -18,7 +18,6 @@
#include "GrPipelineBuilder.h"
#include "GrRenderTarget.h"
#include "GrRenderTargetContextPriv.h"
-#include "GrRenderTargetPriv.h"
#include "GrResourceProvider.h"
#include "GrStencilAttachment.h"
#include "SkDrawShadowRec.h"
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp
index f7aecdd..1972032 100644
--- a/src/gpu/GrRenderTargetOpList.cpp
+++ b/src/gpu/GrRenderTargetOpList.cpp
@@ -11,7 +11,6 @@
#include "GrGpu.h"
#include "GrGpuCommandBuffer.h"
#include "GrRect.h"
-#include "GrRenderTarget.h"
#include "GrRenderTargetContext.h"
#include "GrResourceProvider.h"
#include "instanced/InstancedRendering.h"
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index 6945f47..b42277c 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -12,6 +12,7 @@
#include "GrOpList.h"
#include "GrPathRendering.h"
#include "GrPrimitiveProcessor.h"
+#include "ops/GrOp.h"
#include "SkArenaAlloc.h"
#include "SkClipStack.h"
#include "SkMatrix.h"
@@ -24,10 +25,13 @@
class GrAuditTrail;
class GrClearOp;
class GrCaps;
-class GrOp;
class GrPipelineBuilder;
class GrRenderTargetProxy;
+namespace gr_instanced {
+ class InstancedRendering;
+}
+
class GrRenderTargetOpList final : public GrOpList {
private:
using DstProxy = GrXferProcessor::DstProxy;
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index ea699fb..52340bb 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -307,6 +307,11 @@
return NULL;
}
+void GrResourceProvider::assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture) {
+ SkASSERT(key.isValid());
+ this->assignUniqueKeyToResource(key, texture);
+}
+
// MDB TODO (caching): this side-steps the issue of texture proxies with unique IDs
void GrResourceProvider::assignUniqueKeyToProxy(const GrUniqueKey& key, GrTextureProxy* proxy) {
ASSERT_SINGLE_OWNER
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h
index 2e9b8a8..1e0146a 100644
--- a/src/gpu/GrResourceProvider.h
+++ b/src/gpu/GrResourceProvider.h
@@ -11,12 +11,18 @@
#include "GrBuffer.h"
#include "GrGpu.h"
#include "GrPathRange.h"
+#include "SkImageInfo.h"
class GrBackendRenderTarget;
class GrPath;
class GrRenderTarget;
+class GrSemaphore;
class GrSingleOwner;
class GrStencilAttachment;
+class GrSurfaceProxy;
+class GrTexture;
+class GrTextureProxy;
+
class GrStyle;
class SkDescriptor;
class SkPath;
@@ -243,10 +249,7 @@
private:
GrTexture* findAndRefTextureByUniqueKey(const GrUniqueKey& key);
- void assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture) {
- SkASSERT(key.isValid());
- this->assignUniqueKeyToResource(key, texture);
- }
+ void assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture);
sk_sp<GrTexture> refScratchTexture(const GrSurfaceDesc&, uint32_t scratchTextureFlags);
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp
index 064cc0a..4f4e5aa 100644
--- a/src/gpu/GrTexture.cpp
+++ b/src/gpu/GrTexture.cpp
@@ -10,7 +10,6 @@
#include "GrGpu.h"
#include "GrResourceKey.h"
#include "GrRenderTarget.h"
-#include "GrRenderTargetPriv.h"
#include "GrTexture.h"
#include "GrTexturePriv.h"
#include "GrTypes.h"
diff --git a/src/gpu/GrTracing.h b/src/gpu/GrTracing.h
index 1f2a04a..ff7d6e3 100644
--- a/src/gpu/GrTracing.h
+++ b/src/gpu/GrTracing.h
@@ -8,11 +8,12 @@
#ifndef GrTracing_DEFINED
#define GrTracing_DEFINED
-#include "GrGpu.h"
#include "GrTraceMarker.h"
#include "SkTLazy.h"
#include "SkTraceEvent.h"
+class GrContext;
+
/**
* Marker generation class used for adding and removing markers around code blocks
*/
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 7d1eba3..d54f4df 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -8,6 +8,7 @@
#include "GrBicubicEffect.h"
#include "GrProxyMove.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
#include "glsl/GrGLSLColorSpaceXformHelper.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index 9a0936c..ae4de1b 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -8,6 +8,7 @@
#include "GrGaussianConvolutionFragmentProcessor.h"
#include "GrProxyMove.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
#include "../private/GrGLSL.h"
#include "glsl/GrGLSLFragmentProcessor.h"
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 776eff0..d1726a0 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -6,6 +6,7 @@
*/
#include "GrMatrixConvolutionEffect.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 8c16d33..5c7c0bd 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -13,7 +13,6 @@
#include "GrCoordTransform.h"
#include "SkMatrix.h"
-class GrTexture;
class GrTextureProxy;
/**
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index ebe4f04..3269f41 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -11,6 +11,7 @@
#include "GrShaderCaps.h"
#include "GrSimpleTextureEffect.h"
#include "GrSurfaceProxyPriv.h"
+#include "GrTexture.h"
#include "SkFloatingPoint.h"
#include "glsl/GrGLSLColorSpaceXformHelper.h"
#include "glsl/GrGLSLFragmentProcessor.h"
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index d7a1f96..a6fafbe 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -4309,3 +4309,19 @@
return semaphore;
}
+
+int GrGLGpu::TextureToCopyProgramIdx(GrTexture* texture) {
+ switch (texture->texturePriv().samplerType()) {
+ case kTexture2DSampler_GrSLType:
+ return 0;
+ case kITexture2DSampler_GrSLType:
+ return 1;
+ case kTexture2DRectSampler_GrSLType:
+ return 2;
+ case kTextureExternalSampler_GrSLType:
+ return 3;
+ default:
+ SkFAIL("Unexpected samper type");
+ return 0;
+ }
+}
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index 2e258fd..f121df3 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -18,7 +18,6 @@
#include "GrGLVertexArray.h"
#include "GrGpu.h"
#include "GrMesh.h"
-#include "GrTexturePriv.h"
#include "GrWindowRectsState.h"
#include "GrXferProcessor.h"
#include "SkLRUCache.h"
@@ -618,21 +617,7 @@
GrGLuint fStencilClipClearProgram;
sk_sp<GrGLBuffer> fStencilClipClearArrayBuffer;
- static int TextureToCopyProgramIdx(GrTexture* texture) {
- switch (texture->texturePriv().samplerType()) {
- case kTexture2DSampler_GrSLType:
- return 0;
- case kITexture2DSampler_GrSLType:
- return 1;
- case kTexture2DRectSampler_GrSLType:
- return 2;
- case kTextureExternalSampler_GrSLType:
- return 3;
- default:
- SkFAIL("Unexpected samper type");
- return 0;
- }
- }
+ static int TextureToCopyProgramIdx(GrTexture* texture);
static int TextureSizeToMipmapProgramIdx(int width, int height) {
const bool wide = (width > 1) && SkToBool(width & 0x1);
diff --git a/src/gpu/gl/GrGLPathRendering.h b/src/gpu/gl/GrGLPathRendering.h
index ddbd75c..5b03435 100644
--- a/src/gpu/gl/GrGLPathRendering.h
+++ b/src/gpu/gl/GrGLPathRendering.h
@@ -9,6 +9,7 @@
#define GrGLPathRendering_DEFINED
#include "SkRefCnt.h"
+#include "GrGpu.h"
#include "GrPathRendering.h"
#include "GrStencilSettings.h"
#include "gl/GrGLTypes.h"
diff --git a/src/gpu/gl/GrGLTextureRenderTarget.cpp b/src/gpu/gl/GrGLTextureRenderTarget.cpp
index eac29b6..c643cff 100644
--- a/src/gpu/gl/GrGLTextureRenderTarget.cpp
+++ b/src/gpu/gl/GrGLTextureRenderTarget.cpp
@@ -8,6 +8,7 @@
#include "GrGLTextureRenderTarget.h"
#include "GrContext.h"
+#include "GrTexturePriv.h"
#include "SkTraceMemoryDump.h"
// GrGLTextureRenderTarget must dump both of its superclasses.
@@ -52,3 +53,9 @@
return sk_sp<GrGLTextureRenderTarget>(
new GrGLTextureRenderTarget(gpu, desc, texIDDesc, rtIDDesc, false));
}
+
+size_t GrGLTextureRenderTarget::onGpuMemorySize() const {
+ return GrSurface::ComputeSize(this->config(), this->width(), this->height(),
+ this->numSamplesOwnedPerPixel(),
+ this->texturePriv().hasMipMaps());
+}
diff --git a/src/gpu/gl/GrGLTextureRenderTarget.h b/src/gpu/gl/GrGLTextureRenderTarget.h
index 0d3b19d..e6eb195 100644
--- a/src/gpu/gl/GrGLTextureRenderTarget.h
+++ b/src/gpu/gl/GrGLTextureRenderTarget.h
@@ -12,7 +12,6 @@
#include "GrGLGpu.h"
#include "GrGLTexture.h"
#include "GrGLRenderTarget.h"
-#include "GrTexturePriv.h"
class GrGLGpu;
@@ -69,12 +68,7 @@
this->registerWithCacheWrapped();
}
- size_t onGpuMemorySize() const override {
- return GrSurface::ComputeSize(this->config(), this->width(), this->height(),
- this->numSamplesOwnedPerPixel(),
- this->texturePriv().hasMipMaps());
- }
-
+ size_t onGpuMemorySize() const override;
};
#ifdef SK_BUILD_FOR_WIN
diff --git a/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp b/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
index 7c6b2d4..c2e0ab7 100644
--- a/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
@@ -8,6 +8,7 @@
#include "GrGLSLPrimitiveProcessor.h"
#include "GrCoordTransform.h"
+#include "GrTexture.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLUniformHandler.h"
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index 933d422..dfdbd82 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -10,7 +10,7 @@
#include "GrCaps.h"
#include "GrGeometryProcessor.h"
-#include "GrGpu.h"
+#include "GrProgramDesc.h"
#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLGeometryShaderBuilder.h"
diff --git a/src/gpu/instanced/InstancedOp.cpp b/src/gpu/instanced/InstancedOp.cpp
index f0f1cc0..40e3c5e 100644
--- a/src/gpu/instanced/InstancedOp.cpp
+++ b/src/gpu/instanced/InstancedOp.cpp
@@ -8,7 +8,7 @@
#include "InstancedOp.h"
#include "InstanceProcessor.h"
#include "InstancedRendering.h"
-
+#include "GrGpu.h"
#include "GrOpFlushState.h"
#include "GrRenderTargetOpList.h"
diff --git a/src/gpu/instanced/InstancedRendering.cpp b/src/gpu/instanced/InstancedRendering.cpp
index 7458437..6a8fc64 100644
--- a/src/gpu/instanced/InstancedRendering.cpp
+++ b/src/gpu/instanced/InstancedRendering.cpp
@@ -10,6 +10,7 @@
#include "InstancedOp.h"
#include "GrAppliedClip.h"
#include "GrCaps.h"
+#include "GrGpu.h"
#include "GrPipeline.h"
#include "GrResourceProvider.h"
diff --git a/src/gpu/instanced/InstancedRendering.h b/src/gpu/instanced/InstancedRendering.h
index 3c5976d..d0df132 100644
--- a/src/gpu/instanced/InstancedRendering.h
+++ b/src/gpu/instanced/InstancedRendering.h
@@ -8,12 +8,12 @@
#ifndef gr_instanced_InstancedRendering_DEFINED
#define gr_instanced_InstancedRendering_DEFINED
-#include "GrGpu.h"
#include "instanced/InstancedOp.h"
#include "instanced/InstancedRenderingTypes.h"
#include "SkTInternalLList.h"
+class GrGpu;
class GrResourceProvider;
namespace gr_instanced {
diff --git a/src/gpu/ops/GrCopySurfaceOp.cpp b/src/gpu/ops/GrCopySurfaceOp.cpp
index 1a9a5e0..4e8fab7 100644
--- a/src/gpu/ops/GrCopySurfaceOp.cpp
+++ b/src/gpu/ops/GrCopySurfaceOp.cpp
@@ -6,6 +6,7 @@
*/
#include "GrCopySurfaceOp.h"
+#include "GrGpu.h"
// returns true if the read/written rect intersects the src/dst and false if not.
static bool clip_src_rect_and_dst_point(const GrSurfaceProxy* dst,
@@ -77,3 +78,15 @@
return std::unique_ptr<GrOp>(new GrCopySurfaceOp(dstProxy, srcProxy,
clippedSrcRect, clippedDstPoint));
}
+
+void GrCopySurfaceOp::onExecute(GrOpFlushState* state) {
+ SkASSERT(!state->commandBuffer());
+
+ if (!fDst.get()->instantiate(state->resourceProvider()) ||
+ !fSrc.get()->instantiate(state->resourceProvider())) {
+ return;
+ }
+
+ state->gpu()->copySurface(fDst.get()->priv().peekSurface(),
+ fSrc.get()->priv().peekSurface(), fSrcRect, fDstPoint);
+}
diff --git a/src/gpu/ops/GrCopySurfaceOp.h b/src/gpu/ops/GrCopySurfaceOp.h
index 6c80408..64431a5 100644
--- a/src/gpu/ops/GrCopySurfaceOp.h
+++ b/src/gpu/ops/GrCopySurfaceOp.h
@@ -53,17 +53,7 @@
void onPrepare(GrOpFlushState*) override {}
- void onExecute(GrOpFlushState* state) override {
- SkASSERT(!state->commandBuffer());
-
- if (!fDst.get()->instantiate(state->resourceProvider()) ||
- !fSrc.get()->instantiate(state->resourceProvider())) {
- return;
- }
-
- state->gpu()->copySurface(fDst.get()->priv().peekSurface(),
- fSrc.get()->priv().peekSurface(), fSrcRect, fDstPoint);
- }
+ void onExecute(GrOpFlushState* state) override;
// For RenderTargetContexts 'fDst' is redundant with the RenderTarget that will be passed
// into onExecute in the drawOpArgs.
diff --git a/src/gpu/ops/GrDashLinePathRenderer.h b/src/gpu/ops/GrDashLinePathRenderer.h
index 482c1a0..11abf99 100644
--- a/src/gpu/ops/GrDashLinePathRenderer.h
+++ b/src/gpu/ops/GrDashLinePathRenderer.h
@@ -10,7 +10,7 @@
#include "GrPathRenderer.h"
-#include "GrGpu.h"
+class GrGpu;
class GrDashLinePathRenderer : public GrPathRenderer {
private:
diff --git a/src/gpu/ops/GrDiscardOp.h b/src/gpu/ops/GrDiscardOp.h
index 693a089..0d14036 100644
--- a/src/gpu/ops/GrDiscardOp.h
+++ b/src/gpu/ops/GrDiscardOp.h
@@ -10,7 +10,6 @@
#include "GrOp.h"
#include "GrOpFlushState.h"
-#include "GrRenderTarget.h"
#include "GrRenderTargetProxy.h"
class GrDiscardOp final : public GrOp {
diff --git a/src/gpu/ops/GrDrawPathOp.h b/src/gpu/ops/GrDrawPathOp.h
index 40db6ef..8df85b4 100644
--- a/src/gpu/ops/GrDrawPathOp.h
+++ b/src/gpu/ops/GrDrawPathOp.h
@@ -9,7 +9,6 @@
#define GrDrawPathOp_DEFINED
#include "GrDrawOp.h"
-#include "GrGpu.h"
#include "GrOpFlushState.h"
#include "GrPath.h"
#include "GrPathProcessor.h"
diff --git a/src/gpu/ops/GrNonAAFillRectOp.h b/src/gpu/ops/GrNonAAFillRectOp.h
index c936f2e..70dd8fd 100644
--- a/src/gpu/ops/GrNonAAFillRectOp.h
+++ b/src/gpu/ops/GrNonAAFillRectOp.h
@@ -10,8 +10,8 @@
#include <memory>
#include "GrColor.h"
+#include "GrDrawOp.h"
-class GrDrawOp;
class GrPaint;
class SkMatrix;
struct SkRect;
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp
index 048351b..d9f5037 100644
--- a/src/gpu/ops/GrSmallPathRenderer.cpp
+++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -16,9 +16,6 @@
#include "GrPipelineBuilder.h"
#include "GrResourceProvider.h"
#include "GrSWMaskHelper.h"
-#include "GrSurfacePriv.h"
-#include "GrSurfaceProxyPriv.h"
-#include "GrTexturePriv.h"
#include "effects/GrBitmapTextGeoProc.h"
#include "effects/GrDistanceFieldGeoProc.h"
#include "ops/GrMeshDrawOp.h"
diff --git a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
index a301564..46e9fa7 100644
--- a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
@@ -13,7 +13,6 @@
#include "GrGpu.h"
#include "GrPath.h"
#include "GrPipelineBuilder.h"
-#include "GrRenderTarget.h"
#include "GrRenderTargetContextPriv.h"
#include "GrResourceProvider.h"
#include "GrStencilPathOp.h"
diff --git a/src/gpu/vk/GrVkResourceProvider.h b/src/gpu/vk/GrVkResourceProvider.h
index 902dece..5940681 100644
--- a/src/gpu/vk/GrVkResourceProvider.h
+++ b/src/gpu/vk/GrVkResourceProvider.h
@@ -8,7 +8,6 @@
#ifndef GrVkResourceProvider_DEFINED
#define GrVkResourceProvider_DEFINED
-#include "GrGpu.h"
#include "GrResourceHandle.h"
#include "GrVkDescriptorPool.h"
#include "GrVkDescriptorSetManager.h"
diff --git a/src/gpu/vk/GrVkTexture.h b/src/gpu/vk/GrVkTexture.h
index fc3ffdf..239f6b3 100644
--- a/src/gpu/vk/GrVkTexture.h
+++ b/src/gpu/vk/GrVkTexture.h
@@ -8,7 +8,6 @@
#ifndef GrVkTexture_DEFINED
#define GrVkTexture_DEFINED
-#include "GrGpu.h"
#include "GrTexture.h"
#include "GrVkImage.h"
diff --git a/src/gpu/vk/GrVkTextureRenderTarget.cpp b/src/gpu/vk/GrVkTextureRenderTarget.cpp
index 1b72c1f..a777228 100644
--- a/src/gpu/vk/GrVkTextureRenderTarget.cpp
+++ b/src/gpu/vk/GrVkTextureRenderTarget.cpp
@@ -8,6 +8,7 @@
#include "GrVkTextureRenderTarget.h"
#include "GrRenderTargetPriv.h"
+#include "GrTexturePriv.h"
#include "GrVkGpu.h"
#include "GrVkImageView.h"
#include "GrVkUtil.h"
@@ -186,3 +187,10 @@
return true;
}
+size_t GrVkTextureRenderTarget::onGpuMemorySize() const {
+ // The plus 1 is to account for the resolve texture.
+ int numColorSamples = this->numColorSamples() + 1;
+ return GrSurface::ComputeSize(this->config(), this->width(), this->height(),
+ numColorSamples, // TODO: this still correct?
+ this->texturePriv().hasMipMaps());
+}
diff --git a/src/gpu/vk/GrVkTextureRenderTarget.h b/src/gpu/vk/GrVkTextureRenderTarget.h
index 7639dc0..7eab105 100644
--- a/src/gpu/vk/GrVkTextureRenderTarget.h
+++ b/src/gpu/vk/GrVkTextureRenderTarget.h
@@ -13,8 +13,6 @@
#include "GrVkRenderTarget.h"
#include "GrVkGpu.h"
-#include "GrTexturePriv.h"
-
#ifdef SK_BUILD_FOR_WIN
// Windows gives bogus warnings about inheriting asTexture/asRenderTarget via dominance.
#pragma warning(push)
@@ -113,13 +111,7 @@
GrVkImage::Wrapped wrapped);
// GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuffer's memory.
- size_t onGpuMemorySize() const override {
- // The plus 1 is to account for the resolve texture.
- int numColorSamples = this->numColorSamples() + 1;
- return GrSurface::ComputeSize(this->config(), this->width(), this->height(),
- numColorSamples, // TODO: this still correct?
- this->texturePriv().hasMipMaps());
- }
+ size_t onGpuMemorySize() const override;
};
#endif
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h
index f3e2793..9604dc6 100644
--- a/src/image/SkImage_Base.h
+++ b/src/image/SkImage_Base.h
@@ -13,8 +13,9 @@
#include "SkSurface.h"
#if SK_SUPPORT_GPU
- #include "GrTexture.h"
#include "GrTextureProxy.h"
+
+ class GrTexture;
#endif
#include <new>
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 19b0bc1..002e966 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -25,7 +25,7 @@
#include "GrResourceProvider.h"
#include "GrSemaphore.h"
#include "GrTextureAdjuster.h"
-#include "GrTexturePriv.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
#include "effects/GrNonlinearColorSpaceXformEffect.h"
#include "effects/GrYUVEffect.h"
diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h
index fbe29d8..32a6647 100644
--- a/src/image/SkImage_Gpu.h
+++ b/src/image/SkImage_Gpu.h
@@ -12,7 +12,6 @@
#include "GrContext.h"
#include "GrGpuResourcePriv.h"
#include "GrSurfaceProxyPriv.h"
-#include "GrTexture.h"
#include "SkAtomics.h"
#include "SkBitmap.h"
#include "SkGr.h"
@@ -20,6 +19,8 @@
#include "SkImage_Base.h"
#include "SkSurface.h"
+class GrTexture;
+
class SkImage_Gpu : public SkImage_Base {
public:
SkImage_Gpu(GrContext*, uint32_t uniqueID, SkAlphaType, sk_sp<GrTextureProxy>,
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 0fa8b65..4cac474 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -11,6 +11,7 @@
#include "GrContextPriv.h"
#include "GrRenderTargetContextPriv.h"
#include "GrResourceProvider.h"
+#include "GrTexture.h"
#include "SkCanvas.h"
#include "SkColorSpace_Base.h"
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp
index b6ae685..bcd0899 100644
--- a/tests/ClearTest.cpp
+++ b/tests/ClearTest.cpp
@@ -10,10 +10,6 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrRenderTargetContext.h"
-#include "GrGpu.h"
-#include "GrRenderTarget.h"
-#include "GrResourceProvider.h"
-#include "GrTexture.h"
static bool check_rect(GrRenderTargetContext* rtc, const SkIRect& rect, uint32_t expectedValue,
uint32_t* actualValue, int* failX, int* failY) {
diff --git a/tests/CopySurfaceTest.cpp b/tests/CopySurfaceTest.cpp
index 6acb239..2e35256 100644
--- a/tests/CopySurfaceTest.cpp
+++ b/tests/CopySurfaceTest.cpp
@@ -14,7 +14,6 @@
#include "GrResourceProvider.h"
#include "GrSurfaceContext.h"
#include "GrSurfaceProxy.h"
-#include "GrTexture.h"
#include "SkUtils.h"
diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp
index e092921..ed68e91 100644
--- a/tests/FloatingPointTextureTest.cpp
+++ b/tests/FloatingPointTextureTest.cpp
@@ -19,7 +19,6 @@
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrResourceProvider.h"
-#include "GrTexture.h"
#include "SkHalf.h"
static const int DEV_W = 100, DEV_H = 100;
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index 85fc835..037b553 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -12,7 +12,6 @@
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrGpu.h"
-#include "GrRenderTarget.h"
#include "GrResourceProvider.h"
#include "GrTest.h"
#include "GrTexture.h"
diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp
index d0c6c5b..2334172 100644
--- a/tests/ImageFilterCacheTest.cpp
+++ b/tests/ImageFilterCacheTest.cpp
@@ -182,6 +182,7 @@
#include "GrContextPriv.h"
#include "GrResourceProvider.h"
#include "GrTest.h"
+#include "GrTexture.h"
static sk_sp<GrTextureProxy> create_proxy(GrResourceProvider* resourceProvider) {
SkBitmap srcBM = create_bm();
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 84f9084..d69b89f 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -36,6 +36,7 @@
#include "GrGpu.h"
#include "GrResourceCache.h"
#include "GrTest.h"
+#include "GrTexture.h"
#endif
using namespace sk_gpu_test;
diff --git a/tests/PackedConfigsTextureTest.cpp b/tests/PackedConfigsTextureTest.cpp
index e104be5..916f27a 100644
--- a/tests/PackedConfigsTextureTest.cpp
+++ b/tests/PackedConfigsTextureTest.cpp
@@ -17,7 +17,6 @@
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrResourceProvider.h"
-#include "GrTexture.h"
static const int DEV_W = 10, DEV_H = 10;
static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H);
diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp
index 167cc4b..98f0985 100644
--- a/tests/ProxyConversionTest.cpp
+++ b/tests/ProxyConversionTest.cpp
@@ -14,6 +14,7 @@
#include "GrRenderTargetProxy.h"
#include "GrResourceProvider.h"
#include "GrSurfaceProxy.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
static sk_sp<GrSurfaceProxy> make_wrapped_FBO0(GrResourceProvider* provider,
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp
index cd07e18..61e5720 100644
--- a/tests/ProxyRefTest.cpp
+++ b/tests/ProxyRefTest.cpp
@@ -11,10 +11,10 @@
#if SK_SUPPORT_GPU
#include "GrContextPriv.h"
-#include "GrRenderTargetPriv.h"
#include "GrRenderTargetProxy.h"
#include "GrResourceProvider.h"
#include "GrSurfaceProxy.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
int32_t GrIORefProxy::getProxyRefCnt_TestOnly() const {
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index 114f5bb..f9cefc5 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -16,6 +16,7 @@
#include "GrRenderTargetProxy.h"
#include "GrResourceProvider.h"
#include "GrSurfaceProxy.h"
+#include "GrTexture.h"
#include "GrTextureProxy.h"
// Check that the surface proxy's member vars are set as expected
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index 460d4ee..2429fbd 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -16,11 +16,11 @@
#include "GrGpu.h"
#include "GrGpuResourceCacheAccess.h"
#include "GrGpuResourcePriv.h"
-#include "GrRenderTarget.h"
-#include "GrRenderTargetPriv.h"
#include "GrResourceCache.h"
#include "GrResourceProvider.h"
#include "GrTest.h"
+#include "GrTexture.h"
+
#include "SkCanvas.h"
#include "SkGr.h"
#include "SkMessageBus.h"
diff --git a/tests/SkpSkGrTest.cpp b/tests/SkpSkGrTest.cpp
index 0e425a0..8280e14 100644
--- a/tests/SkpSkGrTest.cpp
+++ b/tests/SkpSkGrTest.cpp
@@ -7,7 +7,6 @@
#include "GrContext.h"
#include "GrContextFactory.h"
-#include "GrRenderTarget.h"
#include "SkGpuDevice.h"
#include "gl/GrGLDefines.h"
diff --git a/tests/VkWrapTests.cpp b/tests/VkWrapTests.cpp
index c2edae4..bbc3f8d 100644
--- a/tests/VkWrapTests.cpp
+++ b/tests/VkWrapTests.cpp
@@ -13,6 +13,8 @@
#include "GrContextFactory.h"
#include "GrTest.h"
+#include "GrTexture.h"
+
#include "Test.h"
#include "vk/GrVkCaps.h"
#include "vk/GrVkGpu.h"
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 6ade401..5a9fc96 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -20,6 +20,7 @@
#include "GrResourceCache.h"
#include "GrSemaphore.h"
#include "GrSurfaceContextPriv.h"
+#include "GrTexture.h"
#include "SkGr.h"
#include "SkImage_Gpu.h"
#include "SkMathPriv.h"
diff --git a/tools/viewer/sk_app/GLWindowContext.cpp b/tools/viewer/sk_app/GLWindowContext.cpp
index faa78ab..2f0d5dc 100644
--- a/tools/viewer/sk_app/GLWindowContext.cpp
+++ b/tools/viewer/sk_app/GLWindowContext.cpp
@@ -8,7 +8,6 @@
#include "GrBackendSurface.h"
#include "GrContext.h"
-#include "GrRenderTarget.h"
#include "GLWindowContext.h"
#include "gl/GrGLDefines.h"
diff --git a/tools/viewer/sk_app/VulkanWindowContext.cpp b/tools/viewer/sk_app/VulkanWindowContext.cpp
index e53cc7c..261206c 100644
--- a/tools/viewer/sk_app/VulkanWindowContext.cpp
+++ b/tools/viewer/sk_app/VulkanWindowContext.cpp
@@ -8,7 +8,6 @@
#include "GrBackendSurface.h"
#include "GrContext.h"
-#include "GrRenderTarget.h"
#include "SkAutoMalloc.h"
#include "SkSurface.h"
#include "VulkanWindowContext.h"