diff options
author | 2015-07-23 11:45:02 -0700 | |
---|---|---|
committer | 2015-07-23 11:45:02 -0700 | |
commit | 494aa593c59d3f426036f87ef1fab1ea158c469f (patch) | |
tree | f472a9070cd3b4e8f59debbe630cf8c7bc468840 /src/gpu/GrTextureProvider.cpp | |
parent | eb86b55fe997e1f2f902d3d5c599bf6894f0f07c (diff) |
Fix ImageNewSurface test on S4.
This still leaves the SkImage_NewFromTexture broken.
Review URL: https://codereview.chromium.org/1253513004
Diffstat (limited to 'src/gpu/GrTextureProvider.cpp')
-rw-r--r-- | src/gpu/GrTextureProvider.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/GrTextureProvider.cpp b/src/gpu/GrTextureProvider.cpp index cfa6994c4b..cf93209dbc 100644 --- a/src/gpu/GrTextureProvider.cpp +++ b/src/gpu/GrTextureProvider.cpp @@ -73,10 +73,10 @@ GrTexture* GrTextureProvider::internalRefScratchTexture(const GrSurfaceDesc& inD if (fGpu->caps()->reuseScratchTextures() || (desc->fFlags & kRenderTarget_GrSurfaceFlag)) { if (!(kExact_ScratchTextureFlag & flags)) { // bin by pow2 with a reasonable min - static const int MIN_SIZE = 16; + const int minSize = SkTMin(16, fGpu->caps()->minTextureSize()); GrSurfaceDesc* wdesc = desc.writable(); - wdesc->fWidth = SkTMax(MIN_SIZE, GrNextPow2(desc->fWidth)); - wdesc->fHeight = SkTMax(MIN_SIZE, GrNextPow2(desc->fHeight)); + wdesc->fWidth = SkTMax(minSize, GrNextPow2(desc->fWidth)); + wdesc->fHeight = SkTMax(minSize, GrNextPow2(desc->fHeight)); } GrScratchKey key; |