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

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

Issue 1933053002: Use constexpr constructors of GrStencilSettings rather than hacky macro system (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 4 years, 7 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/GrGLGpu.cpp ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 static const GrGLenum gTable[] = { 336 static const GrGLenum gTable[] = {
337 GR_GL_ALWAYS, // kAlways_StencilFunc 337 GR_GL_ALWAYS, // kAlways_StencilFunc
338 GR_GL_NEVER, // kNever_StencilFunc 338 GR_GL_NEVER, // kNever_StencilFunc
339 GR_GL_GREATER, // kGreater_StencilFunc 339 GR_GL_GREATER, // kGreater_StencilFunc
340 GR_GL_GEQUAL, // kGEqual_StencilFunc 340 GR_GL_GEQUAL, // kGEqual_StencilFunc
341 GR_GL_LESS, // kLess_StencilFunc 341 GR_GL_LESS, // kLess_StencilFunc
342 GR_GL_LEQUAL, // kLEqual_StencilFunc, 342 GR_GL_LEQUAL, // kLEqual_StencilFunc,
343 GR_GL_EQUAL, // kEqual_StencilFunc, 343 GR_GL_EQUAL, // kEqual_StencilFunc,
344 GR_GL_NOTEQUAL, // kNotEqual_StencilFunc, 344 GR_GL_NOTEQUAL, // kNotEqual_StencilFunc,
345 }; 345 };
346 GR_STATIC_ASSERT(SK_ARRAY_COUNT(gTable) == kBasicStencilFuncCount); 346 GR_STATIC_ASSERT(SK_ARRAY_COUNT(gTable) == kBasicStencilFuncCnt);
347 GR_STATIC_ASSERT(0 == kAlways_StencilFunc); 347 GR_STATIC_ASSERT(0 == kAlways_StencilFunc);
348 GR_STATIC_ASSERT(1 == kNever_StencilFunc); 348 GR_STATIC_ASSERT(1 == kNever_StencilFunc);
349 GR_STATIC_ASSERT(2 == kGreater_StencilFunc); 349 GR_STATIC_ASSERT(2 == kGreater_StencilFunc);
350 GR_STATIC_ASSERT(3 == kGEqual_StencilFunc); 350 GR_STATIC_ASSERT(3 == kGEqual_StencilFunc);
351 GR_STATIC_ASSERT(4 == kLess_StencilFunc); 351 GR_STATIC_ASSERT(4 == kLess_StencilFunc);
352 GR_STATIC_ASSERT(5 == kLEqual_StencilFunc); 352 GR_STATIC_ASSERT(5 == kLEqual_StencilFunc);
353 GR_STATIC_ASSERT(6 == kEqual_StencilFunc); 353 GR_STATIC_ASSERT(6 == kEqual_StencilFunc);
354 GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc); 354 GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc);
355 SkASSERT((unsigned) basicFunc < kBasicStencilFuncCount); 355 SkASSERT((unsigned) basicFunc < kBasicStencilFuncCnt);
356 356
357 return gTable[basicFunc]; 357 return gTable[basicFunc];
358 } 358 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698