diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-16 18:05:35 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-16 18:05:35 +0000 |
commit | b5b3168a645802f66233234a06dd5a3764f18018 (patch) | |
tree | f21923d1770265b866880a3d7a996e755b408656 /include/gpu | |
parent | 3e7ff9f31daedefd5431e724b94cebbd15d9ac21 (diff) |
First pass at improving temporary tex/rt reuse
Review URL: http://codereview.appspot.com/4625043/
git-svn-id: http://skia.googlecode.com/svn/trunk@1616 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/SkGpuDevice.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h index 601da09427..96afa082ff 100644 --- a/include/gpu/SkGpuDevice.h +++ b/include/gpu/SkGpuDevice.h @@ -35,11 +35,13 @@ public: /** * The SkGpuDevice will render to the GrRenderTarget, or if the paremeter is * null it will create its own render target and manage that target's - * lifetime. + * lifetime. Setting isSaveLayer to true is for internal use and may cause + * problems when using the device's bitmap as a src if used externally. */ SkGpuDevice(GrContext*, const SkBitmap& bitmap, - GrRenderTarget* renderTargetOrNull); + GrRenderTarget* renderTargetOrNull, + bool isSaveLayer = false); /** * Magic value that can be passed to constructor. Causes @@ -128,7 +130,8 @@ protected: TexCache* lockCachedTexture(const SkBitmap& bitmap, const GrSamplerState& sampler, GrTexture** texture, - bool forDeviceRenderTarget = false); + bool forDeviceRenderTarget = false, + bool isSaveLayer = false); void unlockCachedTexture(TexCache*); class SkAutoCachedTexture { |