diff options
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrSurface.h | 3 | ||||
-rw-r--r-- | include/gpu/SkGr.h | 1 | ||||
-rw-r--r-- | include/gpu/SkGrPixelRef.h | 10 |
3 files changed, 8 insertions, 6 deletions
diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h index c401a905ff..15e44ab593 100644 --- a/include/gpu/GrSurface.h +++ b/include/gpu/GrSurface.h @@ -15,6 +15,7 @@ class GrTexture; class GrRenderTarget; +struct SkImageInfo; class GrSurface : public GrResource { public: @@ -58,6 +59,8 @@ public: */ const GrTextureDesc& desc() const { return fDesc; } + void asImageInfo(SkImageInfo*) const; + /** * @return the texture associated with the surface, may be NULL. */ diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h index 5e5ca4b72c..db08548f5d 100644 --- a/include/gpu/SkGr.h +++ b/include/gpu/SkGr.h @@ -50,6 +50,7 @@ GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); * kUnknown_PixelConfig if the conversion cannot be done. */ GrPixelConfig SkBitmapConfig2GrPixelConfig(SkBitmap::Config); +bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*); static inline GrColor SkColor2GrColor(SkColor c) { SkPMColor pm = SkPreMultiplyColor(c); diff --git a/include/gpu/SkGrPixelRef.h b/include/gpu/SkGrPixelRef.h index c29c27fb3b..4d33b9d06b 100644 --- a/include/gpu/SkGrPixelRef.h +++ b/include/gpu/SkGrPixelRef.h @@ -23,14 +23,13 @@ */ class SK_API SkROLockPixelsPixelRef : public SkPixelRef { public: - SkROLockPixelsPixelRef(); + SkROLockPixelsPixelRef(const SkImageInfo&); virtual ~SkROLockPixelsPixelRef(); protected: - // override from SkPixelRef - virtual void* onLockPixels(SkColorTable** ptr); - virtual void onUnlockPixels(); - virtual bool onLockPixelsAreWritable() const; // return false; + virtual bool onNewLockPixels(LockRec*) SK_OVERRIDE; + virtual void onUnlockPixels() SK_OVERRIDE; + virtual bool onLockPixelsAreWritable() const SK_OVERRIDE; // return false; private: SkBitmap fBitmap; @@ -47,7 +46,6 @@ public: * cache and would like the pixel ref to unlock it in its destructor then transferCacheLock * should be set to true. */ - SkGrPixelRef(GrSurface*, bool transferCacheLock = false); SkGrPixelRef(const SkImageInfo&, GrSurface*, bool transferCacheLock = false); virtual ~SkGrPixelRef(); |