aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLGpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLGpu.h')
-rw-r--r--src/gpu/gl/GrGLGpu.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index d0ca40bc9f..0c40b60862 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -17,7 +17,7 @@
#include "GrGLTexture.h"
#include "GrGLVertexArray.h"
#include "GrGpu.h"
-#include "GrTypes.h"
+#include "GrTexturePriv.h"
#include "GrWindowRectsState.h"
#include "GrXferProcessor.h"
#include "SkTArray.h"
@@ -395,7 +395,7 @@ private:
sk_sp<GrGLContext> fGLContext;
- bool createCopyProgram(int progIdx);
+ bool createCopyProgram(GrTexture* srcTexture);
bool createMipmapProgram(int progIdx);
bool createWireRectProgram();
bool createPLSSetupProgram();
@@ -589,13 +589,13 @@ private:
int fHWNumRasterSamples;
///@}
- /** IDs for copy surface program. */
+ /** IDs for copy surface program. (4 sampler types) */
struct {
GrGLuint fProgram;
GrGLint fTextureUniform;
GrGLint fTexCoordXformUniform;
GrGLint fPosXformUniform;
- } fCopyPrograms[3];
+ } fCopyPrograms[4];
sk_sp<GrGLBuffer> fCopyProgramArrayBuffer;
/** IDs for texture mipmap program. (4 filter configurations) */
@@ -613,16 +613,18 @@ private:
} fWireRectProgram;
sk_sp<GrGLBuffer> fWireRectArrayBuffer;
- static int TextureTargetToCopyProgramIdx(GrGLenum target) {
- switch (target) {
- case GR_GL_TEXTURE_2D:
+ static int TextureToCopyProgramIdx(GrTexture* texture) {
+ switch (texture->texturePriv().samplerType()) {
+ case kTexture2DSampler_GrSLType:
return 0;
- case GR_GL_TEXTURE_EXTERNAL:
+ case kTexture2DISampler_GrSLType:
return 1;
- case GR_GL_TEXTURE_RECTANGLE:
+ case kTexture2DRectSampler_GrSLType:
return 2;
+ case kTextureExternalSampler_GrSLType:
+ return 3;
default:
- SkFAIL("Unexpected texture target type.");
+ SkFAIL("Unexpected samper type");
return 0;
}
}