| Index: src/gpu/GrDrawingManager.cpp
|
| diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
|
| index 4642e1a3fe5e491d54856c9bdf1313060482701b..e8cea756228c210e204ac95bca011071c94a6dfc 100644
|
| --- a/src/gpu/GrDrawingManager.cpp
|
| +++ b/src/gpu/GrDrawingManager.cpp
|
| @@ -13,6 +13,7 @@
|
| #include "GrPathRenderingDrawContext.h"
|
| #include "GrResourceProvider.h"
|
| #include "GrSoftwarePathRenderer.h"
|
| +#include "GrSurfacePriv.h"
|
| #include "SkSurface_Gpu.h"
|
| #include "SkTTopoSort.h"
|
|
|
| @@ -135,6 +136,23 @@ void GrDrawingManager::internalFlush(GrResourceCache::FlushType type) {
|
| fFlushing = false;
|
| }
|
|
|
| +void GrDrawingManager::prepareSurfaceForExternalIO(GrSurface* surface) {
|
| + if (this->wasAbandoned()) {
|
| + return;
|
| + }
|
| + SkASSERT(surface);
|
| + SkASSERT(surface->getContext() == fContext);
|
| +
|
| + if (surface->surfacePriv().hasPendingIO()) {
|
| + this->flush();
|
| + }
|
| +
|
| + GrRenderTarget* rt = surface->asRenderTarget();
|
| + if (fContext->getGpu() && rt) {
|
| + fContext->getGpu()->resolveRenderTarget(rt);
|
| + }
|
| +}
|
| +
|
| GrDrawTarget* GrDrawingManager::newDrawTarget(GrRenderTarget* rt) {
|
| SkASSERT(fContext);
|
|
|
|
|