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

Side by Side Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/SkGLContext.cpp ('k') | src/gpu/glsl/GrGLSL.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLProgramBuilder.h" 8 #include "GrGLProgramBuilder.h"
9 9
10 #include "GrAutoLocaleSetter.h" 10 #include "GrAutoLocaleSetter.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 const GrGLSLCaps* GrGLProgramBuilder::glslCaps() const { 69 const GrGLSLCaps* GrGLProgramBuilder::glslCaps() const {
70 return fGpu->ctxInfo().caps()->glslCaps(); 70 return fGpu->ctxInfo().caps()->glslCaps();
71 } 71 }
72 72
73 static GrSLType get_sampler_type(const GrTextureAccess& access) { 73 static GrSLType get_sampler_type(const GrTextureAccess& access) {
74 GrGLTexture* glTexture = static_cast<GrGLTexture*>(access.getTexture()); 74 GrGLTexture* glTexture = static_cast<GrGLTexture*>(access.getTexture());
75 if (glTexture->target() == GR_GL_TEXTURE_EXTERNAL) { 75 if (glTexture->target() == GR_GL_TEXTURE_EXTERNAL) {
76 return kSamplerExternal_GrSLType; 76 return kSamplerExternal_GrSLType;
77 } else if (glTexture->target() == GR_GL_TEXTURE_RECTANGLE) {
78 return kSampler2DRect_GrSLType;
77 } else { 79 } else {
78 SkASSERT(glTexture->target() == GR_GL_TEXTURE_2D); 80 SkASSERT(glTexture->target() == GR_GL_TEXTURE_2D);
79 return kSampler2D_GrSLType; 81 return kSampler2D_GrSLType;
80 } 82 }
81 } 83 }
82 84
83 void GrGLProgramBuilder::emitSamplers(const GrProcessor& processor, 85 void GrGLProgramBuilder::emitSamplers(const GrProcessor& processor,
84 GrGLSLTextureSampler::TextureSamplerArray* outSamplers) { 86 GrGLSLTextureSampler::TextureSamplerArray* outSamplers) {
85 int numTextures = processor.numTextures(); 87 int numTextures = processor.numTextures();
86 UniformHandle* localSamplerUniforms = fSamplerUniforms.push_back_n(numTextur es); 88 UniformHandle* localSamplerUniforms = fSamplerUniforms.push_back_n(numTextur es);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 fUniformHandles, 267 fUniformHandles,
266 programID, 268 programID,
267 fUniformHandler.fUniforms, 269 fUniformHandler.fUniforms,
268 fVaryingHandler.fPathProcVaryingInfos, 270 fVaryingHandler.fPathProcVaryingInfos,
269 fGeometryProcessor, 271 fGeometryProcessor,
270 fXferProcessor, 272 fXferProcessor,
271 fFragmentProcessors, 273 fFragmentProcessors,
272 &fSamplerUniforms); 274 &fSamplerUniforms);
273 } 275 }
274 276
OLDNEW
« no previous file with comments | « src/gpu/gl/SkGLContext.cpp ('k') | src/gpu/glsl/GrGLSL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698