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

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

Issue 1594483003: Texturing support for RECTANGLE textures. (Closed) Base URL: https://skia.googlesource.com/skia.git@rectangle
Patch Set: fix float->int warnings Created 4 years, 11 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 | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/glsl/GrGLSLShaderBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/SkGLContext.cpp
diff --git a/src/gpu/gl/SkGLContext.cpp b/src/gpu/gl/SkGLContext.cpp
index 07c61f7aa00beec15a171ad06396e97d6e143916..ad119aee6a30fa99ee2c8a31767bff0c62d6e320 100644
--- a/src/gpu/gl/SkGLContext.cpp
+++ b/src/gpu/gl/SkGLContext.cpp
@@ -156,10 +156,15 @@ void SkGLContext::GLFenceSync::deleteFence(SkPlatformGpuFence fence) const {
GrGLint SkGLContext::createTextureRectangle(int width, int height, GrGLenum internalFormat,
GrGLenum externalFormat, GrGLenum externalType,
GrGLvoid* data) {
- if (!(kGL_GrGLStandard == fGL->fStandard && GrGLGetVersion(fGL) >= GR_GL_VER(3, 2)) &&
+ if (!(kGL_GrGLStandard == fGL->fStandard && GrGLGetVersion(fGL) >= GR_GL_VER(3, 1)) &&
!fGL->fExtensions.has("GL_ARB_texture_rectangle")) {
return 0;
}
+
+ if (GrGLGetGLSLVersion(fGL) < GR_GLSL_VER(1, 40)) {
+ return 0;
+ }
+
GrGLuint id;
GR_GL_CALL(fGL, GenTextures(1, &id));
GR_GL_CALL(fGL, BindTexture(GR_GL_TEXTURE_RECTANGLE, id));
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/glsl/GrGLSLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698