aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-25 15:32:06 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-25 15:32:06 +0000
commit44a91dcf2542c2aa93f159ebbb5bf813ae7362c0 (patch)
treed60e31045b9dee8c1200a72d31802fec495b5762 /src
parenta9b7936a72b240d0f87b81e75fd9dda4dba750a4 (diff)
Add GrContext::setMaxTextureSizeOverride
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrContext.cpp3
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 {