Flutter Engine
The Flutter Engine
Functions
GrMtlOpsRenderPass.mm File Reference
#include "src/gpu/ganesh/mtl/GrMtlOpsRenderPass.h"
#include "src/gpu/ganesh/GrBackendUtils.h"
#include "src/gpu/ganesh/GrColor.h"
#include "src/gpu/ganesh/GrNativeRect.h"
#include "src/gpu/ganesh/GrRenderTarget.h"
#include "src/gpu/ganesh/mtl/GrMtlCommandBuffer.h"
#include "src/gpu/ganesh/mtl/GrMtlPipelineState.h"
#include "src/gpu/ganesh/mtl/GrMtlPipelineStateBuilder.h"
#include "src/gpu/ganesh/mtl/GrMtlRenderCommandEncoder.h"
#include "src/gpu/ganesh/mtl/GrMtlRenderTarget.h"
#include "src/gpu/ganesh/mtl/GrMtlTexture.h"

Go to the source code of this file.

Functions

static MTLPrimitiveType gr_to_mtl_primitive (GrPrimitiveType primitiveType)
 

Function Documentation

◆ gr_to_mtl_primitive()

static MTLPrimitiveType gr_to_mtl_primitive ( GrPrimitiveType  primitiveType)
static

Definition at line 50 of file GrMtlOpsRenderPass.mm.

50 {
51 const static MTLPrimitiveType mtlPrimitiveType[] {
52 MTLPrimitiveTypeTriangle,
53 MTLPrimitiveTypeTriangleStrip,
54 MTLPrimitiveTypePoint,
55 MTLPrimitiveTypeLine,
56 MTLPrimitiveTypeLineStrip
57 };
58 static_assert((int)GrPrimitiveType::kTriangles == 0);
59 static_assert((int)GrPrimitiveType::kTriangleStrip == 1);
60 static_assert((int)GrPrimitiveType::kPoints == 2);
61 static_assert((int)GrPrimitiveType::kLines == 3);
62 static_assert((int)GrPrimitiveType::kLineStrip == 4);
63
64 SkASSERT(primitiveType <= GrPrimitiveType::kLineStrip);
65 return mtlPrimitiveType[static_cast<int>(primitiveType)];
66}
#define SkASSERT(cond)
Definition: SkAssert.h:116