diff options
author | Robert Phillips <robertphillips@google.com> | 2017-06-13 12:44:56 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-13 17:21:41 +0000 |
commit | 646e4293f06d9de6d44dbfa3c32cdc15a6f5906e (patch) | |
tree | 282acbcd4dc4204d06ed7d61e1d9884dbd6dd3f1 | |
parent | 1791a064f1c1256cf29c69a5eef88de66ee6e794 (diff) |
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>
75 files changed, 177 insertions, 128 deletions
diff --git a/debugger/QT/SkGLWidget.h b/debugger/QT/SkGLWidget.h index 870b2834b1..e7493a533c 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 388ef0e187..a6a2a7e816 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 5f569ddfbc..8738c3fd6a 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 6fded022a2..0f9a4cffce 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 cd481a1239..7b5c6e0199 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 c856841f2a..6254430f38 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 197b8055d5..1927715539 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 689563afc5..57abec9ebf 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 3a3cd31f44..8446489c70 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 17db956697..a96fbce0cd 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 325dbbd94b..a791213c04 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 78f6ba4b07..37bad65a1f 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 67b5e8f21b..cb052ef666 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 6cec47775c..54bb3a7d0a 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp @@ -163,6 +163,20 @@ sk_sp<GrTexture> GrGpu::createTexture(const GrSurfaceDesc& origDesc, SkBudgeted 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 8b8c7b3809..3c400a8b9c 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -111,20 +111,12 @@ public: /** * 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 72deabe197..b8166f053a 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 @@ GrOpFlushState::GrOpFlushState(GrGpu* gpu, GrResourceProvider* resourceProvider) , 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 402bac5325..3a2fe328e6 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 @@ public: 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 2f08f4392a..fb9c384269 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 ad60726cd4..15ae6c1fd3 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 @@ sk_sp<GrPathRange> GrPathRendering::createGlyphs(const SkTypeface* typeface, 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 23c731f951..bcd2cfa89e 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 @@ public: 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 @@ public: 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 9bb2c49c17..aedc07ca06 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 8480ffac40..7fcd7faf2b 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 f7aecdd9d7..19720326ca 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 6945f47df4..b42277ccc8 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 ea699fbe10..52340bb0e9 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp @@ -307,6 +307,11 @@ GrTexture* GrResourceProvider::findAndRefTextureByUniqueKey(const GrUniqueKey& k 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 2e9b8a824d..1e0146ab07 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 @@ public: 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 064cc0a22b..4f4e5aa266 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 1f2a04ace4..ff7d6e3494 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 7d1eba3326..d54f4df6fe 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 9a0936ccea..ae4de1bfa2 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 776eff0cc4..d1726a0122 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 8c16d3342d..5c7c0bd034 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 ebe4f040ac..3269f4136e 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 d7a1f96462..a6fafbed5b 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -4309,3 +4309,19 @@ sk_sp<GrSemaphore> GrGLGpu::prepareTextureForCrossContextUsage(GrTexture* textur 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 2e258fdf66..f121df3f01 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 @@ private: 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 ddbd75c577..5b03435d7c 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 eac29b6d1f..c643cfffa5 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 @@ sk_sp<GrGLTextureRenderTarget> GrGLTextureRenderTarget::MakeWrapped( 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 0d3b19daed..e6eb19512b 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 @@ private: 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 7c6b2d432e..c2e0ab7f8d 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 933d422535..dfdbd8242f 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 f0f1cc0d2d..40e3c5e272 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 7458437cd7..6a8fc64222 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 3c5976df72..d0df132526 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 1a9a5e0dfa..4e8fab7d70 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 @@ std::unique_ptr<GrOp> GrCopySurfaceOp::Make(GrSurfaceProxy* dstProxy, GrSurfaceP 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 6c804088dd..64431a523d 100644 --- a/src/gpu/ops/GrCopySurfaceOp.h +++ b/src/gpu/ops/GrCopySurfaceOp.h @@ -53,17 +53,7 @@ private: 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 482c1a024e..11abf99396 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 693a089abe..0d140362d5 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 40db6eface..8df85b430b 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 c936f2efa2..70dd8fdcb5 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 048351bab7..d9f5037bb7 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 a3015645ad..46e9fa7aae 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 902dece073..5940681e8c 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 fc3ffdff2e..239f6b350d 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 1b72c1f94b..a77722832d 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 @@ bool GrVkTextureRenderTarget::updateForMipmap(GrVkGpu* gpu, const GrVkImageInfo& 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 7639dc06ac..7eab1058d6 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 @@ private: 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 f3e27933a3..9604dc6b31 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 19b0bc1bae..002e966da5 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 fbe29d8650..32a6647a73 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 0fa8b650c5..4cac4744a0 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 b6ae685831..bcd0899867 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 6acb23967b..2e35256d78 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 e092921cbb..ed68e91e4a 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 85fc835bfe..037b55399f 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 d0c6c5bcb5..23341723ef 100644 --- a/tests/ImageFilterCacheTest.cpp +++ b/tests/ImageFilterCacheTest.cpp @@ -182,6 +182,7 @@ DEF_TEST(ImageFilterCache_ImageBackedRaster, reporter) { #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 84f9084a03..d69b89fb90 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 e104be594d..916f27a04a 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 167cc4b10d..98f0985e03 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 cd07e186c8..61e57209ce 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 114f5bb639..f9cefc5b89 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 460d4ee096..2429fbdf09 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 0e425a006a..8280e143a7 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 c2edae41ff..bbc3f8d847 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 6ade40120f..5a9fc9690e 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 faa78ab09c..2f0d5dc74b 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 e53cc7c1c2..261206c221 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" |