Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Macros | Functions
GrGLAttachment.cpp File Reference
#include "src/gpu/ganesh/gl/GrGLAttachment.h"
#include "include/core/SkTraceMemoryDump.h"
#include "include/gpu/ganesh/gl/GrGLBackendSurface.h"
#include "src/gpu/ganesh/gl/GrGLGpu.h"

Go to the source code of this file.

Macros

#define GL_CALL(X)   GR_GL_CALL(gpu->glInterface(), X)
 
#define GL_ALLOC_CALL(call)
 

Functions

static bool renderbuffer_storage_msaa (GrGLGpu *gpu, int sampleCount, GrGLenum format, int width, int height)
 

Macro Definition Documentation

◆ GL_ALLOC_CALL

#define GL_ALLOC_CALL (   call)
Value:
[&] { \
if (gpu->glCaps().skipErrorChecks()) { \
GR_GL_CALL(gpu->glInterface(), call); \
return static_cast<GrGLenum>(GR_GL_NO_ERROR); \
} else { \
gpu->clearErrorsAndCheckForOOM(); \
GR_GL_CALL_NOERRCHECK(gpu->glInterface(), call); \
return gpu->getErrorAndCheckForOOM(); \
} \
}()
#define GR_GL_NO_ERROR
unsigned int GrGLenum
Definition GrGLTypes.h:102

Definition at line 16 of file GrGLAttachment.cpp.

17 { \
18 if (gpu->glCaps().skipErrorChecks()) { \
19 GR_GL_CALL(gpu->glInterface(), call); \
20 return static_cast<GrGLenum>(GR_GL_NO_ERROR); \
21 } else { \
22 gpu->clearErrorsAndCheckForOOM(); \
23 GR_GL_CALL_NOERRCHECK(gpu->glInterface(), call); \
24 return gpu->getErrorAndCheckForOOM(); \
25 } \
26 }()

◆ GL_CALL

#define GL_CALL (   X)    GR_GL_CALL(gpu->glInterface(), X)

Definition at line 14 of file GrGLAttachment.cpp.

Function Documentation

◆ renderbuffer_storage_msaa()

static bool renderbuffer_storage_msaa ( GrGLGpu gpu,
int  sampleCount,
GrGLenum  format,
int  width,
int  height 
)
static

Definition at line 28 of file GrGLAttachment.cpp.

32 {
35 switch (gpu->glCaps().msFBOType()) {
37 error = GL_ALLOC_CALL(RenderbufferStorageMultisample(
38 GR_GL_RENDERBUFFER, sampleCount, format, width, height));
39 break;
41 error = GL_ALLOC_CALL(RenderbufferStorageMultisampleES2APPLE(
42 GR_GL_RENDERBUFFER, sampleCount, format, width, height));
43 break;
46 error = GL_ALLOC_CALL(RenderbufferStorageMultisampleES2EXT(
47 GR_GL_RENDERBUFFER, sampleCount, format, width, height));
48 break;
51 }
52 return error == GR_GL_NO_ERROR;
53}
#define GL_ALLOC_CALL(call)
#define GR_GL_RENDERBUFFER
#define SkUNREACHABLE
Definition SkAssert.h:135
#define SkASSERT(cond)
Definition SkAssert.h:116
@ kES_Apple_MSFBOType
Definition GrGLCaps.h:69
@ kES_EXT_MsToTexture_MSFBOType
Definition GrGLCaps.h:81
@ kNone_MSFBOType
Definition GrGLCaps.h:59
@ kES_IMG_MsToTexture_MSFBOType
Definition GrGLCaps.h:76
@ kStandard_MSFBOType
Definition GrGLCaps.h:65
MSFBOType msFBOType() const
Definition GrGLCaps.h:285
const GrGLCaps & glCaps() const
Definition GrGLGpu.h:108
const uint8_t uint32_t uint32_t GError ** error
uint32_t uint32_t * format
int32_t height
int32_t width