Lines Matching defs:config
653 if (GrPixelConfigIsCompressed(dstSurface->config())) {
669 if (GrPixelConfigIsSRGB(dstSurface->config()) != GrPixelConfigIsSRGB(srcConfig)) {
677 // These settings we will always want if a temp draw is performed. Initially set the config
686 bool configsAreRBSwaps = GrPixelConfigSwapRAndB(srcConfig) == dstSurface->config();
691 tempDrawInfo->fTempSurfaceDesc.fConfig = dstSurface->config();
693 tempDrawInfo->fWriteConfig = dstSurface->config();
697 tempDrawInfo->fTempSurfaceDesc.fConfig = dstSurface->config();
699 tempDrawInfo->fWriteConfig = dstSurface->config();
705 tempDrawInfo->fTempSurfaceDesc.fConfig = dstSurface->config();
707 tempDrawInfo->fWriteConfig = dstSurface->config();
720 GrPixelConfig config) {
726 if (GrPixelConfigIsSRGB(surface->config()) != GrPixelConfigIsSRGB(config)) {
740 GrPixelConfig config,
744 if (!check_write_and_transfer_input(glTex, surface, config)) {
753 // We check that config == desc.fConfig in GrGLGpu::canWriteTexturePixels()
754 SkASSERT(config == glTex->desc().fConfig);
759 left, top, width, height, config, texels);
767 GrPixelConfig config, GrBuffer* transferBuffer,
771 if (!check_write_and_transfer_input(glTex, surface, config)) {
795 left, top, width, height, config, texels);
800 static inline GrGLint config_alignment(GrPixelConfig config) {
801 SkASSERT(!GrPixelConfigIsCompressed(config));
802 switch (config) {
823 SkFAIL("Invalid pixel config");
1558 SkDebugf("--- new texture [%d] size=(%d %d) config=%d\n",
1592 config=%d\n",
1624 int GrGLGpu::getCompatibleStencilIndex(GrPixelConfig config) {
1626 SkASSERT(this->caps()->isConfigRenderable(config, false));
1627 if (!this->glCaps().hasStencilFormatBeenDeterminedForConfig(config)) {
1651 if (!this->glCaps().getTexImageFormats(config, config, &internalFormat, &externalFormat,
1730 fGLContext->caps()->setStencilFormatIndexForConfig(config, firstWorkingStencilFormatIndex);
1732 return this->glCaps().getStencilFormatIndexForConfig(config);
1777 int sIdx = this->getCompatibleStencilIndex(rt->config());
1942 pipeline.getRenderTarget()->config());
2159 int width, int height, GrPixelConfig config,
2181 return caps.packRowLengthSupport() || GrBytesPerPixel(config) * width == rowBytes;
2192 return this->readPixelsSupported(target->config(), readConfig);
2203 GrPixelConfig rtConfig = target->config();
2249 GrPixelConfig config = surfaceForConfig->config();
2250 return this->readPixelsSupported(config, readConfig);
2266 GrPixelConfig srcConfig = srcSurface->config();
2308 // Better to do a draw with a R/B swap and then read as the original config.
2339 if (GrPixelConfigIsSRGB(srcSurface->config())) {
2358 // Do a draw to convert from the src config to the read config.
2379 GrPixelConfig config,
2385 if (!renderTarget && !this->glCaps().canConfigBeFBOColorAttachment(surface->config())) {
2390 if (requires_srgb_conversion(surface->config(), config)) {
2396 if (!this->readPixelsSupported(surface, config)) {
2399 if (GrPixelConfigIsSRGB(surface->config())) {
2402 if (kAlpha_8_GrPixelConfig == config &&
2421 if (!this->glCaps().getReadPixelsFormat(surface->config(), config, &externalFormat,
2456 size_t bytesPerPixel = GrBytesPerPixel(config);
2478 GL_CALL(PixelStorei(GR_GL_PACK_ALIGNMENT, config_alignment(config)));
2569 this->flushFramebufferSRGB(GrPixelConfigIsSRGB(target->config()) && !disableSRGB);
2972 static void get_tex_param_swizzle(GrPixelConfig config,
2975 const GrSwizzle& swizzle = caps.configSwizzle(config);
3031 if (!this->caps()->mipMapSupport() || GrPixelConfigIsCompressed(texture->config())) {
3039 if (this->glCaps().srgbDecodeDisableSupport() && GrPixelConfigIsSRGB(texture->config())) {
3051 if (GrPixelConfigIsSRGB(texture->config())) {
3064 get_tex_param_swizzle(texture->config(), this->glCaps(), newTexParams.fSwizzleRGBA);
3164 GrGLenum format = this->glCaps().getImageFormat(texture->config());
3177 if (!this->caps()->mipMapSupport() || GrPixelConfigIsCompressed(texture->config())) {
3188 // srgbSupport - we'll *never* get an sRGB pixel config if we don't support it.
3192 if (GrPixelConfigIsSRGB(texture->config()) &&
3215 if (this->glCaps().srgbDecodeDisableSupport() && GrPixelConfigIsSRGB(texture->config())) {
3320 if (!gpu->glCaps().canConfigBeFBOColorAttachment(dst->config()) ||
3321 !gpu->glCaps().canConfigBeFBOColorAttachment(src->config())) {
3326 SkASSERT(GrPixelConfigIsSint(dst->config()) == GrPixelConfigIsSint(src->config()));
3358 if (dst->config() != src->config()) {
3363 if (srcRT && srcRT->numColorSamples() && dst->config() != src->config()) {
3383 (kBGRA_8888_GrPixelConfig == dst->config() || kBGRA_8888_GrPixelConfig == src->config())) {
3410 if (gpu->glCaps().canConfigBeFBOColorAttachment(src->config()) &&
3411 !GrPixelConfigIsCompressed(src->config()) &&
3473 if (this->caps()->shaderCaps()->configOutputSwizzle(src->config()) !=
3474 this->caps()->shaderCaps()->configOutputSwizzle(dst->config())) {
3874 // TODO: This should swizzle the output to match dst's config, though it is a debugging
4136 SkASSERT(!GrPixelConfigIsSint(texture->config()));
4148 if (!this->glCaps().canConfigBeFBOColorAttachment(texture->config())) {
4153 if (GrPixelConfigIsSRGB(texture->config())) {
4172 if (!this->glCaps().getTexImageFormats(texture->config(), texture->config(),
4337 GrPixelConfig config, bool /*isRT*/) {
4338 if (!this->caps()->isConfigTexturable(config)) {
4358 if (!this->glCaps().getTexImageFormats(config, config, &internalFormat, &externalFormat,