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

Unified Diff: src/gpu/gl/GrGLGpu.h

Issue 1583863002: Beginning of support for texture rectangles. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments 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/GrGLDefines.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.h
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index cdd8a38c6602eb4208f5996f80f89506d76acff2..b2eec45835879737ea147201b7b642f7ed136117 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -524,7 +524,7 @@ private:
GrGLint fTextureUniform;
GrGLint fTexCoordXformUniform;
GrGLint fPosXformUniform;
- } fCopyPrograms[2];
+ } fCopyPrograms[3];
GrGLuint fCopyProgramArrayBuffer;
struct {
@@ -535,11 +535,16 @@ private:
GrGLuint fWireRectArrayBuffer;
static int TextureTargetToCopyProgramIdx(GrGLenum target) {
- if (target == GR_GL_TEXTURE_2D) {
- return 0;
- } else {
- SkASSERT(target == GR_GL_TEXTURE_EXTERNAL);
- return 1;
+ switch (target) {
+ case GR_GL_TEXTURE_2D:
+ return 0;
+ case GR_GL_TEXTURE_EXTERNAL:
+ return 1;
+ case GR_GL_TEXTURE_RECTANGLE:
+ return 2;
+ default:
+ SkFAIL("Unexpected texture target type.");
+ return 0;
}
}
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698