Index: src/gpu/GrResourceProvider.cpp |
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp |
index 38213e6266330c9c2e66a4e52bec36ce7e026160..a240ea0767c600d68357450953c9adb3837d8169 100644 |
--- a/src/gpu/GrResourceProvider.cpp |
+++ b/src/gpu/GrResourceProvider.cpp |
@@ -146,6 +146,18 @@ GrVertexBuffer* GrResourceProvider::createVertexBuffer(size_t size, BufferUsage |
return this->gpu()->createVertexBuffer(size, dynamic); |
} |
+GrTransferBuffer* GrResourceProvider::createTransferBuffer(size_t size, TransferType type, |
+ uint32_t flags) { |
+ if (this->isAbandoned()) { |
+ return nullptr; |
+ } |
+ |
+ //bool noPendingIO = SkToBool(flags & kNoPendingIO_Flag); |
+ GrGpu::TransferType gpuType = kCpuToGpu_TransferType == type ? GrGpu::kCpuToGpu_TransferType |
+ : GrGpu::kGpuToCpu_TransferType; |
+ return this->gpu()->createTransferBuffer(size, gpuType); |
+} |
+ |
GrBatchAtlas* GrResourceProvider::createAtlas(GrPixelConfig config, |
int width, int height, |
int numPlotsX, int numPlotsY, |
@@ -164,7 +176,7 @@ GrBatchAtlas* GrResourceProvider::createAtlas(GrPixelConfig config, |
if (!texture) { |
return nullptr; |
} |
- GrBatchAtlas* atlas = new GrBatchAtlas(texture, numPlotsX, numPlotsY); |
+ GrBatchAtlas* atlas = new GrBatchAtlas(this, texture, numPlotsX, numPlotsY); |
atlas->registerEvictionCallback(func, data); |
return atlas; |
} |