diff options
author | 2014-09-29 14:20:11 -0700 | |
---|---|---|
committer | 2014-09-29 14:20:11 -0700 | |
commit | c0eb9b9818462471f5fc1c47fa549c6052d8bbae (patch) | |
tree | 9da0008e6fe68fbe2010ad14f5e6c54c7fa5008b /include/gpu/GrContext.h | |
parent | c5e15a1afab2621e860a251c3fcf5917867ad49f (diff) |
Make "priv" classes for GrTexure and GrSurface.
R=robertphillips@google.com, egdaniel@google.com, joshualitt@google.com, joshualitt@chromium.org
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/596053002
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r-- | include/gpu/GrContext.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 45cd599132..e1af73ccb2 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -1121,24 +1121,7 @@ public: * Note that the caller is assumed to accept and manage the ref to the * returned texture. */ - GrTexture* detach() { - if (NULL == fTexture) { - return NULL; - } - GrTexture* texture = fTexture; - fTexture = NULL; - - // This GrAutoScratchTexture has a ref from lockAndRefScratchTexture, which we give up now. - // The cache also has a ref which we are lending to the caller of detach(). When the caller - // lets go of the ref and the ref count goes to 0 internal_dispose will see this flag is - // set and re-ref the texture, thereby restoring the cache's ref. - SkASSERT(!texture->unique()); - texture->impl()->setFlag((GrTextureFlags) GrTextureImpl::kReturnToCache_FlagBit); - texture->unref(); - SkASSERT(texture->getCacheEntry()); - - return texture; - } + GrTexture* detach(); GrTexture* set(GrContext* context, const GrTextureDesc& desc, |