GrPixelConfig config() const { return fDesc.fConfig; }
/**
- * Return the descriptor describing the surface
+ * Return the descriptor describing the surface.
*/
const GrSurfaceDesc& desc() const { return fDesc; }
SkASSERT(dstSurface);
SkASSERT(kGpuPrefersDraw_DrawPreference != *drawPreference);
- if (GrPixelConfigIsCompressed(dstSurface->desc().fConfig) &&
- dstSurface->desc().fConfig != srcConfig) {
+ if (GrPixelConfigIsCompressed(dstSurface->config()) && dstSurface->config() != srcConfig) {
return false;
}
const GrGpu::MultisampleSpecs& GrGpu::queryMultisampleSpecs(const GrPipeline& pipeline) {
GrRenderTarget* rt = pipeline.getRenderTarget();
- SkASSERT(rt->desc().fSampleCnt > 1);
+ SkASSERT(rt->numStencilSamples() > 1);
GrStencilSettings stencil;
if (pipeline.isStencilEnabled()) {
int effectiveSampleCnt;
SkSTArray<16, SkPoint, true> pattern;
this->onQueryMultisampleSpecs(rt, stencil, &effectiveSampleCnt, &pattern);
- SkASSERT(effectiveSampleCnt >= rt->desc().fSampleCnt);
+ SkASSERT(effectiveSampleCnt >= rt->numStencilSamples());
uint8_t id;
if (this->caps()->sampleLocationsSupport()) {
GL_CALL(BindTexture(glTex->target(), glTex->textureID()));
bool success = false;
- if (GrPixelConfigIsCompressed(glTex->desc().fConfig)) {
+ if (GrPixelConfigIsCompressed(glTex->config())) {
// We check that config == desc.fConfig in GrGLGpu::canWriteTexturePixels()
- SkASSERT(config == glTex->desc().fConfig);
+ SkASSERT(config == glTex->config());
success = this->uploadCompressedTexData(glTex->desc(), glTex->target(), texels,
kWrite_UploadType, left, top, width, height);
} else {
}
// For the moment, can't transfer compressed data
- if (GrPixelConfigIsCompressed(glTex->desc().fConfig)) {
+ if (GrPixelConfigIsCompressed(glTex->config())) {
return false;
}
GR_GL_GetIntegerv(this->glInterface(), GR_GL_SAMPLES, effectiveSampleCnt);
}
- SkASSERT(*effectiveSampleCnt >= rt->desc().fSampleCnt);
+ SkASSERT(*effectiveSampleCnt >= rt->numStencilSamples());
if (this->caps()->sampleLocationsSupport()) {
samplePattern->reset(*effectiveSampleCnt);
}
bool success = false;
- if (GrPixelConfigIsCompressed(vkTex->desc().fConfig)) {
+ if (GrPixelConfigIsCompressed(vkTex->config())) {
// We check that config == desc.fConfig in GrGpu::getWritePixelsInfo()
- SkASSERT(config == vkTex->desc().fConfig);
+ SkASSERT(config == vkTex->config());
// TODO: add compressed texture support
// delete the following two lines and uncomment the two after that when ready
vkTex->unref();
int* effectiveSampleCnt, SamplePattern*) {
// TODO: stub.
SkASSERT(!this->caps()->sampleLocationsSupport());
- *effectiveSampleCnt = rt->desc().fSampleCnt;
+ *effectiveSampleCnt = rt->numStencilSamples();
}
bool GrVkGpu::onGetReadPixelsInfo(GrSurface* srcSurface, int width, int height, size_t rowBytes,
void onQueryMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings&,
int* effectiveSampleCnt, SamplePattern*) override {
- *effectiveSampleCnt = rt->desc().fSampleCnt;
+ *effectiveSampleCnt = rt->numStencilSamples();
}
GrGpuCommandBuffer* createCommandBuffer(const GrGpuCommandBuffer::LoadAndStoreInfo&,