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

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

Issue 452823002: Separate GL path rendering state from GrGpuGL to GrGLPathRendering (Closed) Base URL: https://skia.googlesource.com/skia.git@00xx-cherrypick-pathrendering-class
Patch Set: Created 6 years, 4 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
« no previous file with comments | « src/gpu/gl/GrGLUtil.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 dest[9] = 0; 257 dest[9] = 0;
258 dest[10] = 1; 258 dest[10] = 1;
259 dest[11] = 0; 259 dest[11] = 0;
260 260
261 // Col 3 261 // Col 3
262 dest[12] = SkScalarToFloat(src[SkMatrix::kMTransX]); 262 dest[12] = SkScalarToFloat(src[SkMatrix::kMTransX]);
263 dest[13] = SkScalarToFloat(src[SkMatrix::kMTransY]); 263 dest[13] = SkScalarToFloat(src[SkMatrix::kMTransY]);
264 dest[14] = 0; 264 dest[14] = 0;
265 dest[15] = SkScalarToFloat(src[SkMatrix::kMPersp2]); 265 dest[15] = SkScalarToFloat(src[SkMatrix::kMPersp2]);
266 } 266 }
267
268 GrGLenum GrToGLStencilFunc(GrStencilFunc basicFunc) {
269 static const GrGLenum gTable[] = {
270 GR_GL_ALWAYS, // kAlways_StencilFunc
271 GR_GL_NEVER, // kNever_StencilFunc
272 GR_GL_GREATER, // kGreater_StencilFunc
273 GR_GL_GEQUAL, // kGEqual_StencilFunc
274 GR_GL_LESS, // kLess_StencilFunc
275 GR_GL_LEQUAL, // kLEqual_StencilFunc,
276 GR_GL_EQUAL, // kEqual_StencilFunc,
277 GR_GL_NOTEQUAL, // kNotEqual_StencilFunc,
278 };
279 GR_STATIC_ASSERT(SK_ARRAY_COUNT(gTable) == kBasicStencilFuncCount);
280 GR_STATIC_ASSERT(0 == kAlways_StencilFunc);
281 GR_STATIC_ASSERT(1 == kNever_StencilFunc);
282 GR_STATIC_ASSERT(2 == kGreater_StencilFunc);
283 GR_STATIC_ASSERT(3 == kGEqual_StencilFunc);
284 GR_STATIC_ASSERT(4 == kLess_StencilFunc);
285 GR_STATIC_ASSERT(5 == kLEqual_StencilFunc);
286 GR_STATIC_ASSERT(6 == kEqual_StencilFunc);
287 GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc);
288 SkASSERT((unsigned) basicFunc < kBasicStencilFuncCount);
289
290 return gTable[basicFunc];
291 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLUtil.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698