Chromium Code Reviews| Index: Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp |
| diff --git a/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp b/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp |
| index 1afc42b6296406bee31ff617ba81a2eabc6af477..a44fc98340361260fc306ecc0e16868a6e9b7de0 100644 |
| --- a/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp |
| +++ b/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp |
| @@ -62,15 +62,11 @@ AcceleratedImageBufferSurface::AcceleratedImageBufferSurface(const IntSize& size |
| clear(); |
| } |
| -Platform3DObject AcceleratedImageBufferSurface::getBackingTexture() const |
| +// This is a duplicate of newImageSnapshot(), but we need different entry points to |
| +// support Canvas2DLayerBridge's slightly divergent semantics. |
|
reed1
2015/06/23 14:38:09
Lets document somewhere what those slightly diverg
|
| +PassRefPtr<SkImage> AcceleratedImageBufferSurface::getBackingTextureImage() const |
| { |
| - // Before returning the texture, all drawing operations must be completed. |
| - m_surface->getCanvas()->flush(); |
| - GrRenderTarget* renderTarget = m_surface->getCanvas()->getTopDevice()->accessRenderTarget(); |
| - if (renderTarget) { |
| - return renderTarget->asTexture()->getTextureHandle(); |
| - } |
| - return 0; |
| + return adoptRef(m_surface->newImageSnapshot()); |
| } |
| void AcceleratedImageBufferSurface::didModifyBackingTexture() |