| Index: src/gpu/GrGpu.cpp
|
| diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
|
| index 57e033d8464cf490dd485b0b2bb23827d55a0cb6..df0fde879213e30b82cd603e613cc4b6a414775e 100644
|
| --- a/src/gpu/GrGpu.cpp
|
| +++ b/src/gpu/GrGpu.cpp
|
| @@ -217,6 +217,27 @@ GrRenderTarget* GrGpu::wrapBackendRenderTarget(const GrBackendRenderTargetDesc&
|
| return this->onWrapBackendRenderTarget(desc, ownership);
|
| }
|
|
|
| +void GrGpu::computeBackendTextureKeyForWrapAsRenderTarget(
|
| + const GrBackendTextureDesc& desc, GrUniqueKey* key) {
|
| + this->onComputeBackendTextureKeyForWrapAsRenderTarget(desc, key);
|
| +}
|
| +
|
| +bool GrGpu::rewrapRenderTargetWithBackendTexture(
|
| + const GrBackendTextureDesc& desc, GrRenderTarget* rt) {
|
| + if (!(desc.fFlags & kRenderTarget_GrBackendTextureFlag)) {
|
| + return nullptr;
|
| + }
|
| + if (!this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) {
|
| + return nullptr;
|
| + }
|
| + int maxSize = this->caps()->maxTextureSize();
|
| + if (desc.fWidth > maxSize || desc.fHeight > maxSize) {
|
| + return nullptr;
|
| + }
|
| + this->handleDirtyContext();
|
| + return this->onRewrapRenderTargetWithBackendTexture(desc, rt);
|
| +}
|
| +
|
| GrRenderTarget* GrGpu::wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc& desc) {
|
| this->handleDirtyContext();
|
| if (!(desc.fFlags & kRenderTarget_GrBackendTextureFlag)) {
|
|
|