aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-01-14 10:42:08 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-14 10:42:08 -0800
commit5236cf480daf82b2f36e42795abdbbc915533a59 (patch)
treeb3e76998aabf4849c60d7bc0c701de47b2aaf4e9 /src/gpu/GrGpu.h
parent028b98a08072bd1764936e47c54fa2da5cf92744 (diff)
Make uncached textures uncached from the get go.
This avoids the problem of a newly created uncached texture causing a purge of cached resources. BUG=chromium:445885 Review URL: https://codereview.chromium.org/846303002
Diffstat (limited to 'src/gpu/GrGpu.h')
-rw-r--r--src/gpu/GrGpu.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index a657d17c5c..429c9c8439 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -90,6 +90,7 @@ public:
* or render targets can be checked using GrDrawTargetCaps.
*
* @param desc describes the texture to be created.
+ * @param budgeted does this texture count against the resource cache budget?
* @param srcData texel data to load texture. Begins with full-size
* palette data for paletted textures. For compressed
* formats it contains the compressed pixel data. Otherwise,
@@ -101,7 +102,8 @@ public:
*
* @return The texture object if successful, otherwise NULL.
*/
- GrTexture* createTexture(const GrSurfaceDesc& desc, const void* srcData, size_t rowBytes);
+ GrTexture* createTexture(const GrSurfaceDesc& desc, bool budgeted,
+ const void* srcData, size_t rowBytes);
/**
* Implements GrContext::wrapBackendTexture
@@ -423,10 +425,9 @@ private:
virtual void onResetContext(uint32_t resetBits) = 0;
// overridden by backend-specific derived class to create objects.
- virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc,
- const void* srcData,
- size_t rowBytes) = 0;
- virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc,
+ virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, bool budgeted,
+ const void* srcData, size_t rowBytes) = 0;
+ virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, bool budgeted,
const void* srcData) = 0;
virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) = 0;
virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) = 0;