diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrSurface.h | 34 | ||||
-rw-r--r-- | include/private/GrSurfaceProxy.h | 1 |
2 files changed, 12 insertions, 23 deletions
diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h index 81bc215c01..65f1e0f690 100644 --- a/include/gpu/GrSurface.h +++ b/include/gpu/GrSurface.h @@ -14,7 +14,6 @@ #include "SkImageInfo.h" #include "SkRect.h" -class GrOpList; class GrRenderTarget; class GrSurfacePriv; class GrTexture; @@ -37,7 +36,8 @@ public: SkRect getBoundsRect() const { return SkRect::MakeIWH(this->width(), this->height()); } GrSurfaceOrigin origin() const { - SkASSERT(kTopLeft_GrSurfaceOrigin == fDesc.fOrigin || kBottomLeft_GrSurfaceOrigin == fDesc.fOrigin); + SkASSERT(kTopLeft_GrSurfaceOrigin == fDesc.fOrigin || + kBottomLeft_GrSurfaceOrigin == fDesc.fOrigin); return fDesc.fOrigin; } @@ -55,16 +55,16 @@ public: const GrSurfaceDesc& desc() const { return fDesc; } /** - * @return the texture associated with the surface, may be NULL. + * @return the texture associated with the surface, may be null. */ - virtual GrTexture* asTexture() { return NULL; } - virtual const GrTexture* asTexture() const { return NULL; } + virtual GrTexture* asTexture() { return nullptr; } + virtual const GrTexture* asTexture() const { return nullptr; } /** - * @return the render target underlying this surface, may be NULL. + * @return the render target underlying this surface, may be null. */ - virtual GrRenderTarget* asRenderTarget() { return NULL; } - virtual const GrRenderTarget* asRenderTarget() const { return NULL; } + virtual GrRenderTarget* asRenderTarget() { return nullptr; } + virtual const GrRenderTarget* asRenderTarget() const { return nullptr; } /** Access methods that are only to be used within Skia code. */ inline GrSurfacePriv surfacePriv(); @@ -78,9 +78,6 @@ public: fReleaseCtx = ctx; } - void setLastOpList(GrOpList* opList); - GrOpList* getLastOpList() { return fLastOpList; } - static size_t WorstCaseSize(const GrSurfaceDesc& desc, bool useNextPow2 = false); static size_t ComputeSize(const GrSurfaceDesc& desc, int colorSamplesPerPixel, bool hasMIPMaps, bool useNextPow2 = false); @@ -97,9 +94,8 @@ protected: GrSurface(GrGpu* gpu, const GrSurfaceDesc& desc) : INHERITED(gpu) , fDesc(desc) - , fReleaseProc(NULL) - , fReleaseCtx(NULL) - , fLastOpList(nullptr) { + , fReleaseProc(nullptr) + , fReleaseCtx(nullptr) { } ~GrSurface() override; @@ -112,21 +108,13 @@ private: void invokeReleaseProc() { if (fReleaseProc) { fReleaseProc(fReleaseCtx); - fReleaseProc = NULL; + fReleaseProc = nullptr; } } ReleaseProc fReleaseProc; ReleaseCtx fReleaseCtx; - // The last opList that wrote to or is currently going to write to this surface - // The opList can be closed (e.g., no render target or texture context is currently bound - // to this renderTarget or texture). - // This back-pointer is required so that we can add a dependancy between - // the opList used to create the current contents of this surface - // and the opList of a destination surface to which this one is being drawn or copied. - GrOpList* fLastOpList; - typedef GrGpuResource INHERITED; }; diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 8d5a0caf10..e438e66cad 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -14,6 +14,7 @@ #include "SkRect.h" class GrCaps; +class GrOpList; class GrRenderTargetOpList; class GrRenderTargetProxy; class GrResourceProvider; |