OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 #include "GrGLUtil.h" | 9 #include "GrGLUtil.h" |
10 #include "SkMatrix.h" | 10 #include "SkMatrix.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 return kQualcomm_GrGLVendor; | 220 return kQualcomm_GrGLVendor; |
221 } | 221 } |
222 } | 222 } |
223 return kOther_GrGLVendor; | 223 return kOther_GrGLVendor; |
224 } | 224 } |
225 | 225 |
226 GrGLRenderer GrGLGetRendererFromString(const char* rendererString) { | 226 GrGLRenderer GrGLGetRendererFromString(const char* rendererString) { |
227 if (NULL != rendererString) { | 227 if (NULL != rendererString) { |
228 if (0 == strcmp(rendererString, "NVIDIA Tegra 3")) { | 228 if (0 == strcmp(rendererString, "NVIDIA Tegra 3")) { |
229 return kTegra3_GrGLRenderer; | 229 return kTegra3_GrGLRenderer; |
| 230 } else if (0 == strcmp(rendererString, "NVIDIA Tegra")) { |
| 231 return kTegra2_GrGLRenderer; |
230 } | 232 } |
231 } | 233 } |
232 return kOther_GrGLRenderer; | 234 return kOther_GrGLRenderer; |
233 } | 235 } |
234 | 236 |
235 GrGLVersion GrGLGetVersion(const GrGLInterface* gl) { | 237 GrGLVersion GrGLGetVersion(const GrGLInterface* gl) { |
236 const GrGLubyte* v; | 238 const GrGLubyte* v; |
237 GR_GL_CALL_RET(gl, v, GetString(GR_GL_VERSION)); | 239 GR_GL_CALL_RET(gl, v, GetString(GR_GL_VERSION)); |
238 return GrGLGetVersionFromString((const char*) v); | 240 return GrGLGetVersionFromString((const char*) v); |
239 } | 241 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 dest[9] = 0; | 293 dest[9] = 0; |
292 dest[10] = 1; | 294 dest[10] = 1; |
293 dest[11] = 0; | 295 dest[11] = 0; |
294 | 296 |
295 // Col 3 | 297 // Col 3 |
296 dest[12] = SkScalarToFloat(src[SkMatrix::kMTransX]); | 298 dest[12] = SkScalarToFloat(src[SkMatrix::kMTransX]); |
297 dest[13] = SkScalarToFloat(src[SkMatrix::kMTransY]); | 299 dest[13] = SkScalarToFloat(src[SkMatrix::kMTransY]); |
298 dest[14] = 0; | 300 dest[14] = 0; |
299 dest[15] = SkScalarToFloat(src[SkMatrix::kMPersp2]); | 301 dest[15] = SkScalarToFloat(src[SkMatrix::kMPersp2]); |
300 } | 302 } |
OLD | NEW |