| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 }; | 1167 }; |
| 1168 | 1168 |
| 1169 void GraphicsContextLostCallbackAdapter::onContextLost() | 1169 void GraphicsContextLostCallbackAdapter::onContextLost() |
| 1170 { | 1170 { |
| 1171 if (m_contextLostCallback) | 1171 if (m_contextLostCallback) |
| 1172 m_contextLostCallback->onContextLost(); | 1172 m_contextLostCallback->onContextLost(); |
| 1173 } | 1173 } |
| 1174 | 1174 |
| 1175 PassOwnPtr<GraphicsContextLostCallbackAdapter> GraphicsContextLostCallbackAdapte
r::create(PassOwnPtr<GraphicsContext3D::ContextLostCallback> cb) | 1175 PassOwnPtr<GraphicsContextLostCallbackAdapter> GraphicsContextLostCallbackAdapte
r::create(PassOwnPtr<GraphicsContext3D::ContextLostCallback> cb) |
| 1176 { | 1176 { |
| 1177 return adoptPtr(new GraphicsContextLostCallbackAdapter(cb)); | 1177 return adoptPtr(cb.get() ? new GraphicsContextLostCallbackAdapter(cb) : 0); |
| 1178 } | 1178 } |
| 1179 | 1179 |
| 1180 void GraphicsContext3DInternal::setContextLostCallback(PassOwnPtr<GraphicsContex
t3D::ContextLostCallback> cb) | 1180 void GraphicsContext3DInternal::setContextLostCallback(PassOwnPtr<GraphicsContex
t3D::ContextLostCallback> cb) |
| 1181 { | 1181 { |
| 1182 m_contextLostCallbackAdapter = GraphicsContextLostCallbackAdapter::create(cb
); | 1182 m_contextLostCallbackAdapter = GraphicsContextLostCallbackAdapter::create(cb
); |
| 1183 m_impl->setContextLostCallback(m_contextLostCallbackAdapter.get()); | 1183 m_impl->setContextLostCallback(m_contextLostCallbackAdapter.get()); |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 bool GraphicsContext3D::isGLES2Compliant() const | 1186 bool GraphicsContext3D::isGLES2Compliant() const |
| 1187 { | 1187 { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1211 | 1211 |
| 1212 void GraphicsContext3DInternal::setSwapBuffersCompleteCallbackCHROMIUM(PassOwnPt
r<Extensions3DChromium::SwapBuffersCompleteCallbackCHROMIUM> cb) | 1212 void GraphicsContext3DInternal::setSwapBuffersCompleteCallbackCHROMIUM(PassOwnPt
r<Extensions3DChromium::SwapBuffersCompleteCallbackCHROMIUM> cb) |
| 1213 { | 1213 { |
| 1214 m_swapBuffersCompleteCallbackAdapter = SwapBuffersCompleteCallbackAdapter::c
reate(cb); | 1214 m_swapBuffersCompleteCallbackAdapter = SwapBuffersCompleteCallbackAdapter::c
reate(cb); |
| 1215 m_impl->setSwapBuffersCompleteCallbackCHROMIUM(m_swapBuffersCompleteCallback
Adapter.get()); | 1215 m_impl->setSwapBuffersCompleteCallbackCHROMIUM(m_swapBuffersCompleteCallback
Adapter.get()); |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 } // namespace WebCore | 1218 } // namespace WebCore |
| 1219 | 1219 |
| 1220 #endif // ENABLE(WEBGL) | 1220 #endif // ENABLE(WEBGL) |
| OLD | NEW |