Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
GrGLGpu.cpp File Reference
#include "src/gpu/ganesh/gl/GrGLGpu.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkData.h"
#include "include/core/SkRect.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "include/core/SkTextureCompressionType.h"
#include "include/core/SkTypes.h"
#include "include/gpu/GpuTypes.h"
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrContextOptions.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/GrDriverBugWorkarounds.h"
#include "include/gpu/GrTypes.h"
#include "include/gpu/gl/GrGLConfig.h"
#include "include/private/base/SkFloatingPoint.h"
#include "include/private/base/SkMath.h"
#include "include/private/base/SkPoint_impl.h"
#include "include/private/base/SkTemplates.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkScopeExit.h"
#include "src/core/SkCompressedDataUtils.h"
#include "src/core/SkLRUCache.h"
#include "src/core/SkMipmap.h"
#include "src/core/SkSLTypeShared.h"
#include "src/core/SkTraceEvent.h"
#include "src/gpu/SkRenderEngineAbortf.h"
#include "src/gpu/Swizzle.h"
#include "src/gpu/ganesh/GrAttachment.h"
#include "src/gpu/ganesh/GrBackendSurfacePriv.h"
#include "src/gpu/ganesh/GrBackendUtils.h"
#include "src/gpu/ganesh/GrBuffer.h"
#include "src/gpu/ganesh/GrDataUtils.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "src/gpu/ganesh/GrGpuBuffer.h"
#include "src/gpu/ganesh/GrImageInfo.h"
#include "src/gpu/ganesh/GrPipeline.h"
#include "src/gpu/ganesh/GrProgramInfo.h"
#include "src/gpu/ganesh/GrRenderTarget.h"
#include "src/gpu/ganesh/GrSemaphore.h"
#include "src/gpu/ganesh/GrShaderCaps.h"
#include "src/gpu/ganesh/GrShaderVar.h"
#include "src/gpu/ganesh/GrStagingBufferManager.h"
#include "src/gpu/ganesh/GrSurface.h"
#include "src/gpu/ganesh/GrTexture.h"
#include "src/gpu/ganesh/GrUtil.h"
#include "src/gpu/ganesh/GrWindowRectangles.h"
#include "src/gpu/ganesh/gl/GrGLAttachment.h"
#include "src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h"
#include "src/gpu/ganesh/gl/GrGLBuffer.h"
#include "src/gpu/ganesh/gl/GrGLOpsRenderPass.h"
#include "src/gpu/ganesh/gl/GrGLProgram.h"
#include "src/gpu/ganesh/gl/GrGLSemaphore.h"
#include "src/gpu/ganesh/gl/GrGLTextureRenderTarget.h"
#include "src/gpu/ganesh/gl/builders/GrGLShaderStringBuilder.h"
#include "src/sksl/SkSLProgramKind.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/ir/SkSLProgram.h"
#include <algorithm>
#include <cmath>
#include <functional>
#include <memory>
#include <string>
#include <utility>

Go to the source code of this file.

Classes

class  GrGLGpu::SamplerObjectCache
 

Macros

#define GL_CALL(X)   GR_GL_CALL(this->glInterface(), X)
 
#define GL_CALL_RET(RET, X)   GR_GL_CALL_RET(this->glInterface(), RET, X)
 
#define GL_ALLOC_CALL(call)
 
#define IS_TSAN   0
 

Functions

static int gl_target_to_binding_index (GrGLenum target)
 
static GrGLenum filter_to_gl_mag_filter (GrSamplerState::Filter filter)
 
static GrGLenum filter_to_gl_min_filter (GrSamplerState::Filter filter, GrSamplerState::MipmapMode mm)
 
static GrGLenum wrap_mode_to_gl_wrap (GrSamplerState::WrapMode wrapMode, const GrCaps &caps)
 
static void cleanup_program (GrGLGpu *gpu, GrGLuint *programID, GrGLuint *vshader, GrGLuint *fshader)
 
static bool check_backend_texture (const GrBackendTexture &backendTex, const GrGLCaps &caps, GrGLTexture::Desc *desc, bool skipRectTexSupportCheck=false)
 
static sk_sp< GrGLTextureParametersget_gl_texture_params (const GrBackendTexture &backendTex)
 
static bool check_compressed_backend_texture (const GrBackendTexture &backendTex, const GrGLCaps &caps, GrGLTexture::Desc *desc, bool skipRectTexSupportCheck=false)
 
static bool check_write_and_transfer_input (GrGLTexture *glTex)
 
static sk_sp< GrTexturereturn_null_texture ()
 
static GrGLTextureParameters::SamplerOverriddenState set_initial_texture_params (const GrGLInterface *interface, const GrGLCaps &caps, GrGLenum target)
 
static void set_khr_debug_label (GrGLGpu *gpu, const GrGLuint id, std::string_view label)
 
static bool use_tiled_rendering (const GrGLCaps &glCaps, const GrOpsRenderPass::StencilLoadAndStoreInfo &stencilLoadStore)
 
static bool can_blit_framebuffer_for_copy_surface (const GrSurface *dst, const GrSurface *src, const SkIRect &srcRect, const SkIRect &dstRect, const GrGLCaps &caps)
 
static bool rt_has_msaa_render_buffer (const GrGLRenderTarget *rt, const GrGLCaps &glCaps)
 
static bool can_copy_texsubimage (const GrSurface *dst, const GrSurface *src, const GrGLCaps &caps)
 

Variables

static const GrGLenum gXfermodeEquation2Blend []
 
static const GrGLenum gXfermodeCoeff2Blend []
 

Macro Definition Documentation

◆ GL_ALLOC_CALL

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

Definition at line 82 of file GrGLGpu.cpp.

83 { \
84 if (this->glCaps().skipErrorChecks()) { \
85 GR_GL_CALL(this->glInterface(), call); \
86 return static_cast<GrGLenum>(GR_GL_NO_ERROR); \
87 } else { \
88 this->clearErrorsAndCheckForOOM(); \
89 GR_GL_CALL_NOERRCHECK(this->glInterface(), call); \
90 return this->getErrorAndCheckForOOM(); \
91 } \
92 }()

◆ GL_CALL

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

Definition at line 79 of file GrGLGpu.cpp.

◆ GL_CALL_RET

#define GL_CALL_RET (   RET,
  X 
)    GR_GL_CALL_RET(this->glInterface(), RET, X)

Definition at line 80 of file GrGLGpu.cpp.

◆ IS_TSAN

#define IS_TSAN   0

Function Documentation

◆ can_blit_framebuffer_for_copy_surface()

static bool can_blit_framebuffer_for_copy_surface ( const GrSurface dst,
const GrSurface src,
const SkIRect srcRect,
const SkIRect dstRect,
const GrGLCaps caps 
)
inlinestatic

Definition at line 3053 of file GrGLGpu.cpp.

3057 {
3058 int dstSampleCnt = 0;
3059 int srcSampleCnt = 0;
3060 if (const GrRenderTarget* rt = dst->asRenderTarget()) {
3061 dstSampleCnt = rt->numSamples();
3062 }
3063 if (const GrRenderTarget* rt = src->asRenderTarget()) {
3064 srcSampleCnt = rt->numSamples();
3065 }
3066 SkASSERT((dstSampleCnt > 0) == SkToBool(dst->asRenderTarget()));
3067 SkASSERT((srcSampleCnt > 0) == SkToBool(src->asRenderTarget()));
3068
3069 GrGLFormat dstFormat = GrBackendFormats::AsGLFormat(dst->backendFormat());
3070 GrGLFormat srcFormat = GrBackendFormats::AsGLFormat(src->backendFormat());
3071
3072 const GrGLTexture* dstTex = static_cast<const GrGLTexture*>(dst->asTexture());
3073 const GrGLTexture* srcTex = static_cast<const GrGLTexture*>(src->asTexture());
3074
3075 GrTextureType dstTexType;
3076 GrTextureType* dstTexTypePtr = nullptr;
3077 GrTextureType srcTexType;
3078 GrTextureType* srcTexTypePtr = nullptr;
3079 if (dstTex) {
3080 dstTexType = dstTex->textureType();
3081 dstTexTypePtr = &dstTexType;
3082 }
3083 if (srcTex) {
3084 srcTexType = srcTex->textureType();
3085 srcTexTypePtr = &srcTexType;
3086 }
3087
3088 return caps.canCopyAsBlit(dstFormat, dstSampleCnt, dstTexTypePtr,
3089 srcFormat, srcSampleCnt, srcTexTypePtr,
3090 src->getBoundsRect(), true, srcRect, dstRect);
3091}
GrGLFormat
Definition GrGLTypes.h:59
GrTextureType
#define SkASSERT(cond)
Definition SkAssert.h:116
static constexpr bool SkToBool(const T &x)
Definition SkTo.h:35
bool canCopyAsBlit(GrGLFormat dstFormat, int dstSampleCnt, const GrTextureType *dstTypeIfTexture, GrGLFormat srcFormat, int srcSampleCnt, const GrTextureType *srcTypeIfTexture, const SkRect &srcBounds, bool srcBoundsExact, const SkIRect &srcRect, const SkIRect &dstRect) const
GrTextureType textureType() const
Definition GrTexture.h:55
SK_API GrGLFormat AsGLFormat(const GrBackendFormat &)
dst
Definition cp.py:12

◆ can_copy_texsubimage()

static bool can_copy_texsubimage ( const GrSurface dst,
const GrSurface src,
const GrGLCaps caps 
)
inlinestatic

Definition at line 3101 of file GrGLGpu.cpp.

3102 {
3103
3104 const GrGLRenderTarget* dstRT = static_cast<const GrGLRenderTarget*>(dst->asRenderTarget());
3105 const GrGLRenderTarget* srcRT = static_cast<const GrGLRenderTarget*>(src->asRenderTarget());
3106 const GrGLTexture* dstTex = static_cast<const GrGLTexture*>(dst->asTexture());
3107 const GrGLTexture* srcTex = static_cast<const GrGLTexture*>(src->asTexture());
3108
3109 bool dstHasMSAARenderBuffer = dstRT ? rt_has_msaa_render_buffer(dstRT, caps) : false;
3110 bool srcHasMSAARenderBuffer = srcRT ? rt_has_msaa_render_buffer(srcRT, caps) : false;
3111
3112 GrGLFormat dstFormat = GrBackendFormats::AsGLFormat(dst->backendFormat());
3113 GrGLFormat srcFormat = GrBackendFormats::AsGLFormat(src->backendFormat());
3114
3115 GrTextureType dstTexType;
3116 GrTextureType* dstTexTypePtr = nullptr;
3117 GrTextureType srcTexType;
3118 GrTextureType* srcTexTypePtr = nullptr;
3119 if (dstTex) {
3120 dstTexType = dstTex->textureType();
3121 dstTexTypePtr = &dstTexType;
3122 }
3123 if (srcTex) {
3124 srcTexType = srcTex->textureType();
3125 srcTexTypePtr = &srcTexType;
3126 }
3127
3128 return caps.canCopyTexSubImage(dstFormat, dstHasMSAARenderBuffer, dstTexTypePtr,
3129 srcFormat, srcHasMSAARenderBuffer, srcTexTypePtr);
3130}
static bool rt_has_msaa_render_buffer(const GrGLRenderTarget *rt, const GrGLCaps &glCaps)
Definition GrGLGpu.cpp:3093
bool canCopyTexSubImage(GrGLFormat dstFormat, bool dstHasMSAARenderBuffer, const GrTextureType *dstTypeIfTexture, GrGLFormat srcFormat, bool srcHasMSAARenderBuffer, const GrTextureType *srcTypeIfTexture) const

◆ check_backend_texture()

static bool check_backend_texture ( const GrBackendTexture backendTex,
const GrGLCaps caps,
GrGLTexture::Desc desc,
bool  skipRectTexSupportCheck = false 
)
static

Definition at line 711 of file GrGLGpu.cpp.

714 {
716 if (!GrBackendTextures::GetGLTextureInfo(backendTex, &info) || !info.fID || !info.fFormat) {
717 return false;
718 }
719
720 desc->fSize = {backendTex.width(), backendTex.height()};
721 desc->fTarget = info.fTarget;
722 desc->fID = info.fID;
723 desc->fFormat = GrGLFormatFromGLEnum(info.fFormat);
724 desc->fIsProtected = info.fProtected;
725
726 if (desc->fFormat == GrGLFormat::kUnknown) {
727 return false;
728 }
729 if (GR_GL_TEXTURE_EXTERNAL == desc->fTarget) {
730 if (!caps.shaderCaps()->fExternalTextureSupport) {
731 return false;
732 }
733 } else if (GR_GL_TEXTURE_RECTANGLE == desc->fTarget) {
734 if (!caps.rectangleTextureSupport() && !skipRectTexSupportCheck) {
735 return false;
736 }
737 } else if (GR_GL_TEXTURE_2D != desc->fTarget) {
738 return false;
739 }
740 if (desc->fIsProtected == skgpu::Protected::kYes && !caps.supportsProtectedContent()) {
741 return false;
742 }
743
744 return true;
745}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
#define GR_GL_TEXTURE_2D
#define GR_GL_TEXTURE_RECTANGLE
#define GR_GL_TEXTURE_EXTERNAL
static constexpr GrGLFormat GrGLFormatFromGLEnum(GrGLenum glFormat)
Definition GrGLUtil.h:409
const GrShaderCaps * shaderCaps() const
Definition GrCaps.h:63
bool supportsProtectedContent() const
Definition GrCaps.h:422
bool rectangleTextureSupport() const
Are textures with GL_TEXTURE_RECTANGLE type supported.
Definition GrGLCaps.h:384
SK_API bool GetGLTextureInfo(const GrBackendTexture &, GrGLTextureInfo *)
bool fExternalTextureSupport
Definition SkSLUtil.h:99

◆ check_compressed_backend_texture()

static bool check_compressed_backend_texture ( const GrBackendTexture backendTex,
const GrGLCaps caps,
GrGLTexture::Desc desc,
bool  skipRectTexSupportCheck = false 
)
static

Definition at line 786 of file GrGLGpu.cpp.

788 {
790 if (!GrBackendTextures::GetGLTextureInfo(backendTex, &info) || !info.fID || !info.fFormat) {
791 return false;
792 }
793
794 desc->fSize = {backendTex.width(), backendTex.height()};
795 desc->fTarget = info.fTarget;
796 desc->fID = info.fID;
797 desc->fFormat = GrGLFormatFromGLEnum(info.fFormat);
798 desc->fIsProtected = info.fProtected;
799
800 if (desc->fFormat == GrGLFormat::kUnknown) {
801 return false;
802 }
803
804 if (GR_GL_TEXTURE_2D != desc->fTarget) {
805 return false;
806 }
807 if (desc->fIsProtected == skgpu::Protected::kYes && !caps.supportsProtectedContent()) {
808 return false;
809 }
810
811 return true;
812}

◆ check_write_and_transfer_input()

static bool check_write_and_transfer_input ( GrGLTexture glTex)
static

Definition at line 928 of file GrGLGpu.cpp.

928 {
929 if (!glTex) {
930 return false;
931 }
932
933 // Write or transfer of pixels is not implemented for TEXTURE_EXTERNAL textures
934 if (GR_GL_TEXTURE_EXTERNAL == glTex->target()) {
935 return false;
936 }
937
938 return true;
939}
GrGLenum target() const

◆ cleanup_program()

static void cleanup_program ( GrGLGpu gpu,
GrGLuint programID,
GrGLuint vshader,
GrGLuint fshader 
)
static

Definition at line 256 of file GrGLGpu.cpp.

259 {
260 const GrGLInterface* gli = gpu->glInterface();
261 if (programID) {
262 GR_GL_CALL(gli, DeleteProgram(*programID));
263 *programID = 0;
264 }
265 if (vshader) {
266 GR_GL_CALL(gli, DeleteShader(*vshader));
267 *vshader = 0;
268 }
269 if (fshader) {
270 GR_GL_CALL(gli, DeleteShader(*fshader));
271 *fshader = 0;
272 }
273}
#define GR_GL_CALL(IFACE, X)
Definition GrGLUtil.h:381
const GrGLInterface * glInterface() const
Definition GrGLGpu.h:103

◆ filter_to_gl_mag_filter()

static GrGLenum filter_to_gl_mag_filter ( GrSamplerState::Filter  filter)
static

Definition at line 211 of file GrGLGpu.cpp.

211 {
212 switch (filter) {
213 case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST;
214 case GrSamplerState::Filter::kLinear: return GR_GL_LINEAR;
215 }
217}
#define GR_GL_LINEAR
#define GR_GL_NEAREST
#define SkUNREACHABLE
Definition SkAssert.h:135

◆ filter_to_gl_min_filter()

static GrGLenum filter_to_gl_min_filter ( GrSamplerState::Filter  filter,
GrSamplerState::MipmapMode  mm 
)
static

Definition at line 219 of file GrGLGpu.cpp.

220 {
221 switch (mm) {
222 case GrSamplerState::MipmapMode::kNone:
223 return filter_to_gl_mag_filter(filter);
224 case GrSamplerState::MipmapMode::kNearest:
225 switch (filter) {
226 case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST_MIPMAP_NEAREST;
227 case GrSamplerState::Filter::kLinear: return GR_GL_LINEAR_MIPMAP_NEAREST;
228 }
230 case GrSamplerState::MipmapMode::kLinear:
231 switch (filter) {
232 case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST_MIPMAP_LINEAR;
233 case GrSamplerState::Filter::kLinear: return GR_GL_LINEAR_MIPMAP_LINEAR;
234 }
236 }
238}
#define GR_GL_NEAREST_MIPMAP_LINEAR
#define GR_GL_LINEAR_MIPMAP_NEAREST
#define GR_GL_NEAREST_MIPMAP_NEAREST
#define GR_GL_LINEAR_MIPMAP_LINEAR
static GrGLenum filter_to_gl_mag_filter(GrSamplerState::Filter filter)
Definition GrGLGpu.cpp:211

◆ get_gl_texture_params()

static sk_sp< GrGLTextureParameters > get_gl_texture_params ( const GrBackendTexture backendTex)
static

Definition at line 747 of file GrGLGpu.cpp.

747 {
749 auto glTextureData = static_cast<const GrGLBackendTextureData*>(btd);
750 SkASSERT(glTextureData);
751 return glTextureData->info().refParameters();
752}
static const GrBackendFormatData * GetBackendData(const GrBackendFormat &format)

◆ gl_target_to_binding_index()

static int gl_target_to_binding_index ( GrGLenum  target)
static

Definition at line 170 of file GrGLGpu.cpp.

170 {
171 switch (target) {
172 case GR_GL_TEXTURE_2D:
173 return 0;
175 return 1;
177 return 2;
178 }
179 SK_ABORT("Unexpected GL texture target.");
180}
#define SK_ABORT(message,...)
Definition SkAssert.h:70
uint32_t * target

◆ return_null_texture()

static sk_sp< GrTexture > return_null_texture ( )
static

Definition at line 1484 of file GrGLGpu.cpp.

1484 {
1485// SkDEBUGFAIL("null texture");
1486 return nullptr;
1487}

◆ rt_has_msaa_render_buffer()

static bool rt_has_msaa_render_buffer ( const GrGLRenderTarget rt,
const GrGLCaps glCaps 
)
static

Definition at line 3093 of file GrGLGpu.cpp.

3093 {
3094 // A RT has a separate MSAA renderbuffer if:
3095 // 1) It's multisampled
3096 // 2) We're using an extension with separate MSAA renderbuffers
3097 // 3) It's not FBO 0, which is special and always auto-resolves
3098 return rt->numSamples() > 1 && glCaps.usesMSAARenderBuffers() && !rt->isFBO0(true/*msaa*/);
3099}
bool usesMSAARenderBuffers() const
Definition GrGLCaps.h:290
bool isFBO0(bool multisample) const
int numSamples() const

◆ set_initial_texture_params()

static GrGLTextureParameters::SamplerOverriddenState set_initial_texture_params ( const GrGLInterface interface,
const GrGLCaps caps,
GrGLenum  target 
)
static

Definition at line 1489 of file GrGLGpu.cpp.

1492 {
1493 // Some drivers like to know filter/wrap before seeing glTexImage2D. Some
1494 // drivers have a bug where an FBO won't be complete if it includes a
1495 // texture that is not mipmap complete (considering the filter in use).
1498 state.fMagFilter = GR_GL_NEAREST;
1499 state.fWrapS = GR_GL_CLAMP_TO_EDGE;
1500 state.fWrapT = GR_GL_CLAMP_TO_EDGE;
1501 GR_GL_CALL(interface, TexParameteri(target, GR_GL_TEXTURE_MAG_FILTER, state.fMagFilter));
1502 GR_GL_CALL(interface, TexParameteri(target, GR_GL_TEXTURE_MIN_FILTER, state.fMinFilter));
1503 GR_GL_CALL(interface, TexParameteri(target, GR_GL_TEXTURE_WRAP_S, state.fWrapS));
1504 GR_GL_CALL(interface, TexParameteri(target, GR_GL_TEXTURE_WRAP_T, state.fWrapT));
1505 return state;
1506}
#define GR_GL_CLAMP_TO_EDGE
#define GR_GL_TEXTURE_WRAP_T
#define GR_GL_TEXTURE_MAG_FILTER
#define GR_GL_TEXTURE_WRAP_S
#define GR_GL_TEXTURE_MIN_FILTER
AtkStateType state

◆ set_khr_debug_label()

static void set_khr_debug_label ( GrGLGpu gpu,
const GrGLuint  id,
std::string_view  label 
)
static

Definition at line 1839 of file GrGLGpu.cpp.

1839 {
1840 const std::string khr_debug_label = label.empty() ? "Skia" : std::string(label);
1841 if (gpu->glCaps().debugSupport()) {
1842 GR_GL_CALL(gpu->glInterface(), ObjectLabel(GR_GL_TEXTURE, id, -1, khr_debug_label.c_str()));
1843 }
1844}
#define GR_GL_TEXTURE
bool debugSupport() const
Is there support for GL_KHR_debug?
Definition GrGLCaps.h:359
const GrGLCaps & glCaps() const
Definition GrGLGpu.h:108

◆ use_tiled_rendering()

static bool use_tiled_rendering ( const GrGLCaps glCaps,
const GrOpsRenderPass::StencilLoadAndStoreInfo stencilLoadStore 
)
static

Definition at line 2192 of file GrGLGpu.cpp.

2193 {
2194 // Only use the tiled rendering extension if we can explicitly clear and discard the stencil.
2195 // Otherwise it's faster to just not use it.
2196 return glCaps.tiledRenderingSupport() && GrLoadOp::kClear == stencilLoadStore.fLoadOp &&
2197 GrStoreOp::kDiscard == stencilLoadStore.fStoreOp;
2198}
bool tiledRenderingSupport() const
Definition GrGLCaps.h:503

◆ wrap_mode_to_gl_wrap()

static GrGLenum wrap_mode_to_gl_wrap ( GrSamplerState::WrapMode  wrapMode,
const GrCaps caps 
)
inlinestatic

Definition at line 240 of file GrGLGpu.cpp.

241 {
242 switch (wrapMode) {
247 // May not be supported but should have been caught earlier
250 }
252}
#define GR_GL_REPEAT
#define GR_GL_CLAMP_TO_BORDER
#define GR_GL_MIRRORED_REPEAT
bool clampToBorderSupport() const
Definition GrCaps.h:484

Variable Documentation

◆ gXfermodeCoeff2Blend

const GrGLenum gXfermodeCoeff2Blend[]
static
Initial value:
= {
}
#define GR_GL_ONE_MINUS_SRC1_COLOR
Definition GrGLDefines.h:94
#define GR_GL_ONE
Definition GrGLDefines.h:73
#define GR_GL_ONE_MINUS_SRC1_ALPHA
Definition GrGLDefines.h:96
#define GR_GL_ONE_MINUS_DST_ALPHA
Definition GrGLDefines.h:79
#define GR_GL_CONSTANT_COLOR
#define GR_GL_DST_ALPHA
Definition GrGLDefines.h:78
#define GR_GL_SRC_ALPHA
Definition GrGLDefines.h:76
#define GR_GL_ONE_MINUS_CONSTANT_COLOR
#define GR_GL_SRC1_COLOR
Definition GrGLDefines.h:93
#define GR_GL_SRC_COLOR
Definition GrGLDefines.h:74
#define GR_GL_SRC1_ALPHA
#define GR_GL_ONE_MINUS_DST_COLOR
Definition GrGLDefines.h:85
#define GR_GL_DST_COLOR
Definition GrGLDefines.h:84
#define GR_GL_ZERO
Definition GrGLDefines.h:72
#define GR_GL_ONE_MINUS_SRC_COLOR
Definition GrGLDefines.h:75
#define GR_GL_ONE_MINUS_SRC_ALPHA
Definition GrGLDefines.h:77

Definition at line 144 of file GrGLGpu.cpp.

◆ gXfermodeEquation2Blend

const GrGLenum gXfermodeEquation2Blend[]
static
Initial value:
= {
}
#define GR_GL_MULTIPLY
Definition GrGLDefines.h:65
#define GR_GL_FUNC_ADD
Definition GrGLDefines.h:50
#define GR_GL_DARKEN
Definition GrGLDefines.h:57
#define GR_GL_EXCLUSION
Definition GrGLDefines.h:64
#define GR_GL_SCREEN
Definition GrGLDefines.h:55
#define GR_GL_HSL_SATURATION
Definition GrGLDefines.h:67
#define GR_GL_COLORBURN
Definition GrGLDefines.h:60
#define GR_GL_HSL_HUE
Definition GrGLDefines.h:66
#define GR_GL_HARDLIGHT
Definition GrGLDefines.h:61
#define GR_GL_HSL_COLOR
Definition GrGLDefines.h:68
#define GR_GL_FUNC_REVERSE_SUBTRACT
Definition GrGLDefines.h:52
#define GR_GL_LIGHTEN
Definition GrGLDefines.h:58
#define GR_GL_SOFTLIGHT
Definition GrGLDefines.h:62
#define GR_GL_FUNC_SUBTRACT
Definition GrGLDefines.h:51
#define GR_GL_OVERLAY
Definition GrGLDefines.h:56
#define GR_GL_COLORDODGE
Definition GrGLDefines.h:59
#define GR_GL_HSL_LUMINOSITY
Definition GrGLDefines.h:69
#define GR_GL_DIFFERENCE
Definition GrGLDefines.h:63

Definition at line 98 of file GrGLGpu.cpp.

98 {
99 // Basic OpenGL blend equations.
103
104 // GL_KHR_blend_equation_advanced.
120
121 // Illegal... needs to map to something.
123};