| Index: third_party/WebKit/Source/modules/webgl/WebGLContextObject.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLContextObject.cpp b/third_party/WebKit/Source/modules/webgl/WebGLContextObject.cpp
|
| index b42f12265843bac74136fd6d539cb72b2a9647cb..0965b282acdc64753507e0644b15700d7d615630 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLContextObject.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLContextObject.cpp
|
| @@ -32,15 +32,18 @@ namespace blink {
|
| WebGLContextObject::WebGLContextObject(WebGLRenderingContextBase* context)
|
| : WebGLObject(context), m_context(context) {}
|
|
|
| -WebGLContextObject::~WebGLContextObject() {}
|
| -
|
| -void WebGLContextObject::detachContext() {
|
| - detach();
|
| - if (m_context) {
|
| - deleteObject(m_context->contextGL());
|
| - m_context->removeContextObject(this);
|
| - m_context = nullptr;
|
| - }
|
| +bool WebGLContextObject::validate(
|
| + const WebGLContextGroup*,
|
| + const WebGLRenderingContextBase* context) const {
|
| + // The contexts and context groups no longer maintain references to all
|
| + // the objects they ever created, so there's no way to invalidate them
|
| + // eagerly during context loss. The invalidation is discovered lazily.
|
| + return context == m_context &&
|
| + cachedNumberOfContextLosses() == context->numberOfContextLosses();
|
| +}
|
| +
|
| +uint32_t WebGLContextObject::currentNumberOfContextLosses() const {
|
| + return m_context->numberOfContextLosses();
|
| }
|
|
|
| gpu::gles2::GLES2Interface* WebGLContextObject::getAGLInterface() const {
|
|
|