| Index: src/gpu/gl/GrGLRenderTarget.h
|
| diff --git a/src/gpu/gl/GrGLRenderTarget.h b/src/gpu/gl/GrGLRenderTarget.h
|
| index d1365efd420c10af802bd173fd534a4d443871cd..f226b1bee44f4bc4d4a4c7ca3cf8005aab9a31b5 100644
|
| --- a/src/gpu/gl/GrGLRenderTarget.h
|
| +++ b/src/gpu/gl/GrGLRenderTarget.h
|
| @@ -24,9 +24,9 @@ public:
|
|
|
| struct IDDesc {
|
| GrGLuint fRTFBOID;
|
| + GrBackendObjectLifeCycle fRTFBOLifeCycle;
|
| GrGLuint fTexFBOID;
|
| GrGLuint fMSColorRenderbufferID;
|
| - GrGpuResource::LifeCycle fLifeCycle;
|
| GrRenderTarget::SampleConfig fSampleConfig;
|
| };
|
|
|
| @@ -61,9 +61,9 @@ public:
|
|
|
| GrBackendObject getRenderTargetHandle() const override { return fRTFBOID; }
|
|
|
| - /** When we don't own the FBO ID we don't attempt to modify its attachments. */
|
| + /** When we have not created the FBO ID we do not attempt to modify its attachments. */
|
| bool canAttemptStencilAttachment() const override {
|
| - return kCached_LifeCycle == fRTLifecycle || kUncached_LifeCycle == fRTLifecycle;
|
| + return GrBackendObjectLifeCycle::kInternal == fRTFBOLifeCycle;
|
| }
|
|
|
| // GrGLRenderTarget overrides dumpMemoryStatistics so it can log its texture and renderbuffer
|
| @@ -71,11 +71,8 @@ public:
|
| void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const override;
|
|
|
| protected:
|
| - // The public constructor registers this object with the cache. However, only the most derived
|
| - // class should register with the cache. This constructor does not do the registration and
|
| - // rather moves that burden onto the derived class.
|
| - enum Derived { kDerived };
|
| - GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived);
|
| + // Constructor for subclasses.
|
| + GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&);
|
|
|
| void init(const GrSurfaceDesc&, const IDDesc&);
|
|
|
| @@ -86,8 +83,7 @@ protected:
|
| size_t onGpuMemorySize() const override;
|
|
|
| private:
|
| - // This ctor is used only for creating wrapped render targets and is only called for the static
|
| - // create function CreateWrapped(...).
|
| + // Constructor for instances wrapping backend objects.
|
| GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, GrGLStencilAttachment*);
|
|
|
| GrGLGpu* getGLGpu() const;
|
| @@ -103,9 +99,7 @@ private:
|
| GrGLuint fTexFBOID;
|
| GrGLuint fMSColorRenderbufferID;
|
|
|
| - // We track this separately from GrGpuResource because this may be both a texture and a render
|
| - // target, and the texture may be wrapped while the render target is not.
|
| - LifeCycle fRTLifecycle;
|
| + GrBackendObjectLifeCycle fRTFBOLifeCycle;
|
|
|
| // when we switch to this render target we want to set the viewport to
|
| // only render to content area (as opposed to the whole allocation) and
|
|
|