| Index: src/gpu/SkGrPixelRef.cpp
|
| diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp
|
| index 8b68448e41bf0216195d2497cfe5042ec659cccf..9f2bb452c9cfb0fec004e2cd1a7e95d45058dc9e 100644
|
| --- a/src/gpu/SkGrPixelRef.cpp
|
| +++ b/src/gpu/SkGrPixelRef.cpp
|
| @@ -53,8 +53,8 @@ bool SkROLockPixelsPixelRef::onLockPixelsAreWritable() const {
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -static SkGrPixelRef* copyToTexturePixelRef(GrTexture* texture, SkColorType dstCT,
|
| - const SkIRect* subset) {
|
| +static SkGrPixelRef* copy_to_new_texture_pixelref(GrTexture* texture, SkColorType dstCT,
|
| + const SkIRect* subset) {
|
| if (NULL == texture || kUnknown_SkColorType == dstCT) {
|
| return NULL;
|
| }
|
| @@ -88,15 +88,10 @@ static SkGrPixelRef* copyToTexturePixelRef(GrTexture* texture, SkColorType dstCT
|
|
|
| context->copyTexture(texture, dst->asRenderTarget(), topLeft);
|
|
|
| - // TODO: figure out if this is responsible for Chrome canvas errors
|
| -#if 0
|
| - // The render texture we have created (to perform the copy) isn't fully
|
| - // functional (since it doesn't have a stencil buffer). Release it here
|
| - // so the caller doesn't try to render to it.
|
| - // TODO: we can undo this release when dynamic stencil buffer attach/
|
| - // detach has been implemented
|
| - dst->releaseRenderTarget();
|
| -#endif
|
| + // Blink is relying on the above copy being sent to GL immediately in the case when the source
|
| + // is a WebGL canvas backing store. We could have a TODO to remove this flush, but we have a
|
| + // larger TODO to remove SkGrPixelRef entirely.
|
| + context->flush();
|
|
|
| SkImageInfo info = SkImageInfo::Make(desc.fWidth, desc.fHeight, dstCT, kPremul_SkAlphaType);
|
| SkGrPixelRef* pixelRef = SkNEW_ARGS(SkGrPixelRef, (info, dst));
|
|
|