OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 if (context3d) | 63 if (context3d) |
64 deleteObjectImpl(context3d, m_object); | 64 deleteObjectImpl(context3d, m_object); |
65 | 65 |
66 m_object = 0; | 66 m_object = 0; |
67 } | 67 } |
68 } | 68 } |
69 | 69 |
70 void WebGLObject::detach() | 70 void WebGLObject::detach() |
71 { | 71 { |
72 m_attachmentCount = 0; // Make sure OpenGL resource is deleted. | 72 m_attachmentCount = 0; // Make sure OpenGL resource is deleted. |
73 } | 73 } |
74 | |
75 | 74 |
76 void WebGLObject::onDetached(blink::WebGraphicsContext3D* context3d) | 75 void WebGLObject::onDetached(blink::WebGraphicsContext3D* context3d) |
77 { | 76 { |
78 if (m_attachmentCount) | 77 if (m_attachmentCount) |
79 --m_attachmentCount; | 78 --m_attachmentCount; |
80 if (m_deleted) | 79 if (m_deleted) |
81 deleteObject(context3d); | 80 deleteObject(context3d); |
82 } | 81 } |
83 | 82 |
84 } | 83 } |
OLD | NEW |