Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: include/gpu/GrTexture.h

Issue 695813003: Add class GrGLTextureRenderTarget for GL texture/rendertarget objects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: forgot to save file Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/gpu/GrTexture.h
diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h
index 13d5667811a55bf7ca18f25684f5839b185ae5e7..87f0d5ab0a893826a7500f2b3777d49c57c14114 100644
--- a/include/gpu/GrTexture.h
+++ b/include/gpu/GrTexture.h
@@ -10,7 +10,6 @@
#define GrTexture_DEFINED
#include "GrSurface.h"
-#include "GrRenderTarget.h"
#include "SkPoint.h"
#include "SkRefCnt.h"
@@ -18,7 +17,7 @@ class GrResourceKey;
class GrTextureParams;
class GrTexturePriv;
-class GrTexture : public GrSurface {
+class GrTexture : virtual public GrSurface {
public:
/**
* Approximate number of bytes used by the texture
@@ -27,8 +26,6 @@ public:
virtual GrTexture* asTexture() SK_OVERRIDE { return this; }
virtual const GrTexture* asTexture() const SK_OVERRIDE { return this; }
- virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE { return fRenderTarget.get(); }
- virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE { return fRenderTarget.get(); }
/**
* Return the native ID or handle to the texture, depending on the
@@ -54,18 +51,8 @@ public:
inline const GrTexturePriv texturePriv() const;
protected:
- // A texture refs its rt representation but not vice-versa. It is up to
- // the subclass constructor to initialize this pointer.
- SkAutoTUnref<GrRenderTarget> fRenderTarget;
-
GrTexture(GrGpu* gpu, bool isWrapped, const GrSurfaceDesc& desc);
- virtual ~GrTexture();
-
- // GrResource overrides
- virtual void onRelease() SK_OVERRIDE;
- virtual void onAbandon() SK_OVERRIDE;
-
void validateDesc() const;
private:

Powered by Google App Engine
This is Rietveld 408576698