| Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| index fb9d15055f47824ddf74d15eba03ed5fbcce659a..8a9cb40d3039de88b719622d9ab30eeb170686ea 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| @@ -154,6 +154,7 @@ DrawingBuffer::DrawingBuffer(
|
| , m_discardFramebufferSupported(discardFramebufferSupported)
|
| , m_wantAlphaChannel(wantAlphaChannel)
|
| , m_premultipliedAlpha(premultipliedAlpha)
|
| + , m_softwareRendering(m_contextProvider->isSoftwareRendering())
|
| , m_wantDepth(wantDepth)
|
| , m_wantStencil(wantStencil)
|
| {
|
| @@ -276,6 +277,12 @@ bool DrawingBuffer::PrepareTextureMailbox(cc::TextureMailbox* outMailbox,
|
| if (!m_contentsChanged)
|
| return false;
|
|
|
| + // If the context is lost, we don't know if we should be producing GPU or
|
| + // software frames, until we get a new context, since the compositor will
|
| + // be trying to get a new context and may change modes.
|
| + if (m_gl->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
|
| + return false;
|
| +
|
| TRACE_EVENT0("blink,rail", "DrawingBuffer::prepareMailbox");
|
|
|
| if (m_newMailboxCallback)
|
| @@ -285,7 +292,7 @@ bool DrawingBuffer::PrepareTextureMailbox(cc::TextureMailbox* outMailbox,
|
| if (m_antiAliasingMode != None)
|
| commit();
|
|
|
| - if (useSharedMemory) {
|
| + if (m_softwareRendering) {
|
| std::unique_ptr<cc::SharedBitmap> bitmap = createOrRecycleBitmap();
|
| if (!bitmap)
|
| return false;
|
|
|