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

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

Issue 23767005: Add getGLMatrix method to MatrixState (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 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 #ifndef GrGLUtil_DEFINED 8 #ifndef GrGLUtil_DEFINED
9 #define GrGLUtil_DEFINED 9 #define GrGLUtil_DEFINED
10 10
11 #include "gl/GrGLInterface.h" 11 #include "gl/GrGLInterface.h"
12 #include "GrGLDefines.h" 12 #include "GrGLDefines.h"
13 13
14 class SkMatrix;
15
14 //////////////////////////////////////////////////////////////////////////////// 16 ////////////////////////////////////////////////////////////////////////////////
15 17
16 typedef uint32_t GrGLVersion; 18 typedef uint32_t GrGLVersion;
17 typedef uint32_t GrGLSLVersion; 19 typedef uint32_t GrGLSLVersion;
18 20
19 /** 21 /**
20 * This list is lazily updated as required. 22 * This list is lazily updated as required.
21 */ 23 */
22 enum GrGLVendor { 24 enum GrGLVendor {
23 kARM_GrGLVendor, 25 kARM_GrGLVendor,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 /** 86 /**
85 * Helpers for glGetError() 87 * Helpers for glGetError()
86 */ 88 */
87 89
88 void GrGLCheckErr(const GrGLInterface* gl, 90 void GrGLCheckErr(const GrGLInterface* gl,
89 const char* location, 91 const char* location,
90 const char* call); 92 const char* call);
91 93
92 void GrGLClearErr(const GrGLInterface* gl); 94 void GrGLClearErr(const GrGLInterface* gl);
93 95
96 /**
97 * Helper for converting SkMatrix to a column-major GL float array
98 */
99 template<int MatrixSize> void GrGLGetMatrix(GrGLfloat* dest, const SkMatrix& src );
100
94 //////////////////////////////////////////////////////////////////////////////// 101 ////////////////////////////////////////////////////////////////////////////////
95 102
96 /** 103 /**
97 * Macros for using GrGLInterface to make GL calls 104 * Macros for using GrGLInterface to make GL calls
98 */ 105 */
99 106
100 // internal macro to conditionally call glGetError based on compile-time and 107 // internal macro to conditionally call glGetError based on compile-time and
101 // run-time flags. 108 // run-time flags.
102 #if GR_GL_CHECK_ERROR 109 #if GR_GL_CHECK_ERROR
103 extern bool gCheckErrorGL; 110 extern bool gCheckErrorGL;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 do { \ 161 do { \
155 GR_GL_CALLBACK_IMPL(IFACE); \ 162 GR_GL_CALLBACK_IMPL(IFACE); \
156 (RET) = (IFACE)->f##X; \ 163 (RET) = (IFACE)->f##X; \
157 GR_GL_LOG_CALLS_IMPL(X); \ 164 GR_GL_LOG_CALLS_IMPL(X); \
158 } while (false) 165 } while (false)
159 166
160 // call glGetError without doing a redundant error check or logging. 167 // call glGetError without doing a redundant error check or logging.
161 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fGetError() 168 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fGetError()
162 169
163 #endif 170 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698