Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Functions
GrGeometryProcessor.h File Reference
#include "include/gpu/GrBackendSurface.h"
#include "src/gpu/Swizzle.h"
#include "src/gpu/ganesh/GrColor.h"
#include "src/gpu/ganesh/GrFragmentProcessor.h"
#include "src/gpu/ganesh/GrProcessor.h"
#include "src/gpu/ganesh/GrSamplerState.h"
#include "src/gpu/ganesh/GrShaderCaps.h"
#include "src/gpu/ganesh/GrShaderVar.h"
#include "src/gpu/ganesh/glsl/GrGLSLProgramDataManager.h"
#include "src/gpu/ganesh/glsl/GrGLSLUniformHandler.h"
#include "src/gpu/ganesh/glsl/GrGLSLVarying.h"
#include <unordered_map>

Go to the source code of this file.

Classes

class  GrGeometryProcessor
 
class  GrGeometryProcessor::Attribute
 
class  GrGeometryProcessor::AttributeSet
 
class  GrGeometryProcessor::ProgramImpl
 
struct  GrGeometryProcessor::ProgramImpl::FPCoords
 
struct  GrGeometryProcessor::ProgramImpl::EmitArgs
 
struct  GrGeometryProcessor::ProgramImpl::GrGPArgs
 
class  GrGeometryProcessor::TextureSampler
 

Functions

static constexpr size_t GrVertexAttribTypeSize (GrVertexAttribType type)
 

Function Documentation

◆ GrVertexAttribTypeSize()

static constexpr size_t GrVertexAttribTypeSize ( GrVertexAttribType  type)
inlinestaticconstexpr

Returns the size of the attrib type in bytes. This was moved from include/private/gpu/ganesh/GrTypesPriv.h in service of Skia dependents that build with C++11.

Definition at line 501 of file GrGeometryProcessor.h.

501 {
502 switch (type) {
504 return sizeof(float);
506 return 2 * sizeof(float);
508 return 3 * sizeof(float);
510 return 4 * sizeof(float);
512 return sizeof(uint16_t);
514 return 2 * sizeof(uint16_t);
516 return 4 * sizeof(uint16_t);
518 return 2 * sizeof(int32_t);
520 return 3 * sizeof(int32_t);
522 return 4 * sizeof(int32_t);
524 return 1 * sizeof(char);
526 return 2 * sizeof(char);
528 return 4 * sizeof(char);
530 return 1 * sizeof(char);
532 return 2 * sizeof(char);
534 return 4 * sizeof(char);
536 return 1 * sizeof(char);
538 return 4 * sizeof(char);
540 return 2 * sizeof(int16_t);
542 return 4 * sizeof(int16_t);
543 case kUShort2_GrVertexAttribType: // fall through
545 return 2 * sizeof(uint16_t);
547 return sizeof(int32_t);
549 return sizeof(uint32_t);
551 return sizeof(uint16_t);
553 return 4 * sizeof(uint16_t);
554 }
555 // GCC fails because SK_ABORT evaluates to non constexpr. clang and cl.exe think this is
556 // unreachable and don't complain.
557#if defined(__clang__) || !defined(__GNUC__)
558 SK_ABORT("Unsupported type conversion");
559#endif
560 return 0;
561}
@ kUShort_norm_GrVertexAttribType
@ kFloat2_GrVertexAttribType
@ kUShort2_GrVertexAttribType
@ kUInt_GrVertexAttribType
@ kUByte4_norm_GrVertexAttribType
@ kUByte_GrVertexAttribType
@ kShort2_GrVertexAttribType
@ kUShort4_norm_GrVertexAttribType
@ kInt_GrVertexAttribType
@ kByte_GrVertexAttribType
@ kByte4_GrVertexAttribType
@ kFloat3_GrVertexAttribType
@ kFloat_GrVertexAttribType
@ kByte2_GrVertexAttribType
@ kFloat4_GrVertexAttribType
@ kShort4_GrVertexAttribType
@ kUShort2_norm_GrVertexAttribType
@ kInt3_GrVertexAttribType
@ kHalf2_GrVertexAttribType
@ kHalf4_GrVertexAttribType
@ kUByte4_GrVertexAttribType
@ kUByte2_GrVertexAttribType
@ kInt4_GrVertexAttribType
@ kUByte_norm_GrVertexAttribType
@ kInt2_GrVertexAttribType
@ kHalf_GrVertexAttribType
#define SK_ABORT(message,...)
Definition SkAssert.h:70