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

Unified Diff: src/gpu/vk/GrVkPipeline.cpp

Issue 2165283002: Remove DrawFace enum from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try again Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/text/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/vk/GrVkPipelineState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkPipeline.cpp
diff --git a/src/gpu/vk/GrVkPipeline.cpp b/src/gpu/vk/GrVkPipeline.cpp
index 0ba111af0990c522ddafc20e10a3c326125f7cea..055bb94d6f961e160b3f96246707e0ee5da20507 100644
--- a/src/gpu/vk/GrVkPipeline.cpp
+++ b/src/gpu/vk/GrVkPipeline.cpp
@@ -356,19 +356,19 @@ void setup_color_blend_state(const GrVkGpu* gpu,
// colorBlendInfo->blendConstants is set dynamically
}
-VkCullModeFlags draw_face_to_vk_cull_mode(GrPipelineBuilder::DrawFace drawFace) {
+VkCullModeFlags draw_face_to_vk_cull_mode(GrDrawFace drawFace) {
// Assumes that we've set the front face to be ccw
static const VkCullModeFlags gTable[] = {
VK_CULL_MODE_NONE, // kBoth_DrawFace
VK_CULL_MODE_BACK_BIT, // kCCW_DrawFace, cull back face
VK_CULL_MODE_FRONT_BIT, // kCW_DrawFace, cull front face
};
- GR_STATIC_ASSERT(0 == GrPipelineBuilder::kBoth_DrawFace);
- GR_STATIC_ASSERT(1 == GrPipelineBuilder::kCCW_DrawFace);
- GR_STATIC_ASSERT(2 == GrPipelineBuilder::kCW_DrawFace);
- SkASSERT((unsigned)drawFace <= 2);
+ GR_STATIC_ASSERT(0 == (int)GrDrawFace::kBoth);
+ GR_STATIC_ASSERT(1 == (int)GrDrawFace::kCCW);
+ GR_STATIC_ASSERT(2 == (int)GrDrawFace::kCW);
+ SkASSERT(-1 < (int)drawFace && (int)drawFace <= 2);
- return gTable[drawFace];
+ return gTable[(int)drawFace];
}
void setup_raster_state(const GrVkGpu* gpu,
« no previous file with comments | « src/gpu/text/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/vk/GrVkPipelineState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698