| Index: src/gpu/gl/GrGLGpu.cpp
|
| diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
|
| index 566c8c5b8bbb7f8506838cf992bfe615622904c6..aff40ccc85a4627071927037b3bd48e053987f74 100644
|
| --- a/src/gpu/gl/GrGLGpu.cpp
|
| +++ b/src/gpu/gl/GrGLGpu.cpp
|
| @@ -401,7 +401,7 @@ GrTexture* GrGLGpu::onWrapBackendTexture(const GrBackendTextureDesc& desc) {
|
| surfDesc.fWidth = desc.fWidth;
|
| surfDesc.fHeight = desc.fHeight;
|
| surfDesc.fConfig = desc.fConfig;
|
| - surfDesc.fSampleCnt = desc.fSampleCnt;
|
| + surfDesc.fSampleCnt = SkTMin(desc.fSampleCnt, this->caps()->maxSampleCount());
|
| bool renderTarget = SkToBool(desc.fFlags & kRenderTarget_GrBackendTextureFlag);
|
| // FIXME: this should be calling resolve_origin(), but Chrome code is currently
|
| // assuming the old behaviour, which is that backend textures are always
|
| @@ -442,7 +442,7 @@ GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe
|
| desc.fFlags = kCheckAllocation_GrSurfaceFlag;
|
| desc.fWidth = wrapDesc.fWidth;
|
| desc.fHeight = wrapDesc.fHeight;
|
| - desc.fSampleCnt = wrapDesc.fSampleCnt;
|
| + desc.fSampleCnt = SkTMin(wrapDesc.fSampleCnt, this->caps()->maxSampleCount());
|
| desc.fOrigin = resolve_origin(wrapDesc.fOrigin, true);
|
|
|
| GrRenderTarget* tgt = SkNEW_ARGS(GrGLRenderTarget, (this, desc, idDesc));
|
|
|