Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 namespace WebCore { | 33 namespace WebCore { |
| 34 | 34 |
| 35 WebGLSharedObject::WebGLSharedObject(WebGLRenderingContextBase* context) | 35 WebGLSharedObject::WebGLSharedObject(WebGLRenderingContextBase* context) |
| 36 : WebGLObject(context), | 36 : WebGLObject(context), |
| 37 m_contextGroup(context->contextGroup()) | 37 m_contextGroup(context->contextGroup()) |
| 38 { | 38 { |
| 39 } | 39 } |
| 40 | 40 |
| 41 WebGLSharedObject::~WebGLSharedObject() | 41 WebGLSharedObject::~WebGLSharedObject() |
| 42 { | 42 { |
| 43 #if !ENABLE(OILPAN) | |
|
sof
2014/07/01 13:54:11
If this object dies at the same time as its contex
| |
| 43 if (m_contextGroup) | 44 if (m_contextGroup) |
| 44 m_contextGroup->removeObject(this); | 45 m_contextGroup->removeObject(this); |
| 46 #endif | |
| 45 } | 47 } |
| 46 | 48 |
| 47 void WebGLSharedObject::detachContextGroup() | 49 void WebGLSharedObject::detachContextGroup() |
| 48 { | 50 { |
| 49 detach(); | 51 detach(); |
| 50 if (m_contextGroup) { | 52 if (m_contextGroup) { |
| 51 deleteObject(0); | 53 deleteObject(0); |
| 52 m_contextGroup->removeObject(this); | 54 m_contextGroup->removeObject(this); |
| 53 m_contextGroup = 0; | 55 m_contextGroup = nullptr; |
| 54 } | 56 } |
| 55 } | 57 } |
| 56 | 58 |
| 57 blink::WebGraphicsContext3D* WebGLSharedObject::getAWebGraphicsContext3D() const | 59 blink::WebGraphicsContext3D* WebGLSharedObject::getAWebGraphicsContext3D() const |
| 58 { | 60 { |
| 59 return m_contextGroup ? m_contextGroup->getAWebGraphicsContext3D() : 0; | 61 return m_contextGroup ? m_contextGroup->getAWebGraphicsContext3D() : 0; |
| 60 } | 62 } |
| 61 | 63 |
| 64 void WebGLSharedObject::trace(Visitor* visitor) | |
| 65 { | |
| 66 visitor->trace(m_contextGroup); | |
| 67 WebGLObject::trace(visitor); | |
| 62 } | 68 } |
| 69 | |
| 70 } | |
| OLD | NEW |