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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 206 } |
207 | 207 |
208 GrGLVendor GrGLGetVendorFromString(const char* vendorString) { | 208 GrGLVendor GrGLGetVendorFromString(const char* vendorString) { |
209 if (NULL != vendorString) { | 209 if (NULL != vendorString) { |
210 if (0 == strcmp(vendorString, "ARM")) { | 210 if (0 == strcmp(vendorString, "ARM")) { |
211 return kARM_GrGLVendor; | 211 return kARM_GrGLVendor; |
212 } | 212 } |
213 if (0 == strcmp(vendorString, "Imagination Technologies")) { | 213 if (0 == strcmp(vendorString, "Imagination Technologies")) { |
214 return kImagination_GrGLVendor; | 214 return kImagination_GrGLVendor; |
215 } | 215 } |
216 if (0 == strcmp(vendorString, "Intel")) { | 216 if (0 == strncmp(vendorString, "Intel ", 6) || 0 == strcmp(vendorString,
"Intel")) { |
217 return kIntel_GrGLVendor; | 217 return kIntel_GrGLVendor; |
218 } | 218 } |
219 if (0 == strcmp(vendorString, "Qualcomm")) { | 219 if (0 == strcmp(vendorString, "Qualcomm")) { |
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) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 dest[9] = 0; | 293 dest[9] = 0; |
294 dest[10] = 1; | 294 dest[10] = 1; |
295 dest[11] = 0; | 295 dest[11] = 0; |
296 | 296 |
297 // Col 3 | 297 // Col 3 |
298 dest[12] = SkScalarToFloat(src[SkMatrix::kMTransX]); | 298 dest[12] = SkScalarToFloat(src[SkMatrix::kMTransX]); |
299 dest[13] = SkScalarToFloat(src[SkMatrix::kMTransY]); | 299 dest[13] = SkScalarToFloat(src[SkMatrix::kMTransY]); |
300 dest[14] = 0; | 300 dest[14] = 0; |
301 dest[15] = SkScalarToFloat(src[SkMatrix::kMPersp2]); | 301 dest[15] = SkScalarToFloat(src[SkMatrix::kMPersp2]); |
302 } | 302 } |
OLD | NEW |