Chromium Code Reviews| Index: src/gpu/GrGpu.cpp |
| diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp |
| index a9b283f3cec8a836a743a2078bd5d6a95da31ada..328b07084434c4dd77601d8c4f4f2bc058b6fea7 100644 |
| --- a/src/gpu/GrGpu.cpp |
| +++ b/src/gpu/GrGpu.cpp |
| @@ -336,6 +336,23 @@ bool GrGpu::writePixels(GrSurface* surface, |
| return false; |
| } |
| +bool GrGpu::transferPixels(GrSurface* surface, |
| + int left, int top, int width, int height, |
| + GrPixelConfig config, GrTransferBuffer* buffer, |
| + size_t offset, size_t rowBytes) { |
| + if (!buffer) { |
|
bsalomon
2015/12/18 15:24:38
|| !surface?
jvanverth1
2016/01/04 21:24:09
Done.
|
| + return false; |
| + } |
| + |
| + this->handleDirtyContext(); |
| + if (this->onTransferPixels(surface, left, top, width, height, config, |
| + buffer, offset, rowBytes)) { |
| + fStats.incTextureUploads(); |
|
bsalomon
2015/12/18 15:24:38
Worth tracking transfers differently from uploads?
jvanverth1
2016/01/04 21:24:09
Done.
|
| + return true; |
| + } |
| + return false; |
| +} |
| + |
| void GrGpu::resolveRenderTarget(GrRenderTarget* target) { |
| SkASSERT(target); |
| this->handleDirtyContext(); |