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

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

Issue 22912007: Change comments about sized internal formats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 months 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 | « no previous file | no next file » | 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 c95edb740b2d17ef9ded9b6cd368d3c984d13cee..91adfe8299fd1015acdcf254e45ae9b93d659270 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -610,8 +610,10 @@ bool GrGpuGL::uploadTexData(const GrGLTexture::Desc& desc,
GrGLenum internalFormat;
GrGLenum externalFormat;
GrGLenum externalType;
- // glTexStorage requires sized internal formats on both desktop and ES. ES
- // glTexImage requires an unsized format.
+ // glTexStorage requires sized internal formats on both desktop and ES. ES2 requires an unsized
+ // format for glTexImage, unlike ES3 and desktop. However, we allow the driver to decide the
+ // size of the internal format whenever possible and so only use a sized internal format when
+ // using texture storage.
if (!this->configToGLFormats(dataConfig, useTexStorage, &internalFormat,
&externalFormat, &externalType)) {
return false;
@@ -809,7 +811,7 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height,
if (!desc->fRTFBOID ||
!desc->fMSColorRenderbufferID ||
!this->configToGLFormats(desc->fConfig,
- // GLES requires sized internal formats
+ // ES2 and ES3 require sized internal formats for rb storage.
kES_GrGLBinding == this->glBinding(),
&msColorFormat,
NULL,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698