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

Side by Side Diff: src/gpu/gl/GrGLUniformManager.cpp

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "gl/GrGLShaderBuilder.h" 8 #include "gl/GrGLShaderBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 GR_GL_CALL(fGpu->glInterface(), 226 GR_GL_CALL(fGpu->glInterface(),
227 UniformMatrix4fv(uni.fFSLocation, arrayCount, false, matrices )); 227 UniformMatrix4fv(uni.fFSLocation, arrayCount, false, matrices ));
228 } 228 }
229 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) { 229 if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
230 GR_GL_CALL(fGpu->glInterface(), 230 GR_GL_CALL(fGpu->glInterface(),
231 UniformMatrix4fv(uni.fVSLocation, arrayCount, false, matrices )); 231 UniformMatrix4fv(uni.fVSLocation, arrayCount, false, matrices ));
232 } 232 }
233 } 233 }
234 234
235 void GrGLUniformManager::setSkMatrix(UniformHandle u, const SkMatrix& matrix) co nst { 235 void GrGLUniformManager::setSkMatrix(UniformHandle u, const SkMatrix& matrix) co nst {
236 // GR_STATIC_ASSERT(SK_SCALAR_IS_FLOAT);
237 GrGLfloat mt[] = { 236 GrGLfloat mt[] = {
238 matrix.get(SkMatrix::kMScaleX), 237 matrix.get(SkMatrix::kMScaleX),
239 matrix.get(SkMatrix::kMSkewY), 238 matrix.get(SkMatrix::kMSkewY),
240 matrix.get(SkMatrix::kMPersp0), 239 matrix.get(SkMatrix::kMPersp0),
241 matrix.get(SkMatrix::kMSkewX), 240 matrix.get(SkMatrix::kMSkewX),
242 matrix.get(SkMatrix::kMScaleY), 241 matrix.get(SkMatrix::kMScaleY),
243 matrix.get(SkMatrix::kMPersp1), 242 matrix.get(SkMatrix::kMPersp1),
244 matrix.get(SkMatrix::kMTransX), 243 matrix.get(SkMatrix::kMTransX),
245 matrix.get(SkMatrix::kMTransY), 244 matrix.get(SkMatrix::kMTransY),
246 matrix.get(SkMatrix::kMPersp2), 245 matrix.get(SkMatrix::kMPersp2),
(...skipping 24 matching lines...) Expand all
271 if (GrGLShaderBuilder::kFragment_Visibility & uniforms[i].fVisibility) { 270 if (GrGLShaderBuilder::kFragment_Visibility & uniforms[i].fVisibility) {
272 fUniforms[i].fFSLocation = location; 271 fUniforms[i].fFSLocation = location;
273 } 272 }
274 } 273 }
275 } 274 }
276 275
277 const GrGLUniformManager::BuilderUniform& 276 const GrGLUniformManager::BuilderUniform&
278 GrGLUniformManager::getBuilderUniform(const BuilderUniformArray& array, UniformH andle handle) const { 277 GrGLUniformManager::getBuilderUniform(const BuilderUniformArray& array, UniformH andle handle) const {
279 return array[handle.toUniformIndex()]; 278 return array[handle.toUniformIndex()];
280 } 279 }
OLDNEW
« src/core/SkCanvas.cpp ('K') | « src/gpu/gl/GrGLPath.cpp ('k') | src/pdf/SkPDFTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698