Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index cf613a9cac55b6026c5cf83bbd5b5be38c218203..0b44a4281ae0522c634e4b3a9427eb2206dbcdda 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -147,7 +147,7 @@ |
return new SkGpuDevice(rt, width, height, props, flags); |
} |
-SkGpuDevice* SkGpuDevice::Create(GrContext* context, SkBudgeted budgeted, |
+SkGpuDevice* SkGpuDevice::Create(GrContext* context, SkSurface::Budgeted budgeted, |
const SkImageInfo& info, int sampleCount, |
const SkSurfaceProps* props, InitContents init, |
GrTextureStorageAllocator customAllocator) { |
@@ -185,7 +185,7 @@ |
} |
GrRenderTarget* SkGpuDevice::CreateRenderTarget( |
- GrContext* context, SkBudgeted budgeted, const SkImageInfo& origInfo, |
+ GrContext* context, SkSurface::Budgeted budgeted, const SkImageInfo& origInfo, |
int sampleCount, GrTextureStorageAllocator textureStorageAllocator) { |
if (kUnknown_SkColorType == origInfo.colorType() || |
origInfo.width() < 0 || origInfo.height() < 0) { |
@@ -216,7 +216,8 @@ |
desc.fConfig = SkImageInfo2GrPixelConfig(info); |
desc.fSampleCnt = sampleCount; |
desc.fTextureStorageAllocator = textureStorageAllocator; |
- GrTexture* texture = context->textureProvider()->createTexture(desc, budgeted, nullptr, 0); |
+ GrTexture* texture = context->textureProvider()->createTexture( |
+ desc, SkToBool(budgeted), nullptr, 0); |
if (nullptr == texture) { |
return nullptr; |
} |
@@ -320,7 +321,9 @@ |
void SkGpuDevice::replaceRenderTarget(bool shouldRetainContent) { |
ASSERT_SINGLE_OWNER |
- SkBudgeted budgeted = fRenderTarget->resourcePriv().isBudgeted(); |
+ SkSurface::Budgeted budgeted = |
+ fRenderTarget->resourcePriv().isBudgeted() ? SkSurface::kYes_Budgeted |
+ : SkSurface::kNo_Budgeted; |
SkAutoTUnref<GrRenderTarget> newRT(CreateRenderTarget( |
this->context(), budgeted, this->imageInfo(), fRenderTarget->desc().fSampleCnt, |
@@ -1781,7 +1784,7 @@ |
if (kNever_TileUsage == cinfo.fTileUsage) { |
texture.reset(fContext->textureProvider()->createApproxTexture(desc)); |
} else { |
- texture.reset(fContext->textureProvider()->createTexture(desc, SkBudgeted::kYes)); |
+ texture.reset(fContext->textureProvider()->createTexture(desc, true)); |
} |
if (texture) { |
@@ -1799,7 +1802,7 @@ |
SkSurface* SkGpuDevice::newSurface(const SkImageInfo& info, const SkSurfaceProps& props) { |
ASSERT_SINGLE_OWNER |
// TODO: Change the signature of newSurface to take a budgeted parameter. |
- static const SkBudgeted kBudgeted = SkBudgeted::kNo; |
+ static const SkSurface::Budgeted kBudgeted = SkSurface::kNo_Budgeted; |
return SkSurface::NewRenderTarget(fContext, kBudgeted, info, fRenderTarget->desc().fSampleCnt, |
&props); |
} |