Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 105353002: Do not use GrBicubic effect when downscaling. Also, don't use glTexStorage as it interferes with de… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address comments Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | tests/MatrixTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 00d27b31ef6cc1eda06c2ec16ded3fb222056b63..4b5221c31b52f68f6f1af05923c0fb850098afbe 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -552,7 +552,12 @@ bool GrGpuGL::uploadTexData(const GrGLTexture::Desc& desc,
SkAutoSMalloc<128 * 128> tempStorage;
// paletted textures cannot be partially updated
- bool useTexStorage = isNewTexture &&
+ // We currently lazily create MIPMAPs when the we see a draw with
+ // GrTextureParams::kMipMap_FilterMode. Using texture storage requires that the
+ // MIP levels are all created when the texture is created. So for now we don't use
+ // texture storage.
+ bool useTexStorage = false &&
+ isNewTexture &&
desc.fConfig != kIndex_8_GrPixelConfig &&
this->glCaps().texStorageSupport();
@@ -638,8 +643,7 @@ bool GrGpuGL::uploadTexData(const GrGLTexture::Desc& desc,
desc.fWidth == width && desc.fHeight == height) {
CLEAR_ERROR_BEFORE_ALLOC(this->glInterface());
if (useTexStorage) {
- // We never resize or change formats of textures. We don't use
- // mipmaps currently.
+ // We never resize or change formats of textures.
GL_ALLOC_CALL(this->glInterface(),
TexStorage2D(GR_GL_TEXTURE_2D,
1, // levels
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | tests/MatrixTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698