| Index: cc/output/gl_renderer.cc
|
| diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
|
| index bdb537aa6627d34d7be142c772419ce6ce5fe301..93a4114e2b204f9a5454740b94882eebacef8b7b 100644
|
| --- a/cc/output/gl_renderer.cc
|
| +++ b/cc/output/gl_renderer.cc
|
| @@ -163,7 +163,13 @@ class GLRenderer::ScopedUseGrContext {
|
| public:
|
| static scoped_ptr<ScopedUseGrContext> Create(GLRenderer* renderer,
|
| DrawingFrame* frame) {
|
| - return make_scoped_ptr(new ScopedUseGrContext(renderer, frame));
|
| + // GrContext for filters is created lazily, and may fail if the context
|
| + // is lost.
|
| + // TODO(vmiura,bsalomon): crbug.com/487850 Ensure that
|
| + // ContextProvider::GrContext() does not return NULL.
|
| + if (renderer->output_surface_->context_provider()->GrContext())
|
| + return make_scoped_ptr(new ScopedUseGrContext(renderer, frame));
|
| + return nullptr;
|
| }
|
|
|
| ~ScopedUseGrContext() {
|
|
|