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

Side by Side Diff: include/gpu/GrTypesPriv.h

Issue 1684063006: Add GrShaderFlags enum (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Bit->Flag Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 GrTypesPriv_DEFINED 8 #ifndef GrTypesPriv_DEFINED
9 #define GrTypesPriv_DEFINED 9 #define GrTypesPriv_DEFINED
10 10
(...skipping 26 matching lines...) Expand all
37 37
38 enum GrShaderType { 38 enum GrShaderType {
39 kVertex_GrShaderType, 39 kVertex_GrShaderType,
40 kGeometry_GrShaderType, 40 kGeometry_GrShaderType,
41 kFragment_GrShaderType, 41 kFragment_GrShaderType,
42 42
43 kLastkFragment_GrShaderType = kFragment_GrShaderType 43 kLastkFragment_GrShaderType = kFragment_GrShaderType
44 }; 44 };
45 static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1; 45 static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1;
46 46
47 enum GrShaderFlags {
48 kNone_GrShaderFlags = 0,
49 kVertex_GrShaderFlag = 1 << kVertex_GrShaderType,
50 kGeometry_GrShaderFlag = 1 << kGeometry_GrShaderType,
51 kFragment_GrShaderFlag = 1 << kFragment_GrShaderType
52 };
53 GR_MAKE_BITFIELD_OPS(GrShaderFlags);
54
47 /** 55 /**
48 * Precisions of shader language variables. Not all shading languages support pr ecisions or actually 56 * Precisions of shader language variables. Not all shading languages support pr ecisions or actually
49 * vary the internal precision based on the qualifiers. These currently only app ly to float types ( 57 * vary the internal precision based on the qualifiers. These currently only app ly to float types (
50 * including float vectors and matrices). 58 * including float vectors and matrices).
51 */ 59 */
52 enum GrSLPrecision { 60 enum GrSLPrecision {
53 kLow_GrSLPrecision, 61 kLow_GrSLPrecision,
54 kMedium_GrSLPrecision, 62 kMedium_GrSLPrecision,
55 kHigh_GrSLPrecision, 63 kHigh_GrSLPrecision,
56 64
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // Takes a pointer to a GrCaps, and will suppress prints if required 406 // Takes a pointer to a GrCaps, and will suppress prints if required
399 #define GrCapsDebugf(caps, ...) \ 407 #define GrCapsDebugf(caps, ...) \
400 if (!caps->suppressPrints()) { \ 408 if (!caps->suppressPrints()) { \
401 SkDebugf(__VA_ARGS__); \ 409 SkDebugf(__VA_ARGS__); \
402 } 410 }
403 #else 411 #else
404 #define GrCapsDebugf(caps, ...) 412 #define GrCapsDebugf(caps, ...)
405 #endif 413 #endif
406 414
407 #endif 415 #endif
OLDNEW
« no previous file with comments | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp ('k') | src/core/SkColorMatrixFilterRowMajor255.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698