diff options
author | 2017-04-17 07:53:07 -0400 | |
---|---|---|
committer | 2017-04-17 12:41:59 +0000 | |
commit | c589b0b5c0235c3adedc574c8846fb62414ed93c (patch) | |
tree | 747f760e5b74a05ce5c0cbc7c778d3faece2693a /include/gpu | |
parent | bab2dbb5fa50da8e8365abbaa9f1490e659f436c (diff) |
Remove lastOpList capability from GrSurface
This is split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists)
TBR=bsalomon@google.com
Change-Id: I80d589b42918ddd77538484c808b069576691da4
Reviewed-on: https://skia-review.googlesource.com/11793
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrSurface.h | 34 |
1 files changed, 11 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; }; |