| Index: src/gpu/SkGpuDevice.cpp
|
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
|
| index 4fdd4aea8a4df2ff11167d60da1e635f7a3ec274..f3dd32c218ca0ebce0fba75aaa3a5cb64664efeb 100644
|
| --- a/src/gpu/SkGpuDevice.cpp
|
| +++ b/src/gpu/SkGpuDevice.cpp
|
| @@ -162,7 +162,8 @@ SkGpuDevice* SkGpuDevice::Create(GrContext* context, SkSurface::Budgeted budgete
|
| return nullptr;
|
| }
|
|
|
| - SkAutoTUnref<GrRenderTarget> rt(CreateRenderTarget(context, budgeted, info, sampleCount));
|
| + SkAutoTUnref<GrRenderTarget> rt(CreateRenderTarget(context, budgeted, info,
|
| + sampleCount, nullptr));
|
| if (nullptr == rt) {
|
| return nullptr;
|
| }
|
| @@ -188,7 +189,8 @@ SkGpuDevice::SkGpuDevice(GrRenderTarget* rt, int width, int height,
|
| }
|
|
|
| GrRenderTarget* SkGpuDevice::CreateRenderTarget(GrContext* context, SkSurface::Budgeted budgeted,
|
| - const SkImageInfo& origInfo, int sampleCount) {
|
| + const SkImageInfo& origInfo, int sampleCount,
|
| + TextureStorageAllocator* textureStorageAllocator) {
|
| if (kUnknown_SkColorType == origInfo.colorType() ||
|
| origInfo.width() < 0 || origInfo.height() < 0) {
|
| return nullptr;
|
| @@ -217,6 +219,7 @@ GrRenderTarget* SkGpuDevice::CreateRenderTarget(GrContext* context, SkSurface::B
|
| desc.fHeight = info.height();
|
| desc.fConfig = SkImageInfo2GrPixelConfig(info);
|
| desc.fSampleCnt = sampleCount;
|
| + desc.fTextureStorageAllocator = textureStorageAllocator;
|
| GrTexture* texture = context->textureProvider()->createTexture(
|
| desc, SkToBool(budgeted), nullptr, 0);
|
| if (nullptr == texture) {
|
| @@ -336,7 +339,8 @@ void SkGpuDevice::replaceRenderTarget(bool shouldRetainContent) {
|
| : SkSurface::kNo_Budgeted;
|
|
|
| SkAutoTUnref<GrRenderTarget> newRT(CreateRenderTarget(
|
| - this->context(), budgeted, this->imageInfo(), fRenderTarget->desc().fSampleCnt));
|
| + this->context(), budgeted, this->imageInfo(), fRenderTarget->desc().fSampleCnt,
|
| + fRenderTarget->desc().fTextureStorageAllocator));
|
|
|
| if (nullptr == newRT) {
|
| return;
|
| @@ -1488,7 +1492,7 @@ void SkGpuDevice::drawProducerNine(const SkDraw& draw, GrTextureProducer* produc
|
|
|
| SkRect srcR, dstR;
|
| while (iter.next(&srcR, &dstR)) {
|
| - this->drawTextureProducer(producer, &srcR, &dstR, SkCanvas::kStrict_SrcRectConstraint,
|
| + this->drawTextureProducer(producer, &srcR, &dstR, SkCanvas::kStrict_SrcRectConstraint,
|
| *draw.fMatrix, fClip, paint);
|
| }
|
| return;
|
|
|