aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-17 07:53:07 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-17 12:41:59 +0000
commitc589b0b5c0235c3adedc574c8846fb62414ed93c (patch)
tree747f760e5b74a05ce5c0cbc7c778d3faece2693a /include
parentbab2dbb5fa50da8e8365abbaa9f1490e659f436c (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')
-rw-r--r--include/gpu/GrSurface.h34
-rw-r--r--include/private/GrSurfaceProxy.h1
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;