diff options
Diffstat (limited to 'include/gpu/SkGpuDeviceFactory.h')
-rw-r--r-- | include/gpu/SkGpuDeviceFactory.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/gpu/SkGpuDeviceFactory.h b/include/gpu/SkGpuDeviceFactory.h index 5dcba6a..6f62ad6 100644 --- a/include/gpu/SkGpuDeviceFactory.h +++ b/include/gpu/SkGpuDeviceFactory.h @@ -21,7 +21,7 @@ class GrContext; -class SkGpuDeviceFactory : public SkDeviceFactory { +class SK_API SkGpuDeviceFactory : public SkDeviceFactory { public: /** * The constructor will ref() the context, passing it to each device @@ -34,6 +34,14 @@ public: * construction. */ SkGpuDeviceFactory(GrContext*, GrRenderTarget* rootRenderTarget); + + /** + * When the root layer is both a GrRenderTarget and a GrTexture it + * is handy to have the factory hang on to a ref to the GrTexture object. + * This is because the GrTexture has a ref to the GrRenderTarget but not + * vice-versa. + */ + SkGpuDeviceFactory(GrContext*, GrTexture* rootRenderTargetTexture); virtual ~SkGpuDeviceFactory(); @@ -43,6 +51,7 @@ public: private: GrContext* fContext; GrRenderTarget* fRootRenderTarget; + GrTexture* fRootTexture; }; #endif |