| Index: cc/output/gl_renderer.cc
|
| diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
|
| index 1af26c1cc7f6fe579aaad98664408a911201a667..2b20d25d39f18f17a362c4b0d88c4efa9d506731 100644
|
| --- a/cc/output/gl_renderer.cc
|
| +++ b/cc/output/gl_renderer.cc
|
| @@ -655,7 +655,11 @@ static skia::RefPtr<SkImage> ApplyImageFilter(
|
| surface->getCanvas()->translate(-dst_rect.x(), -dst_rect.y());
|
| surface->getCanvas()->drawImage(srcImage.get(), src_rect.x(), src_rect.y(),
|
| &paint);
|
| -
|
| + // Flush the drawing before source texture read lock goes out of scope.
|
| + // Skia API does not guarantee that when the SkImage goes out of scope,
|
| + // its externally referenced resources would force the rendering to be
|
| + // flushed.
|
| + surface->getCanvas()->flush();
|
| skia::RefPtr<SkImage> image = skia::AdoptRef(surface->newImageSnapshot());
|
| if (!image || !image->isTextureBacked()) {
|
| return skia::RefPtr<SkImage>();
|
|
|