| Index: src/gpu/gl/GrGLTexture.h
|
| diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h
|
| index 937b8be13edd0b3d0a3e998be62aec19fb65b1e1..d634046af48348265b9b01efdb7bb5e9096347be 100644
|
| --- a/src/gpu/gl/GrGLTexture.h
|
| +++ b/src/gpu/gl/GrGLTexture.h
|
| @@ -29,12 +29,13 @@ public:
|
| };
|
|
|
| struct IDDesc {
|
| - GrGLTextureInfo fInfo;
|
| - GrGpuResource::LifeCycle fLifeCycle;
|
| + GrGLTextureInfo fInfo;
|
| + GrBackendObjectLifeCycle fLifeCycle;
|
| };
|
|
|
| - GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&);
|
| - GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, bool wasMipMapDataProvided);
|
| + GrGLTexture(GrGLGpu*, SkBudgeted, const GrSurfaceDesc&, const IDDesc&);
|
| + GrGLTexture(GrGLGpu*, SkBudgeted, const GrSurfaceDesc&, const IDDesc&,
|
| + bool wasMipMapDataProvided);
|
|
|
| GrBackendObject getTextureHandle() const override;
|
|
|
| @@ -52,34 +53,33 @@ public:
|
| fTexParamsTimestamp = timestamp;
|
| }
|
|
|
| - GrGLuint textureID() const { return fInfo.fID; }
|
| + GrGLuint textureID() const { return fIDDesc.fInfo.fID; }
|
|
|
| - GrGLenum target() const { return fInfo.fTarget; }
|
| + GrGLenum target() const { return fIDDesc.fInfo.fTarget; }
|
|
|
| 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 };
|
| - GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived);
|
| + GrGLTexture(GrGLGpu*, SkBudgeted, const GrSurfaceDesc&, const IDDesc&, Derived);
|
|
|
| - void init(const GrSurfaceDesc&, const IDDesc&);
|
| + void init(const GrSurfaceDesc&);
|
|
|
| void onAbandon() override;
|
| void onRelease() override;
|
| +
|
| + bool refsWrappedResources() const override;
|
| +
|
| + size_t onGpuMemorySize() const override;
|
| +
|
| void setMemoryBacking(SkTraceMemoryDump* traceMemoryDump,
|
| const SkString& dumpName) const override;
|
|
|
| private:
|
| TexParams fTexParams;
|
| GrGpu::ResetTimestamp fTexParamsTimestamp;
|
| - // Holds the texture target and ID. A pointer to this may be shared to external clients for
|
| - // direct interaction with the GL object.
|
| - GrGLTextureInfo fInfo;
|
| -
|
| - // 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 fTextureIDLifecycle;
|
| + IDDesc fIDDesc;
|
|
|
| typedef GrTexture INHERITED;
|
| };
|
|
|