Lines Matching defs:target
137 static int gl_target_to_binding_index(GrGLenum target) {
138 switch (target) {
146 SK_ABORT("Unexpected GL texture target.");
149 GrGpuResource::UniqueID GrGLGpu::TextureUnitBindings::boundID(GrGLenum target) const {
150 return fTargetBindings[gl_target_to_binding_index(target)].fBoundResourceID;
153 bool GrGLGpu::TextureUnitBindings::hasBeenModified(GrGLenum target) const {
154 return fTargetBindings[gl_target_to_binding_index(target)].fHasBeenModified;
157 void GrGLGpu::TextureUnitBindings::setBoundID(GrGLenum target, GrGpuResource::UniqueID resourceID) {
158 int targetIndex = gl_target_to_binding_index(target);
163 void GrGLGpu::TextureUnitBindings::invalidateForScratchUse(GrGLenum target) {
164 this->setBoundID(target, GrGpuResource::UniqueID());
817 if (GR_GL_TEXTURE_EXTERNAL == glTex->target()) {
837 this->bindTextureToScratchUnit(glTex->target(), glTex->textureID());
846 GL_CALL(TexParameteri(glTex->target(), GR_GL_TEXTURE_BASE_LEVEL, 0));
850 GL_CALL(TexParameteri(glTex->target(), GR_GL_TEXTURE_MAX_LEVEL, maxLevel));
860 glTex->target(),
885 this->bindTextureToScratchUnit(glTex->target(), glTex->textureID());
917 GL_CALL(TexSubImage2D(glTex->target(),
968 GrGLenum target,
988 this->uploadTexData(texDims, target, dstRect, externalFormat, externalType, bpp, texels,
995 GrGLenum target,
1028 this->uploadTexData(texDims, target, SkIRect::MakeSize(texDims), externalFormat, externalType,
1034 GrGLenum target,
1071 GL_CALL(TexSubImage2D(target, level, dstRect.x(), dstRect.y(), dims.width(), dims.height(),
1084 GrGLenum target,
1109 GrGLenum error = GL_ALLOC_CALL(TexStorage2D(target, numMipLevels, internalFormat,
1121 error = GL_ALLOC_CALL(CompressedTexSubImage2D(target,
1146 GrGLenum error = GL_ALLOC_CALL(CompressedTexImage2D(target,
1234 // GrGLRenderTarget target will configure the FBO as multisample or not base on need.
1334 const GrGLInterface* interface, GrGLenum target) {
1343 GR_GL_CALL(interface, TexParameteri(target, GR_GL_TEXTURE_MAG_FILTER, state.fMagFilter));
1344 GR_GL_CALL(interface, TexParameteri(target, GR_GL_TEXTURE_MIN_FILTER, state.fMinFilter));
1345 GR_GL_CALL(interface, TexParameteri(target, GR_GL_TEXTURE_WRAP_S, state.fWrapS));
1346 GR_GL_CALL(interface, TexParameteri(target, GR_GL_TEXTURE_WRAP_T, state.fWrapT));
1711 GrGLenum target,
1725 this->bindTextureToScratchUnit(target, id);
1731 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_USAGE, GR_GL_FRAMEBUFFER_ATTACHMENT));
1735 *initialState = set_initial_texture_params(this->glInterface(), target);
1737 set_initial_texture_params(this->glInterface(), target);
1746 GrGLenum error = GL_ALLOC_CALL(TexStorage2D(target, levelCount, internalFormat,
1758 error = GL_ALLOC_CALL(TexImage2D(target, level, internalFormat, currentWidth,
1977 GrRenderTarget* target,
1981 SkASSERT(target);
1987 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(target);
2099 GrRenderTarget* target, bool useMultisampleFBO,
2101 SkASSERT(target);
2106 GrAttachment* sb = target->getStencilAttachment(useMultisampleFBO);
2131 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(target);
2259 void GrGLGpu::flushRenderTarget(GrGLRenderTarget* target, bool useMultisampleFBO,
2261 this->flushRenderTargetNoColorWrites(target, useMultisampleFBO);
2262 this->didWriteToSurface(target, origin, &bounds);
2265 void GrGLGpu::flushRenderTarget(GrGLRenderTarget* target, bool useMultisampleFBO) {
2266 this->flushRenderTargetNoColorWrites(target, useMultisampleFBO);
2267 this->didWriteToSurface(target, kTopLeft_GrSurfaceOrigin, nullptr);
2270 void GrGLGpu::flushRenderTargetNoColorWrites(GrGLRenderTarget* target, bool useMultisampleFBO) {
2271 SkASSERT(target);
2272 GrGpuResource::UniqueID rtID = target->uniqueID();
2274 target->bind(useMultisampleFBO);
2293 this->flushViewport(SkIRect::MakeSize(target->dimensions()),
2294 target->height(),
2313 this->flushFramebufferSRGB(this->caps()->isFormatSRGB(target->backendFormat()));
2316 if (this->glCaps().shouldQueryImplementationReadSupport(target->format())) {
2321 this->glCaps().didQueryImplementationReadSupport(target->format(), format, type);
2365 void GrGLGpu::onResolveRenderTarget(GrRenderTarget* target, const SkIRect& resolveRect) {
2366 auto glRT = static_cast<GrGLRenderTarget*>(target);
2655 GrGLenum target = texture->target();
2656 if (fHWTextureUnitBindings[unitIdx].boundID(target) != textureID) {
2658 GL_CALL(BindTexture(target, texture->textureID()));
2659 fHWTextureUnitBindings[unitIdx].setBoundID(target, textureID);
2683 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MIN_FILTER, minFilter));
2710 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MAG_FILTER, newSamplerState.fMagFilter));
2714 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MIN_FILTER, newSamplerState.fMinFilter));
2719 GL_CALL(TexParameterf(target, GR_GL_TEXTURE_MIN_LOD, newSamplerState.fMinLOD));
2723 GL_CALL(TexParameterf(target, GR_GL_TEXTURE_MAX_LOD, newSamplerState.fMaxLOD));
2728 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_WRAP_S, newSamplerState.fWrapS));
2732 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_WRAP_T, newSamplerState.fWrapT));
2739 GL_CALL(TexParameterfv(target, GR_GL_TEXTURE_BORDER_COLOR, kTransparentBlack));
2761 GL_CALL(TexParameteriv(target, GR_GL_TEXTURE_SWIZZLE_RGBA,
2765 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_SWIZZLE_R, kRGBA[0]));
2766 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_SWIZZLE_G, kRGBA[1]));
2767 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_SWIZZLE_B, kRGBA[2]));
2768 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_SWIZZLE_A, kRGBA[3]));
2778 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_BASE_LEVEL,
2783 GL_CALL(TexParameteri(target, GR_GL_TEXTURE_MAX_LEVEL,
2796 for (auto target : kTargets) {
2797 if (fHWTextureUnitBindings[i].hasBeenModified(target)) {
2798 GL_CALL(BindTexture(target, 0));
2854 void GrGLGpu::bindTextureToScratchUnit(GrGLenum target, GrGLint textureID) {
2863 fHWTextureUnitBindings[lastUnitIdx].invalidateForScratchUse(target);
2864 GL_CALL(BindTexture(target, textureID));
2954 GrGLenum target = texture->target();
2965 FramebufferTexture2D(fboTarget, GR_GL_COLOR_ATTACHMENT0, target, texID, mipLevel));
2978 GrGLenum textureTarget = static_cast<GrGLTexture*>(surface->asTexture())->target();
2999 void GrGLGpu::bindFramebuffer(GrGLenum target, GrGLuint fboid) {
3000 GL_CALL(BindFramebuffer(target, fboid));
3001 if (target == GR_GL_FRAMEBUFFER || target == GR_GL_DRAW_FRAMEBUFFER) {
3422 this->bindTextureToScratchUnit(dstTex->target(), dstTex->textureID());
3423 GL_CALL(CopyTexSubImage2D(dstTex->target(), 0,
3474 if (GR_GL_TEXTURE_2D != glTex->target()) {
3484 GrGLenum target = glTex->target();
3485 this->bindTextureToScratchUnit(target, glTex->textureID());
3486 GL_CALL(GenerateMipmap(glTex->target()));
3595 // The render target uses separate storage so no need for glTextureBarrier.
3596 // FIXME: The render target will resolve automatically when its texture is bound,
3783 // We make a texture instead of a render target if we're using a