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

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

Issue 133073009: Move GrGLInterface function pointers into a nested struct (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: tip of tree Created 6 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 | Annotate | Revision Log
OLDNEW
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"
11 #include <stdio.h> 11 #include <stdio.h>
12 12
13 void GrGLClearErr(const GrGLInterface* gl) { 13 void GrGLClearErr(const GrGLInterface* gl) {
14 while (GR_GL_NO_ERROR != gl->fGetError()) {} 14 while (GR_GL_NO_ERROR != gl->fFunctions.fGetError()) {}
15 } 15 }
16 16
17 namespace { 17 namespace {
18 const char *get_error_string(uint32_t err) { 18 const char *get_error_string(uint32_t err) {
19 switch (err) { 19 switch (err) {
20 case GR_GL_NO_ERROR: 20 case GR_GL_NO_ERROR:
21 return ""; 21 return "";
22 case GR_GL_INVALID_ENUM: 22 case GR_GL_INVALID_ENUM:
23 return "Invalid Enum"; 23 return "Invalid Enum";
24 case GR_GL_INVALID_VALUE: 24 case GR_GL_INVALID_VALUE:
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 dest[9] = 0; 287 dest[9] = 0;
288 dest[10] = 1; 288 dest[10] = 1;
289 dest[11] = 0; 289 dest[11] = 0;
290 290
291 // Col 3 291 // Col 3
292 dest[12] = SkScalarToFloat(src[SkMatrix::kMTransX]); 292 dest[12] = SkScalarToFloat(src[SkMatrix::kMTransX]);
293 dest[13] = SkScalarToFloat(src[SkMatrix::kMTransY]); 293 dest[13] = SkScalarToFloat(src[SkMatrix::kMTransY]);
294 dest[14] = 0; 294 dest[14] = 0;
295 dest[15] = SkScalarToFloat(src[SkMatrix::kMPersp2]); 295 dest[15] = SkScalarToFloat(src[SkMatrix::kMPersp2]);
296 } 296 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698