aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/GrRenderTargetProxy.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-03-16 16:47:25 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-19 12:21:05 +0000
commitfe0253f8bb64857df088d5ff54e2b5b66b102b46 (patch)
tree0d540ceaf02a992228dd713ccfee9fef413f7b3b /include/private/GrRenderTargetProxy.h
parent4410d7ff757268792dd5f842d585c514cc80a5fb (diff)
Alter GrSurface/GrSurfaceProxy flags to prepare for GrTexture/GrTextureProxy -specific flags
This CL: moves GrRenderTarget::fFlags to GrSurface::fSurfaceFlags adds a GrInternalSurfaceFlags type and uses it for GrSurfaceProxy::fSurfaceFlags The goal of this is to provide a location where GrTexture/GrTextureProxy-specific flags (i.e., isExternal & isRectangle) can be stored. Change-Id: I8df7b79036a6853dd378ff6cf10d4b37c60dd511 Reviewed-on: https://skia-review.googlesource.com/114796 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/private/GrRenderTargetProxy.h')
-rw-r--r--include/private/GrRenderTargetProxy.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/include/private/GrRenderTargetProxy.h b/include/private/GrRenderTargetProxy.h
index 2468df35ad..f1e1b7d9ff 100644
--- a/include/private/GrRenderTargetProxy.h
+++ b/include/private/GrRenderTargetProxy.h
@@ -27,12 +27,10 @@ public:
GrFSAAType fsaaType() const {
if (fSampleCnt <= 1) {
- SkASSERT(!(fRenderTargetFlags & GrRenderTargetFlags::kMixedSampled));
+ SkASSERT(!this->hasMixedSamples());
return GrFSAAType::kNone;
}
- return (fRenderTargetFlags & GrRenderTargetFlags::kMixedSampled)
- ? GrFSAAType::kMixedSamples
- : GrFSAAType::kUnifiedMSAA;
+ return this->hasMixedSamples() ? GrFSAAType::kMixedSamples : GrFSAAType::kUnifiedMSAA;
}
/*
@@ -55,8 +53,6 @@ public:
int maxWindowRectangles(const GrCaps& caps) const;
- GrRenderTargetFlags testingOnly_getFlags() const;
-
// TODO: move this to a priv class!
bool refsWrappedObjects() const;
@@ -65,7 +61,7 @@ protected:
// Deferred version
GrRenderTargetProxy(const GrCaps&, const GrSurfaceDesc&, GrSurfaceOrigin, SkBackingFit,
- SkBudgeted, uint32_t flags);
+ SkBudgeted, GrInternalSurfaceFlags);
// Lazy-callback version
// There are two main use cases for lazily-instantiated proxies:
@@ -79,7 +75,7 @@ protected:
// know the final size until flush time.
GrRenderTargetProxy(LazyInstantiateCallback&&, LazyInstantiationType lazyType,
const GrSurfaceDesc&, GrSurfaceOrigin, SkBackingFit, SkBudgeted,
- uint32_t flags, GrRenderTargetFlags renderTargetFlags);
+ GrInternalSurfaceFlags);
// Wrapped version
GrRenderTargetProxy(sk_sp<GrSurface>, GrSurfaceOrigin);
@@ -97,13 +93,6 @@ private:
// For deferred proxies that pointer is filled in when we need to instantiate the
// deferred resource.
- // These don't usually get computed until the render target is instantiated, but the render
- // target proxy may need to answer queries about it before then. And since in the deferred case
- // we know the newly created render target will be internal, we are able to precompute what the
- // flags will ultimately end up being. In the wrapped case we just copy the wrapped
- // rendertarget's info here.
- GrRenderTargetFlags fRenderTargetFlags;
-
typedef GrSurfaceProxy INHERITED;
};