Lines Matching refs:desc
66 GrSurfaceOrigin resolve_origin(const GrSurfaceDesc& desc) { in resolve_origin() argument
70 bool renderTarget = 0 != (desc.fFlags & kRenderTarget_GrSurfaceFlag); in resolve_origin()
71 if (kDefault_GrSurfaceOrigin == desc.fOrigin) { in resolve_origin()
74 return desc.fOrigin; in resolve_origin()
80 GrTexture::GrTexture(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc) in GrTexture() argument
81 : INHERITED(gpu, lifeCycle, desc) in GrTexture()
84 if (kWrapped_LifeCycle != lifeCycle && !GrPixelConfigIsCompressed(desc.fConfig)) { in GrTexture()
86 GrTexturePriv::ComputeScratchKey(desc, &key); in GrTexture()
94 void GrTexturePriv::ComputeScratchKey(const GrSurfaceDesc& desc, GrScratchKey* key) { in ComputeScratchKey() argument
99 GrSurfaceOrigin origin = resolve_origin(desc); in ComputeScratchKey()
100 uint32_t flags = desc.fFlags & ~kCheckAllocation_GrSurfaceFlag; in ComputeScratchKey()
102 SkASSERT(desc.fWidth <= SK_MaxU16); in ComputeScratchKey()
103 SkASSERT(desc.fHeight <= SK_MaxU16); in ComputeScratchKey()
104 SkASSERT(static_cast<int>(desc.fConfig) < (1 << 6)); in ComputeScratchKey()
105 SkASSERT(desc.fSampleCnt < (1 << 8)); in ComputeScratchKey()
109 builder[0] = desc.fWidth | (desc.fHeight << 16); in ComputeScratchKey()
110 builder[1] = desc.fConfig | (desc.fSampleCnt << 6) | (flags << 14) | (origin << 24); in ComputeScratchKey()