aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/SkGrTexturePixelRef.h
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-29 20:55:14 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-29 20:55:14 +0000
commit41efe04af99b11440b6de39919f92bc9d1514f5c (patch)
treed4bdcb3ae5af65b537f0b097ee7f568456160ed0 /include/gpu/SkGrTexturePixelRef.h
parentb340cf7e3d43f726c3b7b00fe23c728739e5557e (diff)
Partially rolled forward the SkGrPixelRef changes
Diffstat (limited to 'include/gpu/SkGrTexturePixelRef.h')
-rw-r--r--include/gpu/SkGrTexturePixelRef.h77
1 files changed, 3 insertions, 74 deletions
diff --git a/include/gpu/SkGrTexturePixelRef.h b/include/gpu/SkGrTexturePixelRef.h
index e4f521c157..ffa4bef444 100644
--- a/include/gpu/SkGrTexturePixelRef.h
+++ b/include/gpu/SkGrTexturePixelRef.h
@@ -11,81 +11,10 @@
#ifndef SkGrTexturePixelRef_DEFINED
#define SkGrTexturePixelRef_DEFINED
-#include "SkBitmap.h"
-#include "SkPixelRef.h"
-#include "GrTexture.h"
-#include "GrRenderTarget.h"
+#include "SkGrPixelRef.h"
-
-/**
- * Common baseclass that implements onLockPixels() by calling onReadPixels().
- * Since it has a copy, it always returns false for onLockPixelsAreWritable().
- */
-class SK_API SkROLockPixelsPixelRef_Deprecated : public SkPixelRef {
-public:
- SkROLockPixelsPixelRef_Deprecated();
- virtual ~SkROLockPixelsPixelRef_Deprecated();
-
-protected:
- // override from SkPixelRef
- virtual void* onLockPixels(SkColorTable** ptr);
- virtual void onUnlockPixels();
- virtual bool onLockPixelsAreWritable() const; // return false;
-
-private:
- SkBitmap fBitmap;
- typedef SkPixelRef INHERITED;
-};
-
-/**
- * PixelRef that wraps a GrTexture
- */
-class SK_API SkGrTexturePixelRef : public SkROLockPixelsPixelRef_Deprecated {
-public:
- SkGrTexturePixelRef(GrTexture*);
- virtual ~SkGrTexturePixelRef();
-
- // override from SkPixelRef
- virtual SkGpuTexture* getTexture();
-
- SK_DECLARE_UNFLATTENABLE_OBJECT()
-
-protected:
- // override from SkPixelRef
- virtual bool onReadPixels(SkBitmap* dst, const SkIRect* subset);
-
- // override from SkPixelRef
- virtual SkPixelRef* deepCopy(SkBitmap::Config dstConfig) SK_OVERRIDE;
-
-private:
- GrTexture* fTexture;
- typedef SkROLockPixelsPixelRef_Deprecated INHERITED;
-};
-
-/**
- * PixelRef that wraps a GrRenderTarget
- */
-class SK_API SkGrRenderTargetPixelRef : public SkROLockPixelsPixelRef_Deprecated {
-public:
- SkGrRenderTargetPixelRef(GrRenderTarget* rt);
- virtual ~SkGrRenderTargetPixelRef();
-
- // override from SkPixelRef
- virtual SkGpuTexture* getTexture();
-
- SK_DECLARE_UNFLATTENABLE_OBJECT()
-
-protected:
- // override from SkPixelRef
- virtual bool onReadPixels(SkBitmap* dst, const SkIRect* subset);
-
- // override from SkPixelRef
- virtual SkPixelRef* deepCopy(SkBitmap::Config dstConfig) SK_OVERRIDE;
-
-private:
- GrRenderTarget* fRenderTarget;
- typedef SkROLockPixelsPixelRef_Deprecated INHERITED;
-};
+typedef SkGrPixelRef SkGrTexturePixelRef;
+typedef SkGrPixelRef SkGrRenderTargetPixelRef;
#endif