• Home
  • Raw
  • Download

Lines Matching refs:dimensions

44 sk_sp<GrTexture> GrResourceProvider::createTexture(SkISize dimensions,  in createTexture()  argument
62 numMipLevels = SkMipmap::ComputeLevelCount(dimensions.fWidth, dimensions.fHeight) + 1; in createTexture()
65 if (!fCaps->validateSurfaceParams(dimensions, in createTexture()
75 auto scratch = this->getExactScratch(dimensions, in createTexture()
87 return this->writePixels(std::move(scratch), colorType, dimensions, texels, numMipLevels); in createTexture()
93 tempColorType = this->prepareLevels(format, colorType, dimensions, texels, numMipLevels, in createTexture()
99 return fGpu->createTexture(dimensions, in createTexture()
112 sk_sp<GrTexture> GrResourceProvider::getExactScratch(SkISize dimensions, in getExactScratch() argument
120 sk_sp<GrTexture> tex(this->findAndRefScratchTexture(dimensions, in getExactScratch()
134 sk_sp<GrTexture> GrResourceProvider::createTexture(SkISize dimensions, in createTexture() argument
154 if (!fCaps->validateSurfaceParams(dimensions, format, renderable, renderTargetSampleCnt, in createTexture()
159 auto tex = this->createApproxTexture(dimensions, format, textureType, renderable, in createTexture()
164 return this->writePixels(std::move(tex), colorType, dimensions, &mipLevel, 1); in createTexture()
166 return this->createTexture(dimensions, in createTexture()
179 sk_sp<GrTexture> GrResourceProvider::createCompressedTexture(SkISize dimensions, in createCompressedTexture() argument
189 return fGpu->createCompressedTexture(dimensions, format, budgeted, mipmapped, in createCompressedTexture()
193 sk_sp<GrTexture> GrResourceProvider::createTexture(SkISize dimensions, in createTexture() argument
206 if (!fCaps->validateSurfaceParams(dimensions, format, renderable, renderTargetSampleCnt, in createTexture()
217 this->getExactScratch(dimensions, in createTexture()
229 return fGpu->createTexture(dimensions, in createTexture()
241 SkISize GrResourceProvider::MakeApprox(SkISize dimensions) { in MakeApprox() argument
265 return {adjust(dimensions.width()), adjust(dimensions.height())}; in MakeApprox()
268 sk_sp<GrTexture> GrResourceProvider::createApproxTexture(SkISize dimensions, in createApproxTexture() argument
284 if (!fCaps->validateSurfaceParams(dimensions, format, renderable, renderTargetSampleCnt, in createApproxTexture()
289 auto copyDimensions = MakeApprox(dimensions); in createApproxTexture()
320 sk_sp<GrTexture> GrResourceProvider::findAndRefScratchTexture(SkISize dimensions, in findAndRefScratchTexture() argument
330 SkASSERT(fCaps->validateSurfaceParams(dimensions, format, renderable, renderTargetSampleCnt, in findAndRefScratchTexture()
337 GrTexture::ComputeScratchKey(*this->caps(), format, dimensions, renderable, in findAndRefScratchTexture()
620 *this->caps(), stencilFormat, rt->dimensions(), in attachStencilAttachment()
626 keyedStencil = this->gpu()->makeStencilAttachment(rt->backendFormat(), rt->dimensions(), in attachStencilAttachment()
641 sk_sp<GrAttachment> GrResourceProvider::getDiscardableMSAAAttachment(SkISize dimensions, in getDiscardableMSAAAttachment() argument
654 if (!fCaps->validateSurfaceParams(dimensions, in getDiscardableMSAAAttachment()
666 dimensions, in getDiscardableMSAAAttachment()
677 msaaAttachment = this->makeMSAAAttachment(dimensions, format, sampleCnt, isProtected, in getDiscardableMSAAAttachment()
685 sk_sp<GrAttachment> GrResourceProvider::makeMSAAAttachment(SkISize dimensions, in makeMSAAAttachment() argument
698 if (!fCaps->validateSurfaceParams(dimensions, in makeMSAAAttachment()
707 auto scratch = this->refScratchMSAAAttachment(dimensions, in makeMSAAAttachment()
716 return fGpu->makeMSAAAttachment(dimensions, format, sampleCnt, isProtected, memoryless); in makeMSAAAttachment()
719 sk_sp<GrAttachment> GrResourceProvider::refScratchMSAAAttachment(SkISize dimensions, in refScratchMSAAAttachment() argument
727 SkASSERT(fCaps->validateSurfaceParams(dimensions, in refScratchMSAAAttachment()
735 GrAttachment::ComputeScratchKey(*this->caps(), format, dimensions, in refScratchMSAAAttachment()
766 SkISize dimensions, in prepare_level() argument
777 size_t minRB = dimensions.fWidth * GrColorTypeBytesPerPixel(origColorType); in prepare_level()
787 auto tempRB = dimensions.fWidth * GrColorTypeBytesPerPixel(allowedColorType); in prepare_level()
788 data->reset(new char[tempRB * dimensions.fHeight]); in prepare_level()
791 GrImageInfo srcInfo( origColorType, kUnpremul_SkAlphaType, nullptr, dimensions); in prepare_level()
792 GrImageInfo dstInfo(allowedColorType, kUnpremul_SkAlphaType, nullptr, dimensions); in prepare_level()