diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-25 15:32:06 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-25 15:32:06 +0000 |
commit | 44a91dcf2542c2aa93f159ebbb5bf813ae7362c0 (patch) | |
tree | d60e31045b9dee8c1200a72d31802fec495b5762 /src/gpu | |
parent | a9b7936a72b240d0f87b81e75fd9dda4dba750a4 (diff) |
Add GrContext::setMaxTextureSizeOverride
https://codereview.chromium.org/20325002/
git-svn-id: http://skia.googlecode.com/svn/trunk@10358 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 6eae95eced..3951d919e6 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -102,6 +102,7 @@ GrContext::GrContext() { fAARectRenderer = NULL; fOvalRenderer = NULL; fViewMatrix.reset(); + fMaxTextureSizeOverride = 1 << 20; } bool GrContext::init(GrBackend backend, GrBackendContext backendContext) { @@ -554,7 +555,7 @@ void GrContext::setTextureCacheLimits(int maxTextures, size_t maxTextureBytes) { } int GrContext::getMaxTextureSize() const { - return fGpu->caps()->maxTextureSize(); + return GrMin(fGpu->caps()->maxTextureSize(), fMaxTextureSizeOverride); } int GrContext::getMaxRenderTargetSize() const { |